ReactOS 0.4.15-dev-7958-gcd0bb1a
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
94CODE_SEG("INIT")
95static
98 _In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
100{
101 UNICODE_STRING UpString = RTL_CONSTANT_STRING(L"ntoskrnl.exe");
102 UNICODE_STRING MpString = RTL_CONSTANT_STRING(L"ntkrnlmp.exe");
103 PLIST_ENTRY NextEntry, ListHead;
104 PLDR_DATA_TABLE_ENTRY LdrEntry;
105 PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
106 LDR_RESOURCE_INFO ResourceInfo;
108 PVOID Data = NULL;
109
110 /* Loop the driver list */
111 ListHead = &LoaderBlock->LoadOrderListHead;
112 for (NextEntry = ListHead->Flink;
113 NextEntry != ListHead;
114 NextEntry = NextEntry->Flink)
115 {
116 /* Get the entry */
117 LdrEntry = CONTAINING_RECORD(NextEntry,
119 InLoadOrderLinks);
120
121 /* Check for a match */
122 if (RtlEqualUnicodeString(&LdrEntry->BaseDllName, &UpString, TRUE) ||
123 RtlEqualUnicodeString(&LdrEntry->BaseDllName, &MpString, TRUE))
124 {
125 /* Break out */
126 break;
127 }
128 }
129
130 /* Check if we found it */
131 if (NextEntry != ListHead)
132 {
133 /* Try to find the resource */
134 ResourceInfo.Type = 2; // RT_BITMAP;
135 ResourceInfo.Name = ResourceId;
136 ResourceInfo.Language = 0;
137 Status = LdrFindResource_U(LdrEntry->DllBase,
138 &ResourceInfo,
140 &ResourceDataEntry);
141 if (NT_SUCCESS(Status))
142 {
143 /* Access the resource */
144 ULONG Size = 0;
145 Status = LdrAccessResource(LdrEntry->DllBase,
146 ResourceDataEntry,
147 &Data,
148 &Size);
149 if ((Data) && (ResourceId < 3))
150 {
152 }
153 if (!NT_SUCCESS(Status)) Data = NULL;
154 }
155 }
156
157 /* Return the pointer */
158 return Data;
159}
160
161PUCHAR
162NTAPI
164 _In_ ULONG ResourceNumber)
165{
166 /* Validate the resource number */
167 if (ResourceNumber > ResourceCount) return NULL;
168
169 /* Return the address */
170 return ResourceList[ResourceNumber];
171}
172
173CODE_SEG("INIT")
175NTAPI
177 _In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
179{
180 PCHAR CommandLine;
181 BOOLEAN ResetMode = FALSE; // By default do not reset the video mode
182 ULONG i;
183
184 /* Quit if we're already installed */
185 if (InbvBootDriverInstalled) return TRUE;
186
187 /* Initialize the lock and check the current display state */
190 {
191 /* Reset the video mode in case we do not have a custom boot logo */
192 CommandLine = (LoaderBlock->LoadOptions ? _strupr(LoaderBlock->LoadOptions) : NULL);
193 ResetMode = (CommandLine == NULL) || (strstr(CommandLine, "BOOTLOGO") == NULL);
194 }
195
196 /* Initialize the video */
199 {
200 /* Find bitmap resources in the kernel */
202 for (i = 1; i <= ResourceCount; i++)
203 {
204 /* Do the lookup */
205 ResourceList[i] = FindBitmapResource(LoaderBlock, i);
206 }
207
208 /* Set the progress bar ranges */
210
211 // BootAnimInitialize(LoaderBlock, Count);
212 }
213
214 /* Return install state */
216}
217
218VOID
219NTAPI
221{
223
224 /* Check if we're at dispatch level or lower */
226 if (OldIrql <= DISPATCH_LEVEL)
227 {
228 /* Loop until the lock is free */
230
231 /* Raise IRQL to dispatch level */
233 }
234
235 /* Acquire the lock */
238}
239
240VOID
241NTAPI
243{
245
246 /* Capture the old IRQL */
248
249 /* Release the driver lock */
251
252 /* If we were at dispatch level or lower, restore the old IRQL */
254}
255
256VOID
257NTAPI
260{
261 /* Check if we're installed */
263 {
264 /* Check for lost state */
266
267 /* Acquire the lock */
269
270 /* Cleanup the screen if we own it */
272
273 /* Set the new display state */
276
277 /* Release the lock */
279 }
280 else
281 {
282 /* Set the new display state */
285 }
286}
287
288VOID
289NTAPI
291{
292 /* Check if we have a callback and we're just acquiring it now */
295 {
296 /* Call the callback */
298 }
299
300 /* Acquire the display */
302}
303
304VOID
305NTAPI
307 _In_ BOOLEAN DisplayOwned)
308{
309 /* Set the new display state */
312}
313
315NTAPI
317{
318 /* Return if we own it or not */
320}
321
323NTAPI
325{
326 /* Return the actual state */
327 return InbvDisplayState;
328}
329
331NTAPI
334{
335 /* Make sure we own the display */
337 {
338 /* If we're not allowed, return success anyway */
339 if (!InbvDisplayDebugStrings) return TRUE;
340
341 /* Check if a filter is installed */
343
344 /* Acquire the lock */
346
347 /* Make sure we're installed and display the string */
349
350 /* Print the string on the EMS port */
352 String,
353 strlen(String) + sizeof(ANSI_NULL),
354 NULL,
355 NULL);
356
357 /* Release the lock */
359
360 /* All done */
361 return TRUE;
362 }
363
364 /* We don't own it, fail */
365 return FALSE;
366}
367
369NTAPI
372{
373 BOOLEAN OldSetting;
374
375 /* Get the old setting */
376 OldSetting = InbvDisplayDebugStrings;
377
378 /* Update it */
380
381 /* Return the old setting */
382 return OldSetting;
383}
384
385VOID
386NTAPI
389{
390 /* Save the filter */
392}
393
395NTAPI
397{
398 /* Return driver state */
400}
401
402VOID
403NTAPI
406{
407 /* Check if we're installed */
409 {
410 /* Acquire the lock and cleanup if we own the screen */
413
414 /* Set the reset callback and display state */
417
418 /* Release the lock */
420 }
421 else
422 {
423 /* Set the reset callback and display state */
426 }
427}
428
430NTAPI
432{
433 /* Check if we're installed and we own it */
436 {
437 /* Do the reset */
439 return TRUE;
440 }
441
442 /* Nothing to reset */
443 return FALSE;
444}
445
446VOID
447NTAPI
449 _In_ ULONG Left,
450 _In_ ULONG Top,
451 _In_ ULONG Right,
453{
454 /* Just call bootvid */
455 VidSetScrollRegion(Left, Top, Right, Bottom);
456}
457
458VOID
459NTAPI
462{
463 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
464
465 /* Set color for EMS port */
466#ifdef INBV_HEADLESS_COLORS
467 InbvTerminalTextColor = 30 + CGA_TO_ANSI_COLOR(Color);
468#else
470#endif
471 HeadlessSetColor.TextColor = InbvTerminalTextColor;
472 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
474 &HeadlessSetColor,
475 sizeof(HeadlessSetColor),
476 NULL,
477 NULL);
478
479 /* Update the text color */
481}
482
483VOID
484NTAPI
486 _In_ ULONG Left,
487 _In_ ULONG Top,
488 _In_ ULONG Right,
491{
492 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
493
494 /* Make sure we own it */
496 {
497 /* Acquire the lock */
499
500 /* Check if we're installed */
502 {
503 /* Call bootvid */
504 VidSolidColorFill(Left, Top, Right, Bottom, (UCHAR)Color);
505 }
506
507 /* Set color for EMS port and clear display */
508#ifdef INBV_HEADLESS_COLORS
509 InbvTerminalBkgdColor = 40 + CGA_TO_ANSI_COLOR(Color);
510#else
512#endif
513 HeadlessSetColor.TextColor = InbvTerminalTextColor;
514 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
516 &HeadlessSetColor,
517 sizeof(HeadlessSetColor),
518 NULL,
519 NULL);
521 NULL, 0,
522 NULL, NULL);
523
524 /* Release the lock */
526 }
527}
528
529VOID
530NTAPI
533 _In_ ULONG X,
534 _In_ ULONG Y)
535{
536 /* Check if we're installed and we own it */
539 {
540 /* Acquire the lock */
542
543 /* Do the blit */
544 VidBitBlt(Buffer, X, Y);
545
546 /* Release the lock */
548 }
549}
550
551VOID
552NTAPI
555 _In_ ULONG X,
556 _In_ ULONG Y,
560{
561 /* Check if we're installed and we own it */
564 {
565 /* Do the blit */
567 }
568}
569
570VOID
571NTAPI
574 _In_ ULONG X,
575 _In_ ULONG Y,
579{
580 /* Check if we're installed and we own it */
583 {
584 /* Do the blit */
586 }
587}
588
599VOID
600NTAPI
602 _In_ ULONG Left,
603 _In_ ULONG Top)
604{
605 /* Update the coordinates */
606 ProgressBarLeft = Left;
608
609 /* Enable the progress bar */
611}
612
623CODE_SEG("INIT")
624VOID
625NTAPI
627{
628 ULONG Percentage;
629
630 /* Increase progress */
632
633 /* Compute the new percentage - Don't go over 100% */
634 Percentage = 100 * InbvProgressIndicator.Count /
636 Percentage = min(Percentage, 99);
637
638 if (Percentage != InbvProgressIndicator.Percentage)
639 {
640 /* Percentage has changed, update the progress bar */
642 InbvUpdateProgressBar(Percentage);
643 }
644}
645
662VOID
663NTAPI
665 _In_ ULONG Floor,
666 _In_ ULONG Ceiling)
667{
668 /* Sanity checks */
669 ASSERT(Floor < Ceiling);
670 ASSERT(Ceiling <= 100);
671
672 /* Update the progress bar state */
673 InbvProgressState.Floor = Floor * 100;
674 InbvProgressState.Ceiling = Ceiling * 100;
675 InbvProgressState.Bias = Ceiling - Floor;
676}
677
688VOID
689NTAPI
691 _In_ ULONG Percentage)
692{
693 ULONG TotalProgress;
694
695 /* Make sure the progress bar is enabled, that we own and are installed */
696 if (ShowProgressBar &&
699 {
700 /* Compute the total progress and tick the progress bar */
701 TotalProgress = InbvProgressState.Floor + (Percentage * InbvProgressState.Bias);
702 // TotalProgress /= (100 * 100);
703
704 BootAnimTickProgressBar(TotalProgress);
705 }
706}
707
709NTAPI
711{
713 UNICODE_STRING CapturedString;
717
718 PAGED_CODE();
719
721
722 /* We require the TCB privilege */
725
726 /* Capture the string */
728 if (!NT_SUCCESS(Status))
729 return Status;
730
731 /* Do not display the string if it is empty */
732 if (CapturedString.Length == 0 || CapturedString.Buffer == NULL)
733 {
735 goto Quit;
736 }
737
738 /*
739 * Convert the string since INBV understands only ANSI/OEM. Allocate the
740 * string buffer in non-paged pool because INBV passes it down to BOOTVID.
741 * We cannot perform the allocation using RtlUnicodeStringToOemString()
742 * since its allocator uses PagedPool.
743 */
744 OemLength = RtlUnicodeStringToOemSize(&CapturedString);
745 if (OemLength > MAXUSHORT)
746 {
748 goto Quit;
749 }
750 RtlInitEmptyAnsiString((PANSI_STRING)&OemString, NULL, (USHORT)OemLength);
752 if (OemString.Buffer == NULL)
753 {
755 goto Quit;
756 }
758 if (!NT_SUCCESS(Status))
759 {
761 goto Quit;
762 }
763
764 /* Display the string */
766
767 /* Free the string buffer */
769
771
772Quit:
773 /* Free the captured string */
775
776 return Status;
777}
#define PAGED_CODE()
#define CODE_SEG(...)
#define STATUS_PRIVILEGE_NOT_HELD
Definition: DriverTester.h:9
INT ResourceId
unsigned char BOOLEAN
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
VOID NTAPI VidScreenToBufferBlt(_Out_writes_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: bootvid.c:247
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: bootvid.c:261
VOID NTAPI VidCleanUp(VOID)
Definition: bootvid.c:239
VOID NTAPI VidResetDisplay(_In_ BOOLEAN HalReset)
Definition: bootvid.c:216
BOOLEAN NTAPI VidInitialize(_In_ BOOLEAN SetMode)
Definition: bootvid.c:183
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
VOID NTAPI BootAnimTickProgressBar(_In_ ULONG SubPercentTimes100)
Ticks the progress bar. Used by InbvUpdateProgressBar() and related.
Definition: bootanim.c:318
static VOID NTAPI DisplayFilter(_Inout_ PCHAR *String)
Definition: bootanim.c:454
ULONG_PTR KiBugCheckData[5]
Definition: bug.c:31
Definition: bufpool.h:45
#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:32
#define Y(I)
#define RtlComputeCrc32
Definition: compat.h:810
VOID NTAPI VidBitBlt(_In_ PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top)
Definition: common.c:471
ULONG NTAPI VidSetTextColor(_In_ ULONG Color)
Definition: common.c:315
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:453
VOID NTAPI VidDisplayString(_In_z_ PUCHAR String)
Definition: common.c:375
VOID NTAPI VidSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: common.c:352
#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:140
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:570
INBV_DISPLAY_STATE NTAPI InbvGetDisplayState(VOID)
Definition: inbv.c:324
VOID NTAPI InbvSetDisplayOwnership(_In_ BOOLEAN DisplayOwned)
Definition: inbv.c:306
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:290
VOID NTAPI InbvInstallDisplayStringFilter(_In_ INBV_DISPLAY_STRING_FILTER DisplayFilter)
Definition: inbv.c:387
VOID NTAPI InbvBufferToScreenBlt(_In_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: inbv.c:553
VOID NTAPI InbvNotifyDisplayOwnershipLost(_In_ INBV_RESET_DISPLAY_PARAMETERS Callback)
Definition: inbv.c:404
static ULONG InbvTerminalBkgdColor
Definition: inbv.c:89
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
PUCHAR NTAPI InbvGetResourceAddress(_In_ ULONG ResourceNumber)
Definition: inbv.c:163
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:220
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:626
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:316
ULONG ProgressBarTop
Definition: inbv.c:45
VOID NTAPI InbvEnableBootDriver(_In_ BOOLEAN Enable)
Definition: inbv.c:258
VOID NTAPI InbvSetTextColor(_In_ ULONG Color)
Definition: inbv.c:460
VOID NTAPI InbvSetProgressBarCoordinates(_In_ ULONG Left, _In_ ULONG Top)
Sets the screen coordinates of the loading progress bar and enable it.
Definition: inbv.c:601
VOID NTAPI InbvScreenToBufferBlt(_Out_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
Definition: inbv.c:572
VOID NTAPI InbvSetProgressBarSubset(_In_ ULONG Floor, _In_ ULONG Ceiling)
Specifies a progress percentage sub-range. Further calls to InbvIndicateProgress() or InbvUpdateProgr...
Definition: inbv.c:664
static ULONG ResourceCount
Definition: inbv.c:50
BOOLEAN NTAPI InbvEnableDisplayString(_In_ BOOLEAN Enable)
Definition: inbv.c:370
ULONG ProgressBarLeft
Definition: inbv.c:45
static INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters
Definition: inbv.c:40
BOOLEAN NTAPI InbvDisplayString(_In_ PCHAR String)
Definition: inbv.c:332
BOOLEAN NTAPI InbvDriverInitialize(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG Count)
Definition: inbv.c:176
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:690
VOID NTAPI InbvBitBlt(_In_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y)
Definition: inbv.c:531
struct _INBV_PROGRESS_STATE INBV_PROGRESS_STATE
static KSPIN_LOCK BootDriverLock
Definition: inbv.c:36
static ULONG InbvTerminalTextColor
Definition: inbv.c:88
BOOLEAN NTAPI InbvResetDisplay(VOID)
Definition: inbv.c:431
BOOLEAN ShowProgressBar
Definition: inbv.c:46
VOID NTAPI InbvSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: inbv.c:448
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:242
VOID NTAPI InbvSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ ULONG Color)
Definition: inbv.c:485
static PVOID FindBitmapResource(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG ResourceId)
Definition: inbv.c:97
NTSTATUS NTAPI NtDisplayString(IN PUNICODE_STRING DisplayString)
Definition: inbv.c:710
BOOLEAN NTAPI InbvIsBootDriverInstalled(VOID)
Definition: inbv.c:396
@ 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
VOID(NTAPI * INBV_DISPLAY_STRING_FILTER)(_Inout_ PCHAR *String)
Definition: inbvtypes.h:50
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
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
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
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
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
#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:145
ULONG_PTR Language
Definition: ldrtypes.h:183
ULONG_PTR Name
Definition: ldrtypes.h:182
ULONG_PTR Type
Definition: ldrtypes.h:181
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define TAG_OSTR
Definition: tag.h:147
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define NTAPI
Definition: typedefs.h:36
#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:203
_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:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_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
static ULONG Delta
Definition: xboxvideo.c:33
_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:1560
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
unsigned char UCHAR
Definition: xmlstorage.h:181