ReactOS  0.4.15-dev-4610-g11e0ed3
inbvfuncs.h File Reference
#include <umtypes.h>
#include <inbvtypes.h>
#include <section_attribs.h>
Include dependency graph for inbvfuncs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID NTAPI InbvAcquireDisplayOwnership (VOID)
 
BOOLEAN NTAPI InbvCheckDisplayOwnership (VOID)
 
VOID NTAPI InbvNotifyDisplayOwnershipLost (_In_ INBV_RESET_DISPLAY_PARAMETERS Callback)
 
VOID NTAPI InbvEnableBootDriver (_In_ BOOLEAN Enable)
 
VOID NTAPI InbvInstallDisplayStringFilter (_In_ INBV_DISPLAY_STRING_FILTER DisplayFilter)
 
BOOLEAN NTAPI InbvIsBootDriverInstalled (VOID)
 
BOOLEAN NTAPI InbvDisplayString (_In_ PCHAR String)
 
BOOLEAN NTAPI InbvEnableDisplayString (_In_ BOOLEAN Enable)
 
BOOLEAN NTAPI InbvResetDisplay (VOID)
 
VOID NTAPI InbvSetScrollRegion (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
 
VOID NTAPI InbvSetTextColor (_In_ ULONG Color)
 
VOID NTAPI InbvSolidColorFill (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ ULONG Color)
 

Function Documentation

◆ InbvAcquireDisplayOwnership()

VOID NTAPI InbvAcquireDisplayOwnership ( VOID  )

Definition at line 289 of file inbv.c.

290 {
291  /* Check if we have a callback and we're just acquiring it now */
294  {
295  /* Call the callback */
297  }
298 
299  /* Acquire the display */
301 }
static INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters
Definition: inbv.c:40
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38

Referenced by HalHandleNMI(), HalReturnToFirmware(), KdpScreenAcquire(), KiDisplayBlueScreen(), and PopShutdownHandler().

◆ InbvCheckDisplayOwnership()

BOOLEAN NTAPI InbvCheckDisplayOwnership ( VOID  )

Definition at line 315 of file inbv.c.

316 {
317  /* Return if we own it or not */
319 }
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38

Referenced by InbvMonitorThread(), KdpScreenRelease(), and PopShutdownHandler().

◆ InbvDisplayString()

BOOLEAN NTAPI InbvDisplayString ( _In_ PCHAR  String)

Definition at line 331 of file inbv.c.

333 {
334  /* Make sure we own the display */
336  {
337  /* If we're not allowed, return success anyway */
338  if (!InbvDisplayDebugStrings) return TRUE;
339 
340  /* Check if a filter is installed */
342 
343  /* Acquire the lock */
344  InbvAcquireLock();
345 
346  /* Make sure we're installed and display the string */
348 
349  /* Print the string on the EMS port */
351  String,
352  strlen(String) + sizeof(ANSI_NULL),
353  NULL,
354  NULL);
355 
356  /* Release the lock */
357  InbvReleaseLock();
358 
359  /* All done */
360  return TRUE;
361  }
362 
363  /* We don't own it, fail */
364  return FALSE;
365 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
VOID NTAPI VidDisplayString(_In_z_ PUCHAR String)
Definition: common.c:374
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
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:241
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#define FALSE
Definition: types.h:117
#define ANSI_NULL
static BOOLEAN InbvDisplayDebugStrings
Definition: inbv.c:42
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:219
static INBV_DISPLAY_STRING_FILTER InbvDisplayFilter
Definition: inbv.c:43
#define NULL
Definition: types.h:112
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by HalDisplayString(), HalHandleNMI(), KeBugCheckWithTf(), KeGetBugMessageText(), KiDisplayBlueScreen(), KiDumpParameterImages(), NtDisplayString(), Phase1InitializationDiscard(), and PopShutdownHandler().

◆ InbvEnableBootDriver()

VOID NTAPI InbvEnableBootDriver ( _In_ BOOLEAN  Enable)

Definition at line 257 of file inbv.c.

259 {
260  /* Check if we're installed */
262  {
263  /* Check for lost state */
265 
266  /* Acquire the lock */
267  InbvAcquireLock();
268 
269  /* Cleanup the screen if we own it */
271 
272  /* Set the new display state */
275 
276  /* Release the lock */
277  InbvReleaseLock();
278  }
279  else
280  {
281  /* Set the new display state */
284  }
285 }
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:241
VOID NTAPI VidCleanUp(VOID)
Definition: bootvid.c:246
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:219
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by Phase1InitializationDiscard().

◆ InbvEnableDisplayString()

BOOLEAN NTAPI InbvEnableDisplayString ( _In_ BOOLEAN  Enable)

Definition at line 369 of file inbv.c.

371 {
372  BOOLEAN OldSetting;
373 
374  /* Get the old setting */
375  OldSetting = InbvDisplayDebugStrings;
376 
377  /* Update it */
379 
380  /* Return the old setting */
381  return OldSetting;
382 }
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
unsigned char BOOLEAN
static BOOLEAN InbvDisplayDebugStrings
Definition: inbv.c:42

Referenced by HalHandleNMI(), KdpScreenAcquire(), KiDisplayBlueScreen(), Phase1InitializationDiscard(), and PopShutdownHandler().

◆ InbvInstallDisplayStringFilter()

VOID NTAPI InbvInstallDisplayStringFilter ( _In_ INBV_DISPLAY_STRING_FILTER  DisplayFilter)

Definition at line 386 of file inbv.c.

388 {
389  /* Save the filter */
391 }
static VOID NTAPI DisplayFilter(_Inout_ PCHAR *String)
Definition: bootanim.c:446
static INBV_DISPLAY_STRING_FILTER InbvDisplayFilter
Definition: inbv.c:43

Referenced by DisplayBootBitmap(), DisplayFilter(), HalHandleNMI(), KdpScreenAcquire(), and KiDisplayBlueScreen().

◆ InbvIsBootDriverInstalled()

BOOLEAN NTAPI InbvIsBootDriverInstalled ( VOID  )

Definition at line 395 of file inbv.c.

396 {
397  /* Return driver state */
399 }
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by HalHandleNMI(), KdpScreenAcquire(), KdpScreenRelease(), KiDisplayBlueScreen(), and PopShutdownHandler().

◆ InbvNotifyDisplayOwnershipLost()

VOID NTAPI InbvNotifyDisplayOwnershipLost ( _In_ INBV_RESET_DISPLAY_PARAMETERS  Callback)

Definition at line 403 of file inbv.c.

405 {
406  /* Check if we're installed */
408  {
409  /* Acquire the lock and cleanup if we own the screen */
410  InbvAcquireLock();
412 
413  /* Set the reset callback and display state */
416 
417  /* Release the lock */
418  InbvReleaseLock();
419  }
420  else
421  {
422  /* Set the reset callback and display state */
425  }
426 }
static INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters
Definition: inbv.c:40
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:241
VOID NTAPI VidCleanUp(VOID)
Definition: bootvid.c:246
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:219
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:456
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by InbvMonitorThread(), IntVideoPortInbvCleanup(), IntVideoPortInbvInitialize(), KdpScreenRelease(), Phase1InitializationDiscard(), ScrInbvCleanup(), and ScrInbvInitialize().

◆ InbvResetDisplay()

BOOLEAN NTAPI InbvResetDisplay ( VOID  )

Definition at line 430 of file inbv.c.

431 {
432  /* Check if we're installed and we own it */
435  {
436  /* Do the reset */
438  return TRUE;
439  }
440 
441  /* Nothing to reset */
442  return FALSE;
443 }
#define TRUE
Definition: types.h:120
VOID NTAPI VidResetDisplay(_In_ BOOLEAN HalReset)
Definition: bootvid.c:220
#define FALSE
Definition: types.h:117
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39

Referenced by HalHandleNMI(), KdpScreenAcquire(), KiDisplayBlueScreen(), and PopShutdownHandler().

◆ InbvSetScrollRegion()

VOID NTAPI InbvSetScrollRegion ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom 
)

Definition at line 447 of file inbv.c.

452 {
453  /* Just call bootvid */
454  VidSetScrollRegion(Left, Top, Right, Bottom);
455 }
static LPHIST_ENTRY Bottom
Definition: history.c:54
VOID NTAPI VidSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: common.c:348
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by DisplayBootBitmap(), HalHandleNMI(), KdpScreenAcquire(), KiDisplayBlueScreen(), and PopShutdownHandler().

◆ InbvSetTextColor()

VOID NTAPI InbvSetTextColor ( _In_ ULONG  Color)

Definition at line 459 of file inbv.c.

461 {
462  HEADLESS_CMD_SET_COLOR HeadlessSetColor;
463 
464  /* Set color for EMS port */
465 #ifdef INBV_HEADLESS_COLORS
466  InbvTerminalTextColor = 30 + CGA_TO_ANSI_COLOR(Color);
467 #else
469 #endif
470  HeadlessSetColor.TextColor = InbvTerminalTextColor;
471  HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
473  &HeadlessSetColor,
474  sizeof(HeadlessSetColor),
475  NULL,
476  NULL);
477 
478  /* Update the text color */
480 }
static ULONG InbvTerminalTextColor
Definition: inbv.c:88
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
ULONG NTAPI VidSetTextColor(_In_ ULONG Color)
Definition: common.c:311
#define NULL
Definition: types.h:112
static ULONG InbvTerminalBkgdColor
Definition: inbv.c:89

Referenced by DisplayBootBitmap(), HalHandleNMI(), KdpScreenAcquire(), and KiDisplayBlueScreen().

◆ InbvSolidColorFill()

VOID NTAPI InbvSolidColorFill ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ ULONG  Color 
)

Definition at line 484 of file inbv.c.

490 {
491  HEADLESS_CMD_SET_COLOR HeadlessSetColor;
492 
493  /* Make sure we own it */
495  {
496  /* Acquire the lock */
497  InbvAcquireLock();
498 
499  /* Check if we're installed */
501  {
502  /* Call bootvid */
503  VidSolidColorFill(Left, Top, Right, Bottom, (UCHAR)Color);
504  }
505 
506  /* Set color for EMS port and clear display */
507 #ifdef INBV_HEADLESS_COLORS
508  InbvTerminalBkgdColor = 40 + CGA_TO_ANSI_COLOR(Color);
509 #else
511 #endif
512  HeadlessSetColor.TextColor = InbvTerminalTextColor;
513  HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
515  &HeadlessSetColor,
516  sizeof(HeadlessSetColor),
517  NULL,
518  NULL);
520  NULL, 0,
521  NULL, NULL);
522 
523  /* Release the lock */
524  InbvReleaseLock();
525  }
526 }
static ULONG InbvTerminalTextColor
Definition: inbv.c:88
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
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:241
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:219
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: bootvid.c:274
unsigned char UCHAR
Definition: xmlstorage.h:181
static LPHIST_ENTRY Bottom
Definition: history.c:54
#define NULL
Definition: types.h:112
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
static ULONG InbvTerminalBkgdColor
Definition: inbv.c:89
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by DisplayBootBitmap(), HalHandleNMI(), KdpScreenAcquire(), KiDisplayBlueScreen(), and PopShutdownHandler().