ReactOS 0.4.15-dev-7942-gd23573b
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 290 of file inbv.c.

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

317{
318 /* Return if we own it or not */
320}

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

◆ InbvDisplayString()

BOOLEAN NTAPI InbvDisplayString ( _In_ PCHAR  String)

Definition at line 332 of file inbv.c.

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}
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:570
BOOLEAN InbvBootDriverInstalled
Definition: inbv.c:39
VOID NTAPI InbvAcquireLock(VOID)
Definition: inbv.c:220
static INBV_DISPLAY_STRING_FILTER InbvDisplayFilter
Definition: inbv.c:43
static BOOLEAN InbvDisplayDebugStrings
Definition: inbv.c:42
VOID NTAPI InbvReleaseLock(VOID)
Definition: inbv.c:242
#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 258 of file inbv.c.

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

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

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

◆ InbvInstallDisplayStringFilter()

VOID NTAPI InbvInstallDisplayStringFilter ( _In_ INBV_DISPLAY_STRING_FILTER  DisplayFilter)

Definition at line 387 of file inbv.c.

389{
390 /* Save the filter */
392}
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 396 of file inbv.c.

397{
398 /* Return driver state */
400}

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

◆ InbvNotifyDisplayOwnershipLost()

VOID NTAPI InbvNotifyDisplayOwnershipLost ( _In_ INBV_RESET_DISPLAY_PARAMETERS  Callback)

Definition at line 404 of file inbv.c.

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}
_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 431 of file inbv.c.

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

453{
454 /* Just call bootvid */
455 VidSetScrollRegion(Left, Top, Right, Bottom);
456}
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 460 of file inbv.c.

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

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}
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().