ReactOS 0.4.16-dev-2104-gb84fa49
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_ PCSTR 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 293 of file inbv.c.

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}
static INBV_DISPLAY_STATE InbvDisplayState
Definition: inbv.c:38
static INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters
Definition: inbv.c:40
@ INBV_DISPLAY_STATE_OWNED
Definition: inbvtypes.h:33
@ INBV_DISPLAY_STATE_LOST
Definition: inbvtypes.h:35

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

◆ InbvCheckDisplayOwnership()

BOOLEAN NTAPI InbvCheckDisplayOwnership ( VOID  )

Definition at line 319 of file inbv.c.

320{
321 /* Return if we own it or not */
323}

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

◆ InbvDisplayString()

BOOLEAN NTAPI InbvDisplayString ( _In_ PCSTR  String)

Definition at line 335 of file inbv.c.

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}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
VOID NTAPI VidDisplayString(_In_ PCSTR String)
Definition: console.c:98
@ HeadlessCmdPutString
Definition: hdl.h:131
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
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:223
static INBV_DISPLAY_STRING_FILTER InbvDisplayFilter
Definition: inbv.c:43
static BOOLEAN InbvDisplayDebugStrings
Definition: inbv.c:42
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:245
#define ANSI_NULL
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439

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

◆ InbvEnableBootDriver()

VOID NTAPI InbvEnableBootDriver ( _In_ BOOLEAN  Enable)

Definition at line 261 of file inbv.c.

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}
VOID NTAPI VidCleanUp(VOID)
Definition: bootvid.c:276
@ INBV_DISPLAY_STATE_DISABLED
Definition: inbvtypes.h:34
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142

Referenced by Phase1InitializationDiscard().

◆ InbvEnableDisplayString()

BOOLEAN NTAPI InbvEnableDisplayString ( _In_ BOOLEAN  Enable)

Definition at line 376 of file inbv.c.

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}
unsigned char BOOLEAN

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

◆ InbvInstallDisplayStringFilter()

VOID NTAPI InbvInstallDisplayStringFilter ( _In_ INBV_DISPLAY_STRING_FILTER  DisplayFilter)

Definition at line 393 of file inbv.c.

395{
396 /* Save the filter */
398}
static VOID NTAPI DisplayFilter(_Inout_ PCSTR *String)
Definition: bootanim.c:454

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

◆ InbvIsBootDriverInstalled()

BOOLEAN NTAPI InbvIsBootDriverInstalled ( VOID  )

Definition at line 402 of file inbv.c.

403{
404 /* Return driver state */
406}

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

◆ InbvNotifyDisplayOwnershipLost()

VOID NTAPI InbvNotifyDisplayOwnershipLost ( _In_ INBV_RESET_DISPLAY_PARAMETERS  Callback)

Definition at line 410 of file inbv.c.

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}
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458

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

◆ InbvResetDisplay()

BOOLEAN NTAPI InbvResetDisplay ( VOID  )

Definition at line 437 of file inbv.c.

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}
VOID NTAPI VidResetDisplay(_In_ BOOLEAN SetMode)
Definition: console.c:25

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 454 of file inbv.c.

459{
460 /* Just call bootvid */
461 VidSetScrollRegion(Left, Top, Right, Bottom);
462}
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
VOID NTAPI VidSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: console.c:51

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

◆ InbvSetTextColor()

VOID NTAPI InbvSetTextColor ( _In_ ULONG  Color)

Definition at line 466 of file inbv.c.

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}
ULONG NTAPI VidSetTextColor(_In_ ULONG Color)
Definition: console.c:38
@ HeadlessCmdSetColor
Definition: hdl.h:137
static ULONG InbvTerminalBkgdColor
Definition: inbv.c:89
static ULONG InbvTerminalTextColor
Definition: inbv.c:88

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 491 of file inbv.c.

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}
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: bootvid.c:298
@ HeadlessCmdClearDisplay
Definition: hdl.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181

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