reactos/ntoskrnl/include/internal/inbv.h

151 lines
2 KiB
C
Raw Normal View History

/*
* PROJECT: ReactOS Kernel
* LICENSE: BSD - See COPYING.ARM in the top level directory
* PURPOSE: Boot Video Driver support header
* COPYRIGHT: Copyright 2007 Alex Ionescu (alex.ionescu@reactos.org)
* Copyright 2019-2022 Hermès Bélusca-Maïto
*/
#pragma once
/* Native definitions from BOOTVID (Boot Video Driver) */
#include "bootvid/bootvid.h"
//
// Driver Initialization
//
CODE_SEG("INIT")
BOOLEAN
NTAPI
InbvDriverInitialize(
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
_In_ ULONG Count
);
extern BOOLEAN InbvBootDriverInstalled;
INBV_DISPLAY_STATE
NTAPI
InbvGetDisplayState(VOID);
VOID
NTAPI
InbvAcquireLock(VOID);
VOID
NTAPI
InbvReleaseLock(VOID);
PUCHAR
NTAPI
InbvGetResourceAddress(
_In_ ULONG ResourceNumber
);
//
// Display Functions
//
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
);
//
// Progress-Bar Functions
//
VOID
NTAPI
InbvSetProgressBarCoordinates(
_In_ ULONG Left,
_In_ ULONG Top
);
CODE_SEG("INIT")
VOID
Patch for better boot logo/progress bar, fixed /SOS (debug) boot screen/output, removal of "funny" shutdown messages, addition of shutdown logo/screen, and misc: [NTOS]: Add missing InbvIndicateProgress routine to update the progress bar while drivers are loading. Make boot and system driver initialization call it for each new driver. This updates the progress bar in the 25-75% range which was defined prior to IoInitSystem. [NTOS]: Fix InbvUpdateProgressBar code to correctly handle the floor and ceiling. [NTOS]: Remove shutdown "funny messages", do correct shutdown (should fix the ACPI shutdown issues) procedure. Display the shutdown screen on systems without ACPI (just like Windows does). [NTOS]: Add a resource header with IDB_ definitions for all the embedded bitmaps, instead of using magic numbers and guessing which is which. [NTOS]: Fix the boot logo initialization code as it was all wrong. 5 is the logo to be used during shutdown, for example, not the full logo background (which is supposed to be in 1, with a special palette that's faded in). Also handle server vs workstation scenarios. [NTOS]: Booting in the new WinNT mode now correctly displays the blue background screen when in debug (/SOS) mode, and the header/footer also has the correct color, as does the separator band. [DDK]: Add missing SUITE_TYPE definitions. [NTOS]: Remove logo files that are simply not needed for ReactOS (Compute Cluster Edition, Tablet PC, etc...) [NTOS]: Fix logo files (mostly) to have correct palettes. Note that 1.bmp is still quite different from Windows (no fade). svn path=/trunk/; revision=45822
2010-03-04 06:26:11 +00:00
NTAPI
InbvIndicateProgress(VOID);
Patch for better boot logo/progress bar, fixed /SOS (debug) boot screen/output, removal of "funny" shutdown messages, addition of shutdown logo/screen, and misc: [NTOS]: Add missing InbvIndicateProgress routine to update the progress bar while drivers are loading. Make boot and system driver initialization call it for each new driver. This updates the progress bar in the 25-75% range which was defined prior to IoInitSystem. [NTOS]: Fix InbvUpdateProgressBar code to correctly handle the floor and ceiling. [NTOS]: Remove shutdown "funny messages", do correct shutdown (should fix the ACPI shutdown issues) procedure. Display the shutdown screen on systems without ACPI (just like Windows does). [NTOS]: Add a resource header with IDB_ definitions for all the embedded bitmaps, instead of using magic numbers and guessing which is which. [NTOS]: Fix the boot logo initialization code as it was all wrong. 5 is the logo to be used during shutdown, for example, not the full logo background (which is supposed to be in 1, with a special palette that's faded in). Also handle server vs workstation scenarios. [NTOS]: Booting in the new WinNT mode now correctly displays the blue background screen when in debug (/SOS) mode, and the header/footer also has the correct color, as does the separator band. [DDK]: Add missing SUITE_TYPE definitions. [NTOS]: Remove logo files that are simply not needed for ReactOS (Compute Cluster Edition, Tablet PC, etc...) [NTOS]: Fix logo files (mostly) to have correct palettes. Note that 1.bmp is still quite different from Windows (no fade). svn path=/trunk/; revision=45822
2010-03-04 06:26:11 +00:00
VOID
NTAPI
InbvSetProgressBarSubset(
_In_ ULONG Floor,
_In_ ULONG Ceiling
Patch for better boot logo/progress bar, fixed /SOS (debug) boot screen/output, removal of "funny" shutdown messages, addition of shutdown logo/screen, and misc: [NTOS]: Add missing InbvIndicateProgress routine to update the progress bar while drivers are loading. Make boot and system driver initialization call it for each new driver. This updates the progress bar in the 25-75% range which was defined prior to IoInitSystem. [NTOS]: Fix InbvUpdateProgressBar code to correctly handle the floor and ceiling. [NTOS]: Remove shutdown "funny messages", do correct shutdown (should fix the ACPI shutdown issues) procedure. Display the shutdown screen on systems without ACPI (just like Windows does). [NTOS]: Add a resource header with IDB_ definitions for all the embedded bitmaps, instead of using magic numbers and guessing which is which. [NTOS]: Fix the boot logo initialization code as it was all wrong. 5 is the logo to be used during shutdown, for example, not the full logo background (which is supposed to be in 1, with a special palette that's faded in). Also handle server vs workstation scenarios. [NTOS]: Booting in the new WinNT mode now correctly displays the blue background screen when in debug (/SOS) mode, and the header/footer also has the correct color, as does the separator band. [DDK]: Add missing SUITE_TYPE definitions. [NTOS]: Remove logo files that are simply not needed for ReactOS (Compute Cluster Edition, Tablet PC, etc...) [NTOS]: Fix logo files (mostly) to have correct palettes. Note that 1.bmp is still quite different from Windows (no fade). svn path=/trunk/; revision=45822
2010-03-04 06:26:11 +00:00
);
VOID
NTAPI
InbvUpdateProgressBar(
_In_ ULONG Percentage
Patch for better boot logo/progress bar, fixed /SOS (debug) boot screen/output, removal of "funny" shutdown messages, addition of shutdown logo/screen, and misc: [NTOS]: Add missing InbvIndicateProgress routine to update the progress bar while drivers are loading. Make boot and system driver initialization call it for each new driver. This updates the progress bar in the 25-75% range which was defined prior to IoInitSystem. [NTOS]: Fix InbvUpdateProgressBar code to correctly handle the floor and ceiling. [NTOS]: Remove shutdown "funny messages", do correct shutdown (should fix the ACPI shutdown issues) procedure. Display the shutdown screen on systems without ACPI (just like Windows does). [NTOS]: Add a resource header with IDB_ definitions for all the embedded bitmaps, instead of using magic numbers and guessing which is which. [NTOS]: Fix the boot logo initialization code as it was all wrong. 5 is the logo to be used during shutdown, for example, not the full logo background (which is supposed to be in 1, with a special palette that's faded in). Also handle server vs workstation scenarios. [NTOS]: Booting in the new WinNT mode now correctly displays the blue background screen when in debug (/SOS) mode, and the header/footer also has the correct color, as does the separator band. [DDK]: Add missing SUITE_TYPE definitions. [NTOS]: Remove logo files that are simply not needed for ReactOS (Compute Cluster Edition, Tablet PC, etc...) [NTOS]: Fix logo files (mostly) to have correct palettes. Note that 1.bmp is still quite different from Windows (no fade). svn path=/trunk/; revision=45822
2010-03-04 06:26:11 +00:00
);
//
// Headless Terminal Support Functions
//
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
);