ReactOS 0.4.16-dev-2104-gb84fa49
inbv.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * PURPOSE: Boot Video Driver support
5 * COPYRIGHT: Copyright 2007 Alex Ionescu (alex.ionescu@reactos.org)
6 * Copyright 2010 Aleksey Bragin (aleksey@reactos.org)
7 * Copyright 2015-2022 Hermès Bélusca-Maïto
8 */
9
10/* INCLUDES ******************************************************************/
11
12#include <ntoskrnl.h>
13#include "inbv/logo.h"
14
15/* GLOBALS *******************************************************************/
16
17/*
18 * Enable this define if you want Inbv to use coloured headless mode.
19 */
20// #define INBV_HEADLESS_COLORS
21
23{
28
30{
35
41
44
49
51static PUCHAR ResourceList[1 + IDB_MAX_RESOURCES]; // First entry == NULL, followed by 'ResourceCount' entries.
52
53
54/*
55 * Headless terminal text colors
56 */
57
58#ifdef INBV_HEADLESS_COLORS
59
60// Conversion table CGA to ANSI color index
61static const UCHAR CGA_TO_ANSI_COLOR_TABLE[16] =
62{
63 0, // Black
64 4, // Blue
65 2, // Green
66 6, // Cyan
67 1, // Red
68 5, // Magenta
69 3, // Brown/Yellow
70 7, // Grey/White
71
72 60, // Bright Black
73 64, // Bright Blue
74 62, // Bright Green
75 66, // Bright Cyan
76 61, // Bright Red
77 65, // Bright Magenta
78 63, // Bright Yellow
79 67 // Bright Grey (White)
80};
81
82#define CGA_TO_ANSI_COLOR(CgaColor) \
83 CGA_TO_ANSI_COLOR_TABLE[CgaColor & 0x0F]
84
85#endif
86
87// Default colors: text in white, background in black
90
91
92/* FUNCTIONS *****************************************************************/
93
94#define RT_BITMAP MAKEINTRESOURCE(2)
95
96CODE_SEG("INIT")
97static
100 _In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
102{
103 UNICODE_STRING UpString = RTL_CONSTANT_STRING(L"ntoskrnl.exe");
104 UNICODE_STRING MpString = RTL_CONSTANT_STRING(L"ntkrnlmp.exe");
105 PLIST_ENTRY NextEntry, ListHead;
106 PLDR_DATA_TABLE_ENTRY LdrEntry;
107 PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
108 LDR_RESOURCE_INFO ResourceInfo;
110 PVOID Data = NULL;
111
112 /* Loop the driver list */
113 ListHead = &LoaderBlock->LoadOrderListHead;
114 for (NextEntry = ListHead->Flink;
115 NextEntry != ListHead;
116 NextEntry = NextEntry->Flink)
117 {
118 /* Get the entry */
119 LdrEntry = CONTAINING_RECORD(NextEntry,
121 InLoadOrderLinks);
122
123 /* Check for a match */
124 if (RtlEqualUnicodeString(&LdrEntry->BaseDllName, &UpString, TRUE) ||
125 RtlEqualUnicodeString(&LdrEntry->BaseDllName, &MpString, TRUE))
126 {
127 /* Break out */
128 break;
129 }
130 }
131
132 /* Check if we found it */
133 if (NextEntry != ListHead)
134 {
135 /* Try to find the resource */
136 ResourceInfo.Type = RT_BITMAP;
137 ResourceInfo.Name = ResourceId;
139
140 Status = LdrFindResource_U(LdrEntry->DllBase,
141 &ResourceInfo,
143 &ResourceDataEntry);
144 if (NT_SUCCESS(Status))
145 {
146 /* Access the resource */
147 ULONG Size = 0;
148 Status = LdrAccessResource(LdrEntry->DllBase,
149 ResourceDataEntry,
150 &Data,
151 &Size);
152 if ((Data) && (ResourceId < 3))
153 {
155 }
156 if (!NT_SUCCESS(Status)) Data = NULL;
157 }
158 }
159
160 /* Return the pointer */
161 return Data;
162}
163
164PUCHAR
165NTAPI
167 _In_ ULONG ResourceNumber)
168{
169 /* Validate the resource number */
170 if (ResourceNumber > ResourceCount) return NULL;
171
172 /* Return the address */
173 return ResourceList[ResourceNumber];
174}
175
176CODE_SEG("INIT")
178NTAPI
180 _In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
182{
183 PCHAR CommandLine;
184 BOOLEAN ResetMode = FALSE; // By default do not reset the video mode
185 ULONG i;
186
187 /* Quit if we're already installed */
188 if (InbvBootDriverInstalled) return TRUE;
189
190 /* Initialize the lock and check the current display state */
193 {
194 /* Reset the video mode in case we do not have a custom boot logo */
195 CommandLine = (LoaderBlock->LoadOptions ? _strupr(LoaderBlock->LoadOptions) : NULL);
196 ResetMode = (CommandLine == NULL) || (strstr(CommandLine, "BOOTLOGO") == NULL);
197 }
198
199 /* Initialize the video */
202 {
203 /* Find bitmap resources in the kernel */
205 for (i = 1; i <= ResourceCount; i++)
206 {
207 /* Do the lookup */
208 ResourceList[i] = FindBitmapResource(LoaderBlock, i);
209 }
210
211 /* Set the progress bar ranges */
213
214 // BootAnimInitialize(LoaderBlock, Count);
215 }
216
217 /* Return install state */
219}
220
221VOID
222NTAPI
224{
226
227 /* Check if we're at dispatch level or lower */
229 if (OldIrql <= DISPATCH_LEVEL)
230 {
231 /* Loop until the lock is free */
233
234 /* Raise IRQL to dispatch level */
236 }
237
238 /* Acquire the lock */
241}
242
243VOID
244NTAPI
246{
248
249 /* Capture the old IRQL */
251
252 /* Release the driver lock */
254
255 /* If we were at dispatch level or lower, restore the old IRQL */
257}
258
259VOID
260NTAPI
263{
264 /* Check if we're installed */
266 {
267 /* Check for lost state */
269
270 /* Acquire the lock */
272
273 /* Cleanup the screen if we own it */
275
276 /* Set the new display state */
279
280 /* Release the lock */
282 }
283 else
284 {
285 /* Set the new display state */
288 }
289}
290
291VOID
292NTAPI
294{
295 /* Check if we have a callback and we're just acquiring it now */
298 {
299 /* Call the callback */
301 }
302
303 /* Acquire the display */
305}
306
307VOID
308NTAPI
310 _In_ BOOLEAN DisplayOwned)
311{
312 /* Set the new display state */
315}
316
318NTAPI
320{
321 /* Return if we own it or not */
323}
324
326NTAPI
328{
329 /* Return the actual state */
330 return InbvDisplayState;
331}
332
334NTAPI
337{
338 /* Make sure we own the display */
340 {
341 /* If we're not allowed, return success anyway */
343 return TRUE;
344
345 /* Check if a filter is installed */
348
349 /* Acquire the lock */
351
352 /* Make sure we're installed and display the string */
355
356 /* Print the string on the EMS port */
358 (PVOID)String,
359 strlen(String) + sizeof(ANSI_NULL),
360 NULL,
361 NULL);
362
363 /* Release the lock */
365
366 /* All done */
367 return TRUE;
368 }
369
370 /* We don't own it, fail */
371 return FALSE;
372}
373
375NTAPI
378{
379 BOOLEAN OldSetting;
380
381 /* Get the old setting */
382 OldSetting = InbvDisplayDebugStrings;
383
384 /* Update it */
386
387 /* Return the old setting */
388 return OldSetting;
389}
390
391VOID
392NTAPI
395{
396 /* Save the filter */
398}
399
401NTAPI
403{
404 /* Return driver state */
406}
407
408VOID
409NTAPI
412{
413 /* Check if we're installed */
415 {
416 /* Acquire the lock and cleanup if we own the screen */
419
420 /* Set the reset callback and display state */
423
424 /* Release the lock */
426 }
427 else
428 {
429 /* Set the reset callback and display state */
432 }
433}
434
436NTAPI
438{
439 /* Check if we're installed and we own it */
442 {
443 /* Do the reset */
445 return TRUE;
446 }
447
448 /* Nothing to reset */
449 return FALSE;
450}
451
452VOID
453NTAPI
455 _In_ ULONG Left,
456 _In_ ULONG Top,
457 _In_ ULONG Right,
459{
460 /* Just call bootvid */
461 VidSetScrollRegion(Left, Top, Right, Bottom);
462}
463
464VOID
465NTAPI
468{
469 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
470
471 /* Set color for EMS port */
472#ifdef INBV_HEADLESS_COLORS
473 InbvTerminalTextColor = 30 + CGA_TO_ANSI_COLOR(Color);
474#else
476#endif
477 HeadlessSetColor.TextColor = InbvTerminalTextColor;
478 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
480 &HeadlessSetColor,
481 sizeof(HeadlessSetColor),
482 NULL,
483 NULL);
484
485 /* Update the text color */
487}
488
489VOID
490NTAPI
492 _In_ ULONG Left,
493 _In_ ULONG Top,
494 _In_ ULONG Right,
497{
498 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
499
500 /* Make sure we own it */
502 {
503 /* Acquire the lock */
505
506 /* Check if we're installed */
508 {
509 /* Call bootvid */
510 VidSolidColorFill(Left, Top, Right, Bottom, (UCHAR)Color);
511 }
512
513 /* Set color for EMS port and clear display */
514#ifdef INBV_HEADLESS_COLORS
515 InbvTerminalBkgdColor = 40 + CGA_TO_ANSI_COLOR(Color);
516#else
518#endif
519 HeadlessSetColor.TextColor = InbvTerminalTextColor;
520 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
522 &HeadlessSetColor,
523 sizeof(HeadlessSetColor),
524 NULL,
525 NULL);
527 NULL, 0,
528 NULL, NULL);
529
530 /* Release the lock */
532 }
533}
534
535VOID
536NTAPI
539 _In_ ULONG X,
540 _In_ ULONG Y)
541{
542 /* Check if we're installed and we own it */
545 {
546 /* Acquire the lock */
548
549 /* Do the blit */
550 VidBitBlt(Buffer, X, Y);
551
552 /* Release the lock */
554 }
555}
556
557VOID
558NTAPI
561 _In_ ULONG X,
562 _In_ ULONG Y,
565 _In_ ULONG Delta)
566{
567 /* Check if we're installed and we own it */
570 {
571 /* Do the blit */
573 }
574}
575
576VOID
577NTAPI
580 _In_ ULONG X,
581 _In_ ULONG Y,
584 _In_ ULONG Delta)
585{
586 /* Check if we're installed and we own it */
589 {
590 /* Do the blit */
592 }
593}
594
605VOID
606NTAPI
608 _In_ ULONG Left,
609 _In_ ULONG Top)
610{
611 /* Update the coordinates */
612 ProgressBarLeft = Left;
614
615 /* Enable the progress bar */
617}
618
629CODE_SEG("INIT")
630VOID
631NTAPI
633{
634 ULONG Percentage;
635
636 /* Increase progress */
638
639 /* Compute the new percentage - Don't go over 100% */
640 Percentage = 100 * InbvProgressIndicator.Count /
642 Percentage = min(Percentage, 99);
643
644 if (Percentage != InbvProgressIndicator.Percentage)
645 {
646 /* Percentage has changed, update the progress bar */
648 InbvUpdateProgressBar(Percentage);
649 }
650}
651
668VOID
669NTAPI
671 _In_ ULONG Floor,
672 _In_ ULONG Ceiling)
673{
674 /* Sanity checks */
675 ASSERT(Floor < Ceiling);
676 ASSERT(Ceiling <= 100);
677
678 /* Update the progress bar state */
679 InbvProgressState.Floor = Floor * 100;
680 InbvProgressState.Ceiling = Ceiling * 100;
681 InbvProgressState.Bias = Ceiling - Floor;
682}
683
694VOID
695NTAPI
697 _In_ ULONG Percentage)
698{
699 ULONG TotalProgress;
700
701 /* Make sure the progress bar is enabled, that we own and are installed */
702 if (ShowProgressBar &&
705 {
706 /* Compute the total progress and tick the progress bar */
707 TotalProgress = InbvProgressState.Floor + (Percentage * InbvProgressState.Bias);
708 // TotalProgress /= (100 * 100);
709
710 BootAnimTickProgressBar(TotalProgress);
711 }
712}
713
715NTAPI
717{
719 UNICODE_STRING CapturedString;
723
724 PAGED_CODE();
725
727
728 /* We require the TCB privilege */
731
732 /* Capture the string */
734 if (!NT_SUCCESS(Status))
735 return Status;
736
737 /* Do not display the string if it is empty */
738 if (CapturedString.Length == 0 || CapturedString.Buffer == NULL)
739 {
741 goto Quit;
742 }
743
744 /*
745 * Convert the string since INBV understands only ANSI/OEM. Allocate the
746 * string buffer in non-paged pool because INBV passes it down to BOOTVID.
747 * We cannot perform the allocation using RtlUnicodeStringToOemString()
748 * since its allocator uses PagedPool.
749 */
750 OemLength = RtlUnicodeStringToOemSize(&CapturedString);
751 if (OemLength > MAXUSHORT)
752 {
754 goto Quit;
755 }
756 RtlInitEmptyAnsiString((PANSI_STRING)&OemString, NULL, (USHORT)OemLength);
758 if (OemString.Buffer == NULL)
759 {
761 goto Quit;
762 }
764 if (!NT_SUCCESS(Status))
765 {
767 goto Quit;
768 }
769
770 /* Display the string */
772
773 /* Free the string buffer */
775
777
778Quit:
779 /* Free the captured string */
781
782 return Status;
783}
#define PAGED_CODE()
#define CODE_SEG(...)
#define STATUS_PRIVILEGE_NOT_HELD
Definition: DriverTester.h:9
_In_ PVOID _In_ ULONG _Out_ PVOID _In_ ULONG _Inout_ PULONG _In_ KPROCESSOR_MODE PreviousMode
INT ResourceId
Definition: LoadImageGCC.c:72
unsigned char BOOLEAN
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
VOID NTAPI VidScreenToBufferBlt(_Out_writes_bytes_all_(Delta *Height) PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: bootvid.c:284
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: bootvid.c:298
VOID NTAPI VidCleanUp(VOID)
Definition: bootvid.c:276
BOOLEAN NTAPI VidInitialize(_In_ BOOLEAN SetMode)
Definition: bootvid.c:231
LONG NTSTATUS
Definition: precomp.h:26
VOID DisplayString(LPWSTR Msg)
Definition: misc.c:211
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
static VOID NTAPI DisplayFilter(_Inout_ PCSTR *String)
Definition: bootanim.c:454
VOID NTAPI BootAnimTickProgressBar(_In_ ULONG SubPercentTimes100)
Ticks the progress bar. Used by InbvUpdateProgressBar() and related.
Definition: bootanim.c:318
ULONG_PTR KiBugCheckData[5]
Definition: bug.c:31
Definition: bufpool.h:45
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define Y(I)
#define RtlComputeCrc32
Definition: compat.h:810
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
_ACRTIMP char *__cdecl strstr(const char *, const char *)
Definition: string.c:3415
VOID NTAPI VidBitBlt(_In_ PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top)
Definition: common.c:318
VOID NTAPI VidBufferToScreenBlt(_In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: common.c:300
VOID NTAPI VidDisplayString(_In_ PCSTR String)
Definition: console.c:98
ULONG NTAPI VidSetTextColor(_In_ ULONG Color)
Definition: console.c:38
VOID NTAPI VidResetDisplay(_In_ BOOLEAN SetMode)
Definition: console.c:25
VOID NTAPI VidSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: console.c:51
#define L(x)
Definition: resources.c:13
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define NonPagedPool
Definition: env_spec_w32.h:307
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
#define ExGetPreviousMode
Definition: ex.h:143
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ HeadlessCmdPutString
Definition: hdl.h:131
@ HeadlessCmdSetColor
Definition: hdl.h:137
@ HeadlessCmdClearDisplay
Definition: hdl.h:132
NTSTATUS NTAPI HeadlessDispatch(IN HEADLESS_CMD Command, IN PVOID InputBuffer, IN SIZE_T InputBufferSize, OUT PVOID OutputBuffer, OUT PSIZE_T OutputBufferSize)
Definition: hdlsterm.c:580
INBV_DISPLAY_STATE NTAPI InbvGetDisplayState(VOID)
Definition: inbv.c:327
VOID NTAPI InbvSetDisplayOwnership(_In_ BOOLEAN DisplayOwned)
Definition: inbv.c:309
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:293
VOID NTAPI InbvInstallDisplayStringFilter(_In_ INBV_DISPLAY_STRING_FILTER DisplayFilter)
Definition: inbv.c:393
VOID NTAPI InbvNotifyDisplayOwnershipLost(_In_ INBV_RESET_DISPLAY_PARAMETERS Callback)
Definition: inbv.c:410
static ULONG InbvTerminalBkgdColor
Definition: inbv.c:89
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
PUCHAR NTAPI InbvGetResourceAddress(_In_ ULONG ResourceNumber)
Definition: inbv.c:166
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:223
#define RT_BITMAP
Definition: inbv.c:94
static INBV_DISPLAY_STRING_FILTER InbvDisplayFilter
Definition: inbv.c:43
static KIRQL InbvOldIrql
Definition: inbv.c:37
VOID NTAPI InbvIndicateProgress(VOID)
Gives some progress feedback, without specifying any explicit number of progress steps or percentage....
Definition: inbv.c:632
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
struct _BT_PROGRESS_INDICATOR BT_PROGRESS_INDICATOR
static BOOLEAN InbvDisplayDebugStrings
Definition: inbv.c:42
struct _BT_PROGRESS_INDICATOR * PBT_PROGRESS_INDICATOR
static INBV_PROGRESS_STATE InbvProgressState
Definition: inbv.c:47
BOOLEAN NTAPI InbvCheckDisplayOwnership(VOID)
Definition: inbv.c:319
ULONG ProgressBarTop
Definition: inbv.c:45
VOID NTAPI InbvEnableBootDriver(_In_ BOOLEAN Enable)
Definition: inbv.c:261
VOID NTAPI InbvSetTextColor(_In_ ULONG Color)
Definition: inbv.c:466
VOID NTAPI InbvSetProgressBarCoordinates(_In_ ULONG Left, _In_ ULONG Top)
Sets the screen coordinates of the loading progress bar and enable it.
Definition: inbv.c:607
VOID NTAPI InbvScreenToBufferBlt(_Out_writes_bytes_all_(Delta *Height) PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: inbv.c:578
VOID NTAPI InbvSetProgressBarSubset(_In_ ULONG Floor, _In_ ULONG Ceiling)
Specifies a progress percentage sub-range. Further calls to InbvIndicateProgress() or InbvUpdateProgr...
Definition: inbv.c:670
static ULONG ResourceCount
Definition: inbv.c:50
BOOLEAN NTAPI InbvEnableDisplayString(_In_ BOOLEAN Enable)
Definition: inbv.c:376
ULONG ProgressBarLeft
Definition: inbv.c:45
static INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters
Definition: inbv.c:40
BOOLEAN NTAPI InbvDriverInitialize(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG Count)
Definition: inbv.c:179
static BT_PROGRESS_INDICATOR InbvProgressIndicator
Definition: inbv.c:48
VOID NTAPI InbvUpdateProgressBar(_In_ ULONG Percentage)
Updates the progress bar percentage, relative to the current percentage sub-range previously set by I...
Definition: inbv.c:696
VOID NTAPI InbvBitBlt(_In_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y)
Definition: inbv.c:537
struct _INBV_PROGRESS_STATE INBV_PROGRESS_STATE
static KSPIN_LOCK BootDriverLock
Definition: inbv.c:36
static ULONG InbvTerminalTextColor
Definition: inbv.c:88
VOID NTAPI InbvBufferToScreenBlt(_In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: inbv.c:559
BOOLEAN NTAPI InbvResetDisplay(VOID)
Definition: inbv.c:437
BOOLEAN ShowProgressBar
Definition: inbv.c:46
BOOLEAN NTAPI InbvDisplayString(_In_ PCSTR String)
Definition: inbv.c:335
VOID NTAPI InbvSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: inbv.c:454
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:245
VOID NTAPI InbvSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ ULONG Color)
Definition: inbv.c:491
static PVOID FindBitmapResource(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG ResourceId)
Definition: inbv.c:99
NTSTATUS NTAPI NtDisplayString(IN PUNICODE_STRING DisplayString)
Definition: inbv.c:716
BOOLEAN NTAPI InbvIsBootDriverInstalled(VOID)
Definition: inbv.c:402
VOID(NTAPI * INBV_DISPLAY_STRING_FILTER)(_Inout_ PCSTR *String)
Definition: inbvtypes.h:50
@ INBV_DISPLAY_STATE_OWNED
Definition: inbvtypes.h:33
@ INBV_DISPLAY_STATE_LOST
Definition: inbvtypes.h:35
@ INBV_DISPLAY_STATE_DISABLED
Definition: inbvtypes.h:34
enum _INBV_DISPLAY_STATE INBV_DISPLAY_STATE
BOOLEAN(NTAPI * INBV_RESET_DISPLAY_PARAMETERS)(_In_ ULONG Cols, _In_ ULONG Rows)
Definition: inbvtypes.h:43
NTSTATUS NTAPI LdrAccessResource(_In_ PVOID BaseAddress, _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry, _Out_opt_ PVOID *Resource, _Out_opt_ PULONG Size)
NTSTATUS NTAPI LdrFindResource_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry)
#define RESOURCE_DATA_LEVEL
Definition: ldrtypes.h:33
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define min(a, b)
Definition: monoChain.cc:55
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define _In_reads_bytes_(s)
Definition: no_sal2.h:170
#define _In_
Definition: no_sal2.h:158
#define _Out_writes_bytes_all_(s)
Definition: no_sal2.h:194
int Count
Definition: noreturn.cpp:7
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define ANSI_NULL
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
const LUID SeTcbPrivilege
Definition: priv.c:26
#define IDB_MAX_RESOURCES
Definition: resource.h:55
BOOLEAN FASTCALL KeTestSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:475
VOID FASTCALL KiAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:287
VOID FASTCALL KiReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:298
BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a single privilege is present in the context of the calling thread.
Definition: priv.c:744
unsigned short USHORT
Definition: pedump.c:61
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_NEUTRAL
Definition: nls.h:167
static __inline NTSTATUS ProbeAndCaptureUnicodeString(OUT PUNICODE_STRING Dest, IN KPROCESSOR_MODE CurrentMode, IN const UNICODE_STRING *UnsafeSrc)
Definition: probe.h:142
static __inline VOID ReleaseCapturedUnicodeString(IN PUNICODE_STRING CapturedString, IN KPROCESSOR_MODE CurrentMode)
Definition: probe.h:239
_strupr
Definition: string.h:453
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
Definition: pedump.c:458
Definition: btrfs_drv.h:1876
PVOID DllBase
Definition: btrfs_drv.h:1880
UNICODE_STRING BaseDllName
Definition: ldrtypes.h:149
ULONG_PTR Language
Definition: ldrtypes.h:187
ULONG_PTR Name
Definition: ldrtypes.h:186
ULONG_PTR Type
Definition: ldrtypes.h:185
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define TAG_OSTR
Definition: tag.h:146
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define NTAPI
Definition: typedefs.h:36
const char * PCSTR
Definition: typedefs.h:52
#define MAXUSHORT
Definition: typedefs.h:83
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
STRING OEM_STRING
Definition: umtypes.h:205
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define RtlUnicodeStringToOemSize(STRING)
*BytesInOemString PCHAR OemString
Definition: rtlfuncs.h:1577
unsigned char UCHAR
Definition: xmlstorage.h:181