ReactOS 0.4.16-dev-981-g80eb313
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 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_ PCHAR  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 */
342 if (!InbvDisplayDebugStrings) return TRUE;
343
344 /* Check if a filter is installed */
346
347 /* Acquire the lock */
349
350 /* Make sure we're installed and display the string */
352
353 /* Print the string on the EMS port */
355 String,
356 strlen(String) + sizeof(ANSI_NULL),
357 NULL,
358 NULL);
359
360 /* Release the lock */
362
363 /* All done */
364 return TRUE;
365 }
366
367 /* We don't own it, fail */
368 return FALSE;
369}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
VOID NTAPI VidDisplayString(_In_z_ PUCHAR String)
Definition: common.c:375
@ 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
unsigned char * PUCHAR
Definition: typedefs.h:53
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433

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:239
@ 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 373 of file inbv.c.

375{
376 BOOLEAN OldSetting;
377
378 /* Get the old setting */
379 OldSetting = InbvDisplayDebugStrings;
380
381 /* Update it */
383
384 /* Return the old setting */
385 return OldSetting;
386}
unsigned char BOOLEAN

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

◆ InbvInstallDisplayStringFilter()

VOID NTAPI InbvInstallDisplayStringFilter ( _In_ INBV_DISPLAY_STRING_FILTER  DisplayFilter)

Definition at line 390 of file inbv.c.

392{
393 /* Save the filter */
395}
static VOID NTAPI DisplayFilter(_Inout_ PCHAR *String)
Definition: bootanim.c:454

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

◆ InbvIsBootDriverInstalled()

BOOLEAN NTAPI InbvIsBootDriverInstalled ( VOID  )

Definition at line 399 of file inbv.c.

400{
401 /* Return driver state */
403}

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

◆ InbvNotifyDisplayOwnershipLost()

VOID NTAPI InbvNotifyDisplayOwnershipLost ( _In_ INBV_RESET_DISPLAY_PARAMETERS  Callback)

Definition at line 407 of file inbv.c.

409{
410 /* Check if we're installed */
412 {
413 /* Acquire the lock and cleanup if we own the screen */
416
417 /* Set the reset callback and display state */
420
421 /* Release the lock */
423 }
424 else
425 {
426 /* Set the reset callback and display state */
429 }
430}
_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 434 of file inbv.c.

435{
436 /* Check if we're installed and we own it */
439 {
440 /* Do the reset */
442 return TRUE;
443 }
444
445 /* Nothing to reset */
446 return FALSE;
447}
VOID NTAPI VidResetDisplay(_In_ BOOLEAN HalReset)
Definition: bootvid.c:216

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

456{
457 /* Just call bootvid */
458 VidSetScrollRegion(Left, Top, Right, Bottom);
459}
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: common.c:352

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

◆ InbvSetTextColor()

VOID NTAPI InbvSetTextColor ( _In_ ULONG  Color)

Definition at line 463 of file inbv.c.

465{
466 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
467
468 /* Set color for EMS port */
469#ifdef INBV_HEADLESS_COLORS
470 InbvTerminalTextColor = 30 + CGA_TO_ANSI_COLOR(Color);
471#else
473#endif
474 HeadlessSetColor.TextColor = InbvTerminalTextColor;
475 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
477 &HeadlessSetColor,
478 sizeof(HeadlessSetColor),
479 NULL,
480 NULL);
481
482 /* Update the text color */
484}
ULONG NTAPI VidSetTextColor(_In_ ULONG Color)
Definition: common.c:315
@ 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 488 of file inbv.c.

494{
495 HEADLESS_CMD_SET_COLOR HeadlessSetColor;
496
497 /* Make sure we own it */
499 {
500 /* Acquire the lock */
502
503 /* Check if we're installed */
505 {
506 /* Call bootvid */
507 VidSolidColorFill(Left, Top, Right, Bottom, (UCHAR)Color);
508 }
509
510 /* Set color for EMS port and clear display */
511#ifdef INBV_HEADLESS_COLORS
512 InbvTerminalBkgdColor = 40 + CGA_TO_ANSI_COLOR(Color);
513#else
515#endif
516 HeadlessSetColor.TextColor = InbvTerminalTextColor;
517 HeadlessSetColor.BkgdColor = InbvTerminalBkgdColor;
519 &HeadlessSetColor,
520 sizeof(HeadlessSetColor),
521 NULL,
522 NULL);
524 NULL, 0,
525 NULL, NULL);
526
527 /* Release the lock */
529 }
530}
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: bootvid.c:261
@ HeadlessCmdClearDisplay
Definition: hdl.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181

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