ReactOS  0.4.15-dev-5112-g22d8c0f
inbv.h File Reference
#include "bootvid/bootvid.h"
Include dependency graph for inbv.h:

Go to the source code of this file.

Functions

BOOLEAN NTAPI InbvDriverInitialize (_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG Count)
 
INBV_DISPLAY_STATE NTAPI InbvGetDisplayState (VOID)
 
VOID NTAPI InbvAcquireLock (VOID)
 
VOID NTAPI InbvReleaseLock (VOID)
 
PUCHAR NTAPI InbvGetResourceAddress (_In_ ULONG ResourceNumber)
 
VOID NTAPI InbvBitBlt (_In_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y)
 
VOID NTAPI InbvBufferToScreenBlt (_In_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
 
VOID NTAPI InbvScreenToBufferBlt (_Out_ PUCHAR Buffer, _In_ ULONG X, _In_ ULONG Y, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
 
VOID NTAPI InbvSetProgressBarCoordinates (_In_ ULONG Left, _In_ ULONG Top)
 Sets the screen coordinates of the loading progress bar and enable it. More...
 
VOID NTAPI InbvIndicateProgress (VOID)
 Gives some progress feedback, without specifying any explicit number of progress steps or percentage. The corresponding percentage is derived from the progress indicator's current count, capped to the number of expected calls to be made to this function (default: 25, see InbvProgressIndicator.Expected). More...
 
VOID NTAPI InbvSetProgressBarSubset (_In_ ULONG Floor, _In_ ULONG Ceiling)
 Specifies a progress percentage sub-range. Further calls to InbvIndicateProgress() or InbvUpdateProgressBar() will update the progress percentage relative to this sub-range. In particular, the percentage provided to InbvUpdateProgressBar() is relative to this sub-range. More...
 
VOID NTAPI InbvUpdateProgressBar (_In_ ULONG Percentage)
 Updates the progress bar percentage, relative to the current percentage sub-range previously set by InbvSetProgressBarSubset(). More...
 
VOID NTAPI InbvPortEnableFifo (IN ULONG PortId, IN BOOLEAN Enable)
 
BOOLEAN NTAPI InbvPortPollOnly (IN ULONG PortId)
 
BOOLEAN NTAPI InbvPortGetByte (IN ULONG PortId, OUT PUCHAR Byte)
 
VOID NTAPI InbvPortPutByte (IN ULONG PortId, IN UCHAR Byte)
 
VOID NTAPI InbvPortTerminate (IN ULONG PortId)
 
BOOLEAN NTAPI InbvPortInitialize (IN ULONG BaudRate, IN ULONG PortNumber, IN PUCHAR PortAddress, OUT PULONG PortId, IN BOOLEAN IsMMIODevice)
 

Variables

BOOLEAN InbvBootDriverInstalled
 

Function Documentation

◆ InbvAcquireLock()

VOID NTAPI InbvAcquireLock ( VOID  )

Definition at line 219 of file inbv.c.

220 {
221  KIRQL OldIrql;
222 
223  /* Check if we're at dispatch level or lower */
225  if (OldIrql <= DISPATCH_LEVEL)
226  {
227  /* Loop until the lock is free */
228  while (!KeTestSpinLock(&BootDriverLock));
229 
230  /* Raise IRQL to dispatch level */
232  }
233 
234  /* Acquire the lock */
237 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
UCHAR KIRQL
Definition: env_spec_w32.h:591
BOOLEAN FASTCALL KeTestSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:475
static KIRQL InbvOldIrql
Definition: inbv.c:37
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
VOID FASTCALL KiAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:287
VOID NTAPI KeRaiseIrql(KIRQL NewIrql, PKIRQL OldIrql)
Definition: spinlock.c:27
static KSPIN_LOCK BootDriverLock
Definition: inbv.c:36

Referenced by BootAnimTickProgressBar(), BootLogoFadeIn(), DisplayBootBitmap(), FinalizeBootLogo(), InbvBitBlt(), InbvDisplayString(), InbvEnableBootDriver(), InbvNotifyDisplayOwnershipLost(), InbvRotationThread(), and InbvSolidColorFill().

◆ InbvBitBlt()

VOID NTAPI InbvBitBlt ( _In_ PUCHAR  Buffer,
_In_ ULONG  X,
_In_ ULONG  Y 
)

Definition at line 530 of file inbv.c.

534 {
535  /* Check if we're installed and we own it */
538  {
539  /* Acquire the lock */
540  InbvAcquireLock();
541 
542  /* Do the blit */
543  VidBitBlt(Buffer, X, Y);
544 
545  /* Release the lock */
546  InbvReleaseLock();
547  }
548 }
#define Y(I)
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:241
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:219
Definition: bufpool.h:45
VOID NTAPI VidBitBlt(_In_ PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top)
Definition: common.c:470
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by BitBltPalette(), and PopShutdownHandler().

◆ InbvBufferToScreenBlt()

VOID NTAPI InbvBufferToScreenBlt ( _In_ PUCHAR  Buffer,
_In_ ULONG  X,
_In_ ULONG  Y,
_In_ ULONG  Width,
_In_ ULONG  Height,
_In_ ULONG  Delta 
)

Definition at line 552 of file inbv.c.

559 {
560  /* Check if we're installed and we own it */
563  {
564  /* Do the blit */
566  }
567 }
#define Y(I)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
Definition: bufpool.h:45
static ULONG Delta
Definition: xboxvideo.c:33
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
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:452
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by DisplayBootBitmap().

◆ InbvDriverInitialize()

BOOLEAN NTAPI InbvDriverInitialize ( _In_ PLOADER_PARAMETER_BLOCK  LoaderBlock,
_In_ ULONG  Count 
)

Definition at line 175 of file inbv.c.

178 {
179  PCHAR CommandLine;
180  BOOLEAN ResetMode = FALSE; // By default do not reset the video mode
181  ULONG i;
182 
183  /* Quit if we're already installed */
184  if (InbvBootDriverInstalled) return TRUE;
185 
186  /* Initialize the lock and check the current display state */
189  {
190  /* Reset the video mode in case we do not have a custom boot logo */
191  CommandLine = (LoaderBlock->LoadOptions ? _strupr(LoaderBlock->LoadOptions) : NULL);
192  ResetMode = (CommandLine == NULL) || (strstr(CommandLine, "BOOTLOGO") == NULL);
193  }
194 
195  /* Initialize the video */
198  {
199  /* Find bitmap resources in the kernel */
201  for (i = 1; i <= ResourceCount; i++)
202  {
203  /* Do the lookup */
204  ResourceList[i] = FindBitmapResource(LoaderBlock, i);
205  }
206 
207  /* Set the progress bar ranges */
208  InbvSetProgressBarSubset(0, 100);
209 
210  // BootAnimInitialize(LoaderBlock, Count);
211  }
212 
213  /* Return install state */
215 }
signed char * PCHAR
Definition: retypes.h:7
#define TRUE
Definition: types.h:120
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:304
static PVOID FindBitmapResource(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock, _In_ ULONG ResourceId)
Definition: inbv.c:97
#define FALSE
Definition: types.h:117
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:240
unsigned char BOOLEAN
int Count
Definition: noreturn.cpp:7
VOID NTAPI InbvSetProgressBarSubset(_In_ ULONG Floor, _In_ ULONG Ceiling)
Specifies a progress percentage sub-range. Further calls to InbvIndicateProgress() or InbvUpdateProgr...
Definition: inbv.c:663
static ULONG ResourceCount
Definition: inbv.c:50
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
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
BOOLEAN NTAPI VidInitialize(_In_ BOOLEAN SetMode)
Definition: bootvid.c:184
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
unsigned int ULONG
Definition: retypes.h:1
static KSPIN_LOCK BootDriverLock
Definition: inbv.c:36
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by Phase1InitializationDiscard().

◆ InbvGetDisplayState()

INBV_DISPLAY_STATE NTAPI InbvGetDisplayState ( VOID  )

Definition at line 323 of file inbv.c.

324 {
325  /* Return the actual state */
326  return InbvDisplayState;
327 }
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38

Referenced by BootAnimTickProgressBar(), BootLogoFadeIn(), FinalizeBootLogo(), and InbvRotationThread().

◆ InbvGetResourceAddress()

PUCHAR NTAPI InbvGetResourceAddress ( _In_ ULONG  ResourceNumber)

Definition at line 162 of file inbv.c.

164 {
165  /* Validate the resource number */
166  if (ResourceNumber > ResourceCount) return NULL;
167 
168  /* Return the address */
169  return ResourceList[ResourceNumber];
170 }
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:304
static ULONG ResourceCount
Definition: inbv.c:50
#define NULL
Definition: types.h:112

Referenced by DisplayBootBitmap(), and PopShutdownHandler().

◆ InbvIndicateProgress()

VOID NTAPI InbvIndicateProgress ( VOID  )

Gives some progress feedback, without specifying any explicit number of progress steps or percentage. The corresponding percentage is derived from the progress indicator's current count, capped to the number of expected calls to be made to this function (default: 25, see InbvProgressIndicator.Expected).

Returns
None.

Definition at line 625 of file inbv.c.

626 {
627  ULONG Percentage;
628 
629  /* Increase progress */
631 
632  /* Compute the new percentage - Don't go over 100% */
633  Percentage = 100 * InbvProgressIndicator.Count /
635  Percentage = min(Percentage, 99);
636 
637  if (Percentage != InbvProgressIndicator.Percentage)
638  {
639  /* Percentage has changed, update the progress bar */
640  InbvProgressIndicator.Percentage = Percentage;
641  InbvUpdateProgressBar(Percentage);
642  }
643 }
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:689
#define min(a, b)
Definition: monoChain.cc:55
unsigned int ULONG
Definition: retypes.h:1

Referenced by IopInitializeBuiltinDriver(), and IopInitializeSystemDrivers().

◆ InbvPortEnableFifo()

VOID NTAPI InbvPortEnableFifo ( IN ULONG  PortId,
IN BOOLEAN  Enable 
)

Definition at line 56 of file inbvport.c.

58 {
59  /* Set FIFO as requested */
60  CpEnableFifo(Port[PortId].Address, Enable);
61 }
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
static WCHAR Address[46]
Definition: ping.c:68
VOID NTAPI CpEnableFifo(IN PUCHAR Address, IN BOOLEAN Enable)
Definition: cport.c:51
CPPORT Port[4]
Definition: inbvport.c:16

Referenced by HdlspEnableTerminal().

◆ InbvPortGetByte()

BOOLEAN NTAPI InbvPortGetByte ( IN ULONG  PortId,
OUT PUCHAR  Byte 
)

Definition at line 38 of file inbvport.c.

40 {
41  /* Read a byte from the port */
42  return CpGetByte(&Port[PortId], Byte, TRUE, FALSE) == CP_GET_SUCCESS;
43 }
#define TRUE
Definition: types.h:120
USHORT NTAPI CpGetByte(IN PCPPORT Port, OUT PUCHAR Byte, IN BOOLEAN Wait, IN BOOLEAN Poll)
Definition: cport.c:253
#define FALSE
Definition: types.h:117
CPPORT Port[4]
Definition: inbvport.c:16
#define CP_GET_SUCCESS
Definition: cportlib.h:18
unsigned char Byte
Definition: zlib.h:37

Referenced by HdlspDispatch().

◆ InbvPortInitialize()

BOOLEAN NTAPI InbvPortInitialize ( IN ULONG  BaudRate,
IN ULONG  PortNumber,
IN PUCHAR  PortAddress,
OUT PULONG  PortId,
IN BOOLEAN  IsMMIODevice 
)

Definition at line 73 of file inbvport.c.

78 {
79  /* Not yet supported */
80  ASSERT(IsMMIODevice == FALSE);
81 
82 #if defined(SARCH_PC98)
83  /* Set default baud rate */
84  if (BaudRate == 0) BaudRate = 9600;
85 
86  /* Check if port or address given */
87  if (PortNumber)
88  {
89  /* Pick correct address for port */
90  if (!PortAddress)
91  {
92  if (PortNumber == 1)
93  {
94  PortAddress = (PUCHAR)0x30;
95  }
96  else
97  {
98  PortAddress = (PUCHAR)0x238;
99  PortNumber = 2;
100  }
101  }
102  }
103  else
104  {
105  /* Pick correct port for address */
106  PortAddress = (PUCHAR)0x30;
107  if (CpDoesPortExist(PortAddress))
108  {
109  PortNumber = 1;
110  }
111  else
112  {
113  PortAddress = (PUCHAR)0x238;
114  if (!CpDoesPortExist(PortAddress))
115  return FALSE;
116 
117  PortNumber = 2;
118  }
119  }
120 #else
121  /* Set default baud rate */
122  if (BaudRate == 0) BaudRate = 19200;
123 
124  /* Check if port or address given */
125  if (PortNumber)
126  {
127  /* Pick correct address for port */
128  if (!PortAddress)
129  {
130  switch (PortNumber)
131  {
132  case 1:
133  PortAddress = (PUCHAR)0x3F8;
134  break;
135 
136  case 2:
137  PortAddress = (PUCHAR)0x2F8;
138  break;
139 
140  case 3:
141  PortAddress = (PUCHAR)0x3E8;
142  break;
143 
144  default:
145  PortNumber = 4;
146  PortAddress = (PUCHAR)0x2E8;
147  }
148  }
149  }
150  else
151  {
152  /* Pick correct port for address */
153  PortAddress = (PUCHAR)0x2F8;
154  if (CpDoesPortExist(PortAddress))
155  {
156  PortNumber = 2;
157  }
158  else
159  {
160  PortAddress = (PUCHAR)0x3F8;
161  if (!CpDoesPortExist(PortAddress)) return FALSE;
162  PortNumber = 1;
163  }
164  }
165 #endif
166 
167  /* Initialize the port unless it's already up, and then return it */
168  if (Port[PortNumber - 1].Address) return FALSE;
169 
170  CpInitialize(&Port[PortNumber - 1], PortAddress, BaudRate);
171  *PortId = PortNumber - 1;
172 
173  return TRUE;
174 }
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
BOOLEAN NTAPI CpDoesPortExist(IN PUCHAR Address)
Definition: cport.c:224
#define FALSE
Definition: types.h:117
ULONG PortNumber
Definition: storport.c:18
static WCHAR Address[46]
Definition: ping.c:68
#define ASSERT(a)
Definition: mode.c:44
CPPORT Port[4]
Definition: inbvport.c:16
NTSTATUS NTAPI CpInitialize(IN PCPPORT Port, IN PUCHAR Address, IN ULONG BaudRate)
Definition: cport.c:85

Referenced by HdlspEnableTerminal().

◆ InbvPortPollOnly()

BOOLEAN NTAPI InbvPortPollOnly ( IN ULONG  PortId)

Definition at line 28 of file inbvport.c.

29 {
30  UCHAR Dummy;
31 
32  /* Poll a byte from the port */
33  return CpGetByte(&Port[PortId], &Dummy, FALSE, TRUE) == CP_GET_SUCCESS;
34 }
#define TRUE
Definition: types.h:120
USHORT NTAPI CpGetByte(IN PCPPORT Port, OUT PUCHAR Byte, IN BOOLEAN Wait, IN BOOLEAN Poll)
Definition: cport.c:253
#define FALSE
Definition: types.h:117
unsigned char UCHAR
Definition: xmlstorage.h:181
CPPORT Port[4]
Definition: inbvport.c:16
#define CP_GET_SUCCESS
Definition: cportlib.h:18

Referenced by HdlspDispatch().

◆ InbvPortPutByte()

VOID NTAPI InbvPortPutByte ( IN ULONG  PortId,
IN UCHAR  Byte 
)

Definition at line 47 of file inbvport.c.

49 {
50  /* Send the byte */
51  CpPutByte(&Port[PortId], Byte);
52 }
VOID NTAPI CpPutByte(IN PCPPORT Port, IN UCHAR Byte)
Definition: cport.c:303
CPPORT Port[4]
Definition: inbvport.c:16
unsigned char Byte
Definition: zlib.h:37

Referenced by HdlspPutData(), and HdlspSendStringAtBaud().

◆ InbvPortTerminate()

VOID NTAPI InbvPortTerminate ( IN ULONG  PortId)

Definition at line 65 of file inbvport.c.

66 {
67  /* The port is now available */
68  Port[PortId].Address = NULL;
69 }
CPPORT Port[4]
Definition: inbvport.c:16
PUCHAR Address
Definition: cportlib.h:29
#define NULL
Definition: types.h:112

Referenced by HdlspEnableTerminal().

◆ InbvReleaseLock()

VOID NTAPI InbvReleaseLock ( VOID  )

Definition at line 241 of file inbv.c.

242 {
243  KIRQL OldIrql;
244 
245  /* Capture the old IRQL */
247 
248  /* Release the driver lock */
250 
251  /* If we were at dispatch level or lower, restore the old IRQL */
253 }
UCHAR KIRQL
Definition: env_spec_w32.h:591
static KIRQL InbvOldIrql
Definition: inbv.c:37
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
VOID FASTCALL KiReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:298
static KSPIN_LOCK BootDriverLock
Definition: inbv.c:36
VOID NTAPI KeLowerIrql(KIRQL NewIrql)
Definition: spinlock.c:39

Referenced by BootAnimTickProgressBar(), BootLogoFadeIn(), DisplayBootBitmap(), FinalizeBootLogo(), InbvBitBlt(), InbvDisplayString(), InbvEnableBootDriver(), InbvNotifyDisplayOwnershipLost(), InbvRotationThread(), and InbvSolidColorFill().

◆ InbvScreenToBufferBlt()

VOID NTAPI InbvScreenToBufferBlt ( _Out_ PUCHAR  Buffer,
_In_ ULONG  X,
_In_ ULONG  Y,
_In_ ULONG  Width,
_In_ ULONG  Height,
_In_ ULONG  Delta 
)

Definition at line 571 of file inbv.c.

578 {
579  /* Check if we're installed and we own it */
582  {
583  /* Do the blit */
585  }
586 }
#define Y(I)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
Definition: bufpool.h:45
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:257
static ULONG Delta
Definition: xboxvideo.c:33
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by DisplayBootBitmap().

◆ InbvSetProgressBarCoordinates()

VOID NTAPI InbvSetProgressBarCoordinates ( _In_ ULONG  Left,
_In_ ULONG  Top 
)

Sets the screen coordinates of the loading progress bar and enable it.

Parameters
[in]Left
[in]TopThe left/top coordinates.
Returns
None.

Definition at line 600 of file inbv.c.

603 {
604  /* Update the coordinates */
605  ProgressBarLeft = Left;
607 
608  /* Enable the progress bar */
610 }
#define TRUE
Definition: types.h:120
ULONG ProgressBarLeft
Definition: inbv.c:45
ULONG ProgressBarTop
Definition: inbv.c:45
static LPHIST_ENTRY Top
Definition: history.c:53
BOOLEAN ShowProgressBar
Definition: inbv.c:46

Referenced by DisplayBootBitmap().

◆ InbvSetProgressBarSubset()

VOID NTAPI InbvSetProgressBarSubset ( _In_ ULONG  Floor,
_In_ ULONG  Ceiling 
)

Specifies a progress percentage sub-range. Further calls to InbvIndicateProgress() or InbvUpdateProgressBar() will update the progress percentage relative to this sub-range. In particular, the percentage provided to InbvUpdateProgressBar() is relative to this sub-range.

Parameters
[in]FloorThe lower bound percentage of the sub-range (default: 0).
[in]CeilingThe upper bound percentage of the sub-range (default: 100).
Returns
None.

Definition at line 663 of file inbv.c.

666 {
667  /* Sanity checks */
668  ASSERT(Floor < Ceiling);
669  ASSERT(Ceiling <= 100);
670 
671  /* Update the progress bar state */
672  InbvProgressState.Floor = Floor * 100;
673  InbvProgressState.Ceiling = Ceiling * 100;
674  InbvProgressState.Bias = Ceiling - Floor;
675 }
static INBV_PROGRESS_STATE InbvProgressState
Definition: inbv.c:47
#define ASSERT(a)
Definition: mode.c:44

Referenced by BootAnimInitialize(), InbvDriverInitialize(), and Phase1InitializationDiscard().

◆ InbvUpdateProgressBar()

VOID NTAPI InbvUpdateProgressBar ( _In_ ULONG  Percentage)

Updates the progress bar percentage, relative to the current percentage sub-range previously set by InbvSetProgressBarSubset().

Parameters
[in]PercentageThe progress percentage, relative to the current sub-range.
Returns
None.

Definition at line 689 of file inbv.c.

691 {
692  ULONG TotalProgress;
693 
694  /* Make sure the progress bar is enabled, that we own and are installed */
695  if (ShowProgressBar &&
698  {
699  /* Compute the total progress and tick the progress bar */
700  TotalProgress = InbvProgressState.Floor + (Percentage * InbvProgressState.Bias);
701  // TotalProgress /= (100 * 100);
702 
703  BootAnimTickProgressBar(TotalProgress);
704  }
705 }
static INBV_PROGRESS_STATE InbvProgressState
Definition: inbv.c:47
VOID NTAPI BootAnimTickProgressBar(_In_ ULONG SubPercentTimes100)
Ticks the progress bar. Used by InbvUpdateProgressBar() and related.
Definition: bootanim.c:312
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
unsigned int ULONG
Definition: retypes.h:1
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
BOOLEAN ShowProgressBar
Definition: inbv.c:46

Referenced by InbvIndicateProgress(), and Phase1InitializationDiscard().

Variable Documentation

◆ InbvBootDriverInstalled