2003-08-11 18:50:12 +00:00
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2004-08-15 16:39:12 +00:00
|
|
|
#include <ntoskrnl.h>
|
2003-08-11 18:50:12 +00:00
|
|
|
#define NDEBUG
|
2007-02-03 20:30:32 +00:00
|
|
|
#include <debug.h>
|
2007-02-04 22:35:09 +00:00
|
|
|
#include "bootvid/bootvid.h"
|
2005-11-28 23:25:31 +00:00
|
|
|
|
2003-08-11 18:50:12 +00:00
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
KSPIN_LOCK BootDriverLock;
|
|
|
|
KIRQL InbvOldIrql;
|
|
|
|
INBV_DISPLAY_STATE InbvDisplayState;
|
2011-06-15 12:53:32 +00:00
|
|
|
BOOLEAN InbvBootDriverInstalled = FALSE;
|
|
|
|
BOOLEAN InbvDisplayDebugStrings = FALSE;
|
2007-02-03 20:30:32 +00:00
|
|
|
INBV_DISPLAY_STRING_FILTER InbvDisplayFilter;
|
|
|
|
ULONG ProgressBarLeft, ProgressBarTop;
|
2011-06-15 12:53:32 +00:00
|
|
|
BOOLEAN ShowProgressBar = FALSE;
|
2007-02-03 20:30:32 +00:00
|
|
|
INBV_PROGRESS_STATE InbvProgressState;
|
|
|
|
INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters;
|
|
|
|
ULONG ResourceCount;
|
|
|
|
PUCHAR ResourceList[64];
|
2011-06-15 12:53:32 +00:00
|
|
|
BOOLEAN SysThreadCreated = FALSE;
|
2007-02-08 00:50:23 +00:00
|
|
|
ROT_BAR_TYPE RotBarSelection;
|
|
|
|
ULONG PltRotBarStatus;
|
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
|
|
|
BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0};
|
2003-08-24 12:08:16 +00:00
|
|
|
|
2012-12-09 21:43:51 +00:00
|
|
|
/* FADING FUNCTION ***********************************************************/
|
|
|
|
|
|
|
|
/** From include/psdk/wingdi.h **/
|
|
|
|
typedef struct tagRGBQUAD
|
|
|
|
{
|
|
|
|
UCHAR rgbBlue;
|
|
|
|
UCHAR rgbGreen;
|
|
|
|
UCHAR rgbRed;
|
|
|
|
UCHAR rgbReserved;
|
|
|
|
} RGBQUAD,*LPRGBQUAD;
|
|
|
|
/*******************************/
|
|
|
|
|
|
|
|
static RGBQUAD _MainPalette[16];
|
|
|
|
|
|
|
|
#define PALETTE_FADE_STEPS 15
|
2014-04-05 16:46:40 +00:00
|
|
|
#define PALETTE_FADE_TIME 20 * 1000 /* 20ms */
|
2012-12-09 21:43:51 +00:00
|
|
|
|
|
|
|
/** From bootvid/precomp.h **/
|
|
|
|
//
|
|
|
|
// Bitmap Header
|
|
|
|
//
|
|
|
|
typedef struct tagBITMAPINFOHEADER
|
|
|
|
{
|
|
|
|
ULONG biSize;
|
|
|
|
LONG biWidth;
|
|
|
|
LONG biHeight;
|
|
|
|
USHORT biPlanes;
|
|
|
|
USHORT biBitCount;
|
|
|
|
ULONG biCompression;
|
|
|
|
ULONG biSizeImage;
|
|
|
|
LONG biXPelsPerMeter;
|
|
|
|
LONG biYPelsPerMeter;
|
|
|
|
ULONG biClrUsed;
|
|
|
|
ULONG biClrImportant;
|
|
|
|
} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
|
|
|
|
/****************************/
|
|
|
|
|
2012-12-09 22:15:42 +00:00
|
|
|
//
|
|
|
|
// Needed prototypes
|
|
|
|
//
|
|
|
|
VOID NTAPI InbvAcquireLock(VOID);
|
|
|
|
VOID NTAPI InbvReleaseLock(VOID);
|
|
|
|
|
2012-12-09 21:43:51 +00:00
|
|
|
static VOID
|
|
|
|
NTAPI
|
2012-12-09 21:59:25 +00:00
|
|
|
BootImageFadeIn(VOID)
|
2012-12-09 21:43:51 +00:00
|
|
|
{
|
|
|
|
UCHAR PaletteBitmapBuffer[sizeof(BITMAPINFOHEADER) + sizeof(_MainPalette)];
|
|
|
|
PBITMAPINFOHEADER PaletteBitmap = (PBITMAPINFOHEADER)PaletteBitmapBuffer;
|
|
|
|
LPRGBQUAD Palette = (LPRGBQUAD)(PaletteBitmapBuffer + sizeof(BITMAPINFOHEADER));
|
|
|
|
|
|
|
|
ULONG Iteration, Index, ClrUsed;
|
|
|
|
|
2012-12-09 22:15:42 +00:00
|
|
|
/* Check if we're installed and we own it */
|
|
|
|
if ((InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
2012-12-09 21:43:51 +00:00
|
|
|
{
|
2012-12-09 22:15:42 +00:00
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Build a bitmap containing the fade in palette. The palette entries
|
|
|
|
* are then processed in a loop and set using VidBitBlt function.
|
|
|
|
*/
|
|
|
|
ClrUsed = sizeof(_MainPalette) / sizeof(_MainPalette[0]);
|
|
|
|
RtlZeroMemory(PaletteBitmap, sizeof(BITMAPINFOHEADER));
|
|
|
|
PaletteBitmap->biSize = sizeof(BITMAPINFOHEADER);
|
2013-02-16 17:37:17 +00:00
|
|
|
PaletteBitmap->biBitCount = 4;
|
2012-12-09 22:15:42 +00:00
|
|
|
PaletteBitmap->biClrUsed = ClrUsed;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Main animation loop.
|
|
|
|
*/
|
|
|
|
for (Iteration = 0; Iteration <= PALETTE_FADE_STEPS; ++Iteration)
|
2012-12-09 21:43:51 +00:00
|
|
|
{
|
2012-12-09 22:15:42 +00:00
|
|
|
for (Index = 0; Index < ClrUsed; Index++)
|
|
|
|
{
|
2013-02-16 17:37:17 +00:00
|
|
|
Palette[Index].rgbRed = (UCHAR)
|
|
|
|
(_MainPalette[Index].rgbRed * Iteration / PALETTE_FADE_STEPS);
|
|
|
|
Palette[Index].rgbGreen = (UCHAR)
|
|
|
|
(_MainPalette[Index].rgbGreen * Iteration / PALETTE_FADE_STEPS);
|
|
|
|
Palette[Index].rgbBlue = (UCHAR)
|
|
|
|
(_MainPalette[Index].rgbBlue * Iteration / PALETTE_FADE_STEPS);
|
2012-12-09 22:15:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VidBitBlt(PaletteBitmapBuffer, 0, 0);
|
|
|
|
|
|
|
|
/* Wait for a bit. */
|
2014-04-05 16:46:40 +00:00
|
|
|
KeStallExecutionProcessor(PALETTE_FADE_TIME);
|
2012-12-09 21:43:51 +00:00
|
|
|
}
|
|
|
|
|
2012-12-09 22:15:42 +00:00
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
2012-12-09 21:43:51 +00:00
|
|
|
|
|
|
|
/* Wait for a bit. */
|
2014-04-05 16:46:40 +00:00
|
|
|
KeStallExecutionProcessor(PALETTE_FADE_TIME);
|
2012-12-09 21:43:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-08-11 18:50:12 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
PVOID
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2007-02-03 20:30:32 +00:00
|
|
|
FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|
|
|
IN ULONG ResourceId)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
UNICODE_STRING UpString = RTL_CONSTANT_STRING(L"ntoskrnl.exe");
|
|
|
|
UNICODE_STRING MpString = RTL_CONSTANT_STRING(L"ntkrnlmp.exe");
|
|
|
|
PLIST_ENTRY NextEntry, ListHead;
|
|
|
|
PLDR_DATA_TABLE_ENTRY LdrEntry;
|
|
|
|
PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
|
|
|
|
LDR_RESOURCE_INFO ResourceInfo;
|
|
|
|
NTSTATUS Status;
|
|
|
|
PVOID Data = NULL;
|
|
|
|
|
|
|
|
/* Loop the driver list */
|
|
|
|
ListHead = &LoaderBlock->LoadOrderListHead;
|
|
|
|
NextEntry = ListHead->Flink;
|
|
|
|
while (NextEntry != ListHead)
|
|
|
|
{
|
|
|
|
/* Get the entry */
|
|
|
|
LdrEntry = CONTAINING_RECORD(NextEntry,
|
|
|
|
LDR_DATA_TABLE_ENTRY,
|
|
|
|
InLoadOrderLinks);
|
|
|
|
|
|
|
|
/* Check for a match */
|
|
|
|
if ((RtlEqualUnicodeString(&LdrEntry->BaseDllName, &UpString, TRUE)) ||
|
|
|
|
(RtlEqualUnicodeString(&LdrEntry->BaseDllName, &MpString, TRUE)))
|
|
|
|
{
|
|
|
|
/* Break out */
|
2006-10-09 04:00:34 +00:00
|
|
|
break;
|
2007-02-03 20:30:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check if we found it */
|
|
|
|
if (NextEntry != ListHead)
|
|
|
|
{
|
|
|
|
/* Try to find the resource */
|
2010-09-10 21:28:24 +00:00
|
|
|
ResourceInfo.Type = 2; //RT_BITMAP;
|
2007-02-03 20:30:32 +00:00
|
|
|
ResourceInfo.Name = ResourceId;
|
|
|
|
ResourceInfo.Language = 0;
|
|
|
|
Status = LdrFindResource_U(LdrEntry->DllBase,
|
|
|
|
&ResourceInfo,
|
|
|
|
RESOURCE_DATA_LEVEL,
|
|
|
|
&ResourceDataEntry);
|
|
|
|
if (NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
/* Access the resource */
|
2010-09-24 17:02:13 +00:00
|
|
|
ULONG Size = 0;
|
2007-02-03 20:30:32 +00:00
|
|
|
Status = LdrAccessResource(LdrEntry->DllBase,
|
|
|
|
ResourceDataEntry,
|
|
|
|
&Data,
|
2010-09-24 17:02:13 +00:00
|
|
|
&Size);
|
|
|
|
if ((Data) && (ResourceId < 3))
|
|
|
|
{
|
|
|
|
KiBugCheckData[4] ^= RtlComputeCrc32(0, Data, Size);
|
|
|
|
}
|
2007-02-03 20:30:32 +00:00
|
|
|
if (!NT_SUCCESS(Status)) Data = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the pointer */
|
|
|
|
return Data;
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2007-02-03 20:30:32 +00:00
|
|
|
InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|
|
|
IN ULONG Count)
|
|
|
|
{
|
|
|
|
PCHAR CommandLine;
|
|
|
|
BOOLEAN CustomLogo = FALSE;
|
|
|
|
ULONG i;
|
|
|
|
|
|
|
|
/* Quit if we're already installed */
|
|
|
|
if (InbvBootDriverInstalled) return TRUE;
|
|
|
|
|
|
|
|
/* Initialize the lock and check the current display state */
|
|
|
|
KeInitializeSpinLock(&BootDriverLock);
|
|
|
|
if (InbvDisplayState == INBV_DISPLAY_STATE_OWNED)
|
|
|
|
{
|
|
|
|
/* Check if we have a custom boot logo */
|
|
|
|
CommandLine = _strupr(LoaderBlock->LoadOptions);
|
|
|
|
CustomLogo = strstr(CommandLine, "BOOTLOGO") ? TRUE: FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initialize the video */
|
2010-01-26 19:29:37 +00:00
|
|
|
InbvBootDriverInstalled = VidInitialize(FALSE);
|
2007-02-03 20:30:32 +00:00
|
|
|
if (InbvBootDriverInstalled)
|
|
|
|
{
|
2010-01-26 19:29:37 +00:00
|
|
|
/* Now reset the display, but only if there's a custom boot logo */
|
|
|
|
VidResetDisplay(CustomLogo);
|
2013-02-16 17:37:17 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Find bitmap resources in the kernel */
|
2010-09-24 17:02:13 +00:00
|
|
|
ResourceCount = min(IDB_CLUSTER_SERVER, Count);
|
|
|
|
for (i = 1; i <= Count; i++)
|
2007-02-03 20:30:32 +00:00
|
|
|
{
|
|
|
|
/* Do the lookup */
|
|
|
|
ResourceList[i] = FindBitmapResource(LoaderBlock, i);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set the progress bar ranges */
|
|
|
|
InbvSetProgressBarSubset(0, 100);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return install state */
|
|
|
|
return InbvBootDriverInstalled;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-10-09 04:00:34 +00:00
|
|
|
InbvAcquireLock(VOID)
|
|
|
|
{
|
2010-09-10 21:28:24 +00:00
|
|
|
KIRQL OldIrql;
|
|
|
|
|
|
|
|
/* Check if we're at dispatch level or lower */
|
|
|
|
OldIrql = KeGetCurrentIrql();
|
|
|
|
if (OldIrql <= DISPATCH_LEVEL)
|
2007-02-03 20:30:32 +00:00
|
|
|
{
|
2010-09-10 21:28:24 +00:00
|
|
|
/* Loop until the lock is free */
|
|
|
|
while (!KeTestSpinLock(&BootDriverLock));
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Raise IRQL to dispatch level */
|
2010-09-10 21:28:24 +00:00
|
|
|
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
|
2007-02-03 20:30:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Acquire the lock */
|
|
|
|
KiAcquireSpinLock(&BootDriverLock);
|
2010-09-10 21:28:24 +00:00
|
|
|
InbvOldIrql = OldIrql;
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-10-09 04:00:34 +00:00
|
|
|
InbvReleaseLock(VOID)
|
|
|
|
{
|
2010-09-10 21:28:24 +00:00
|
|
|
KIRQL OldIrql;
|
|
|
|
|
|
|
|
/* Capture the old IRQL */
|
|
|
|
OldIrql = InbvOldIrql;
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Release the driver lock */
|
|
|
|
KiReleaseSpinLock(&BootDriverLock);
|
|
|
|
|
2010-09-10 21:28:24 +00:00
|
|
|
/* If we were at dispatch level or lower, restore the old IRQL */
|
|
|
|
if (InbvOldIrql <= DISPATCH_LEVEL) KeLowerIrql(OldIrql);
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2006-10-09 04:00:34 +00:00
|
|
|
InbvEnableBootDriver(IN BOOLEAN Enable)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if we're installed */
|
|
|
|
if (InbvBootDriverInstalled)
|
|
|
|
{
|
|
|
|
/* Check for lost state */
|
|
|
|
if (InbvDisplayState >= INBV_DISPLAY_STATE_LOST) return;
|
|
|
|
|
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
|
|
|
|
|
|
|
/* Cleanup the screen if we own it */
|
|
|
|
if (InbvDisplayState == INBV_DISPLAY_STATE_OWNED) VidCleanUp();
|
|
|
|
|
|
|
|
/* Set the new display state */
|
|
|
|
InbvDisplayState = Enable ? INBV_DISPLAY_STATE_OWNED:
|
|
|
|
INBV_DISPLAY_STATE_DISABLED;
|
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Set the new display state */
|
|
|
|
InbvDisplayState = Enable ? INBV_DISPLAY_STATE_OWNED:
|
|
|
|
INBV_DISPLAY_STATE_DISABLED;
|
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvAcquireDisplayOwnership(VOID)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if we have a callback and we're just acquiring it now */
|
|
|
|
if ((InbvResetDisplayParameters) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_LOST))
|
|
|
|
{
|
|
|
|
/* Call the callback */
|
|
|
|
InbvResetDisplayParameters(80, 50);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Acquire the display */
|
|
|
|
InbvDisplayState = INBV_DISPLAY_STATE_OWNED;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSetDisplayOwnership(IN BOOLEAN DisplayOwned)
|
|
|
|
{
|
|
|
|
/* Set the new display state */
|
|
|
|
InbvDisplayState = DisplayOwned ? INBV_DISPLAY_STATE_OWNED:
|
|
|
|
INBV_DISPLAY_STATE_LOST;
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvCheckDisplayOwnership(VOID)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Return if we own it or not */
|
|
|
|
return InbvDisplayState != INBV_DISPLAY_STATE_LOST;
|
|
|
|
}
|
|
|
|
|
|
|
|
INBV_DISPLAY_STATE
|
|
|
|
NTAPI
|
|
|
|
InbvGetDisplayState(VOID)
|
|
|
|
{
|
|
|
|
/* Return the actual state */
|
|
|
|
return InbvDisplayState;
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvDisplayString(IN PCHAR String)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Make sure we own the display */
|
|
|
|
if (InbvDisplayState == INBV_DISPLAY_STATE_OWNED)
|
|
|
|
{
|
|
|
|
/* If we're not allowed, return success anyway */
|
|
|
|
if (!InbvDisplayDebugStrings) return TRUE;
|
2006-05-17 20:34:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if a filter is installed */
|
|
|
|
if (InbvDisplayFilter) InbvDisplayFilter(&String);
|
2006-05-17 20:34:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Make sure we're installed and display the string */
|
2007-02-04 22:35:09 +00:00
|
|
|
if (InbvBootDriverInstalled) VidDisplayString((PUCHAR) String);
|
2007-02-03 20:30:32 +00:00
|
|
|
|
2010-09-15 07:46:28 +00:00
|
|
|
/* Print the string on the EMS port */
|
2012-12-09 21:43:51 +00:00
|
|
|
HeadlessDispatch(HeadlessCmdPutString,
|
|
|
|
String,
|
|
|
|
strlen(String) + sizeof(ANSI_NULL),
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2007-02-03 20:30:32 +00:00
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* All done */
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We don't own it, fail */
|
|
|
|
return FALSE;
|
|
|
|
}
|
2005-02-01 16:40:23 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvEnableDisplayString(IN BOOLEAN Enable)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN OldSetting;
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Get the old setting */
|
|
|
|
OldSetting = InbvDisplayDebugStrings;
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Update it */
|
|
|
|
InbvDisplayDebugStrings = Enable;
|
|
|
|
|
|
|
|
/* Return the old setting */
|
|
|
|
return OldSetting;
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvInstallDisplayStringFilter(IN INBV_DISPLAY_STRING_FILTER Filter)
|
|
|
|
{
|
|
|
|
/* Save the filter */
|
|
|
|
InbvDisplayFilter = Filter;
|
|
|
|
}
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvIsBootDriverInstalled(VOID)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Return driver state */
|
|
|
|
return InbvBootDriverInstalled;
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvNotifyDisplayOwnershipLost(IN INBV_RESET_DISPLAY_PARAMETERS Callback)
|
2003-08-11 18:50:12 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if we're installed */
|
|
|
|
if (InbvBootDriverInstalled)
|
|
|
|
{
|
|
|
|
/* Acquire the lock and cleanup if we own the screen */
|
|
|
|
InbvAcquireLock();
|
|
|
|
if (InbvDisplayState != INBV_DISPLAY_STATE_LOST) VidCleanUp();
|
|
|
|
|
|
|
|
/* Set the reset callback and display state */
|
|
|
|
InbvResetDisplayParameters = Callback;
|
|
|
|
InbvDisplayState = INBV_DISPLAY_STATE_LOST;
|
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Set the reset callback and display state */
|
|
|
|
InbvResetDisplayParameters = Callback;
|
|
|
|
InbvDisplayState = INBV_DISPLAY_STATE_LOST;
|
|
|
|
}
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2003-08-11 18:50:12 +00:00
|
|
|
InbvResetDisplay(VOID)
|
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if we're installed and we own it */
|
|
|
|
if ((InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
|
|
|
{
|
|
|
|
/* Do the reset */
|
|
|
|
VidResetDisplay(TRUE);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Nothing to reset */
|
|
|
|
return FALSE;
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSetScrollRegion(IN ULONG Left,
|
|
|
|
IN ULONG Top,
|
|
|
|
IN ULONG Width,
|
|
|
|
IN ULONG Height)
|
2003-08-11 18:50:12 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Just call bootvid */
|
|
|
|
VidSetScrollRegion(Left, Top, Width, Height);
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSetTextColor(IN ULONG Color)
|
2003-08-11 18:50:12 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* FIXME: Headless */
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Update the text color */
|
|
|
|
VidSetTextColor(Color);
|
|
|
|
}
|
2003-08-11 18:50:12 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSolidColorFill(IN ULONG Left,
|
|
|
|
IN ULONG Top,
|
|
|
|
IN ULONG Width,
|
|
|
|
IN ULONG Height,
|
|
|
|
IN ULONG Color)
|
2003-08-11 18:50:12 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Make sure we own it */
|
|
|
|
if (InbvDisplayState == INBV_DISPLAY_STATE_OWNED)
|
|
|
|
{
|
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
|
|
|
|
|
|
|
/* Check if we're installed */
|
|
|
|
if (InbvBootDriverInstalled)
|
|
|
|
{
|
|
|
|
/* Call bootvid */
|
2007-08-04 08:49:47 +00:00
|
|
|
VidSolidColorFill(Left, Top, Width, Height, (UCHAR)Color);
|
2007-02-03 20:30:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* FIXME: Headless */
|
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
2003-08-11 18:50:12 +00:00
|
|
|
}
|
2005-01-07 06:54:27 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2007-02-03 20:30:32 +00:00
|
|
|
InbvUpdateProgressBar(IN ULONG Progress)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
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
|
|
|
ULONG FillCount, BoundedProgress;
|
2007-02-03 20:30:32 +00:00
|
|
|
|
|
|
|
/* Make sure the progress bar is enabled, that we own and are installed */
|
|
|
|
if ((ShowProgressBar) &&
|
|
|
|
(InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
|
|
|
{
|
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
|
|
|
/* Compute fill count */
|
|
|
|
BoundedProgress = (InbvProgressState.Floor / 100) + Progress;
|
|
|
|
FillCount = 121 * (InbvProgressState.Bias * BoundedProgress) / 1000000;
|
2007-02-03 20:30:32 +00:00
|
|
|
|
2010-02-19 03:16:04 +00:00
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
|
|
|
|
|
|
|
/* Fill the progress bar */
|
|
|
|
VidSolidColorFill(ProgressBarLeft,
|
|
|
|
ProgressBarTop,
|
|
|
|
ProgressBarLeft + FillCount,
|
|
|
|
ProgressBarTop + 12,
|
2010-03-06 22:14:46 +00:00
|
|
|
15);
|
2010-02-19 03:16:04 +00:00
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
2007-02-03 20:30:32 +00:00
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvBufferToScreenBlt(IN PUCHAR Buffer,
|
|
|
|
IN ULONG X,
|
|
|
|
IN ULONG Y,
|
|
|
|
IN ULONG Width,
|
|
|
|
IN ULONG Height,
|
|
|
|
IN ULONG Delta)
|
|
|
|
{
|
|
|
|
/* Check if we're installed and we own it */
|
|
|
|
if ((InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
|
|
|
{
|
|
|
|
/* Do the blit */
|
|
|
|
VidBufferToScreenBlt(Buffer, X, Y, Width, Height, Delta);
|
|
|
|
}
|
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvBitBlt(IN PUCHAR Buffer,
|
|
|
|
IN ULONG X,
|
|
|
|
IN ULONG Y)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Check if we're installed and we own it */
|
|
|
|
if ((InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
|
|
|
{
|
|
|
|
/* Acquire the lock */
|
|
|
|
InbvAcquireLock();
|
|
|
|
|
|
|
|
/* Do the blit */
|
|
|
|
VidBitBlt(Buffer, X, Y);
|
|
|
|
|
|
|
|
/* Release the lock */
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvScreenToBufferBlt(IN PUCHAR Buffer,
|
|
|
|
IN ULONG X,
|
|
|
|
IN ULONG Y,
|
|
|
|
IN ULONG Width,
|
|
|
|
IN ULONG Height,
|
|
|
|
IN ULONG Delta)
|
|
|
|
{
|
|
|
|
/* Check if we're installed and we own it */
|
|
|
|
if ((InbvBootDriverInstalled) &&
|
|
|
|
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
|
|
|
|
{
|
|
|
|
/* Do the blit */
|
|
|
|
VidScreenToBufferBlt(Buffer, X, Y, Width, Height, Delta);
|
|
|
|
}
|
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSetProgressBarCoordinates(IN ULONG Left,
|
|
|
|
IN ULONG Top)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Update the coordinates */
|
|
|
|
ProgressBarLeft = Left;
|
|
|
|
ProgressBarTop = Top;
|
2006-10-09 04:00:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Enable the progress bar */
|
|
|
|
ShowProgressBar = TRUE;
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
InbvSetProgressBarSubset(IN ULONG Floor,
|
|
|
|
IN ULONG Ceiling)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Sanity checks */
|
|
|
|
ASSERT(Floor < Ceiling);
|
|
|
|
ASSERT(Ceiling <= 100);
|
|
|
|
|
|
|
|
/* Update the progress bar state */
|
|
|
|
InbvProgressState.Floor = Floor * 100;
|
|
|
|
InbvProgressState.Ceiling = Ceiling * 100;
|
|
|
|
InbvProgressState.Bias = (Ceiling * 100) - Floor;
|
2006-10-09 04:00:34 +00:00
|
|
|
}
|
|
|
|
|
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
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
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
|
|
|
InbvIndicateProgress(VOID)
|
|
|
|
{
|
|
|
|
ULONG Percentage;
|
|
|
|
|
|
|
|
/* Increase progress */
|
|
|
|
InbvProgressIndicator.Count++;
|
|
|
|
|
|
|
|
/* Compute new percentage */
|
|
|
|
Percentage = min(100 * InbvProgressIndicator.Count /
|
|
|
|
InbvProgressIndicator.Expected,
|
|
|
|
99);
|
|
|
|
if (Percentage != InbvProgressIndicator.Percentage)
|
|
|
|
{
|
|
|
|
/* Percentage has moved, update the progress bar */
|
|
|
|
InbvProgressIndicator.Percentage = Percentage;
|
|
|
|
InbvUpdateProgressBar(Percentage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
PUCHAR
|
|
|
|
NTAPI
|
|
|
|
InbvGetResourceAddress(IN ULONG ResourceNumber)
|
2006-10-09 04:00:34 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Validate the resource number */
|
|
|
|
if (ResourceNumber > ResourceCount) return NULL;
|
2006-10-09 04:00:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Return the address */
|
|
|
|
return ResourceList[ResourceNumber--];
|
|
|
|
}
|
2006-10-09 04:00:34 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtDisplayString(IN PUNICODE_STRING DisplayString)
|
2005-01-07 06:54:27 +00:00
|
|
|
{
|
2007-02-03 20:30:32 +00:00
|
|
|
OEM_STRING OemString;
|
2005-01-07 06:54:27 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Convert the string to OEM and display it */
|
|
|
|
RtlUnicodeStringToOemString(&OemString, DisplayString, TRUE);
|
|
|
|
InbvDisplayString(OemString.Buffer);
|
|
|
|
RtlFreeOemString(&OemString);
|
2005-01-07 06:54:27 +00:00
|
|
|
|
2007-02-03 20:30:32 +00:00
|
|
|
/* Return success */
|
|
|
|
return STATUS_SUCCESS;
|
2005-01-07 06:54:27 +00:00
|
|
|
}
|
2007-02-08 00:50:23 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2011-06-21 15:53:02 +00:00
|
|
|
DisplayBootBitmap(IN BOOLEAN TextMode)
|
2007-02-08 00:50:23 +00:00
|
|
|
{
|
2012-12-09 21:43:51 +00:00
|
|
|
PBITMAPINFOHEADER BitmapInfoHeader;
|
|
|
|
LPRGBQUAD Palette;
|
|
|
|
|
[NTOS]: Remove useless variables in kernel code that were set, but never actually used (dead code, tests, copy/pasters). If a variable was set but not used because of missing/#if'ed out code, a note was added instead.
[NTOS]: In the process, fix bugs in the Event dispatcher code that used Win32 EVENT_TYPE instead of NT KOBJECTS enumeration.
[NTOS]: Fix a bug in ObpInsertHandleCount, where the object access check was being done with the previous mode, instead of honoring the probe mode, which is defined by OBJ_FORCE_ACCESS_CHECK.
[NTOS]: Fix a bug in a section function which was always returning STATUS_SUCCESS, now it returns the result of the previous Status = function assignment. If this isn't desired, then don't check for the Status anymore.
[NTOS]: Note that MDL code does not support SkipBytes argument. If it is used, MDL could be invalid.
[NTOS]: Add checks for VerifierAllocation and set it when needed (WIP).
[NTOS]: Clarify what _WORKING_LINKER_ is, and the legal risks in continuing to use a linker that builds non-Microsoft drivers when used with headers whose EULA specify that they can only be used for Microsoft drivers.
svn path=/trunk/; revision=48692
2010-09-04 08:17:17 +00:00
|
|
|
PVOID Header, Band, Text, Screen;
|
2007-02-08 00:50:23 +00:00
|
|
|
ROT_BAR_TYPE TempRotBarSelection = RB_UNSPECIFIED;
|
2012-12-09 21:59:25 +00:00
|
|
|
|
|
|
|
#ifdef CORE_6781_resolved
|
|
|
|
UCHAR Buffer[64];
|
|
|
|
#endif
|
2012-12-09 21:43:51 +00:00
|
|
|
|
2007-02-08 00:50:23 +00:00
|
|
|
/* Check if the system thread has already been created */
|
|
|
|
if (SysThreadCreated)
|
|
|
|
{
|
|
|
|
/* Reset the progress bar */
|
|
|
|
InbvAcquireLock();
|
2010-09-10 21:28:24 +00:00
|
|
|
RotBarSelection = RB_UNSPECIFIED;
|
2007-02-08 00:50:23 +00:00
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
|
|
|
|
2011-06-21 15:53:02 +00:00
|
|
|
/* Check if this is text mode */
|
2007-02-08 00:50:23 +00:00
|
|
|
ShowProgressBar = FALSE;
|
2011-06-21 15:53:02 +00:00
|
|
|
if (TextMode)
|
2007-02-08 00:50:23 +00:00
|
|
|
{
|
|
|
|
/* Check if this is a server OS */
|
|
|
|
if (SharedUserData->NtProductType == NtProductWinNt)
|
|
|
|
{
|
|
|
|
/* It's not, set workstation settings */
|
|
|
|
InbvSetTextColor(15);
|
|
|
|
InbvSolidColorFill(0, 0, 639, 479, 7);
|
|
|
|
InbvSolidColorFill(0, 421, 639, 479, 1);
|
2013-02-16 17:37:17 +00:00
|
|
|
|
2007-02-08 00:50:23 +00:00
|
|
|
/* Get resources */
|
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
|
|
|
Header = InbvGetResourceAddress(IDB_LOGO_HEADER);
|
|
|
|
Band = InbvGetResourceAddress(IDB_LOGO_BAND);
|
2007-02-08 00:50:23 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Set server settings */
|
|
|
|
InbvSetTextColor(14);
|
|
|
|
InbvSolidColorFill(0, 0, 639, 479, 6);
|
|
|
|
InbvSolidColorFill(0, 421, 639, 479, 1);
|
|
|
|
|
|
|
|
/* Get resources */
|
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
|
|
|
Header = InbvGetResourceAddress(IDB_SERVER_HEADER);
|
|
|
|
Band = InbvGetResourceAddress(IDB_SERVER_BAND);
|
2007-02-08 00:50:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Set the scrolling region */
|
|
|
|
InbvSetScrollRegion(32, 80, 631, 400);
|
|
|
|
|
|
|
|
/* Make sure we have resources */
|
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
|
|
|
if ((Header) && (Band))
|
2007-02-08 00:50:23 +00:00
|
|
|
{
|
|
|
|
/* BitBlt them on the screen */
|
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
|
|
|
InbvBitBlt(Band, 0, 419);
|
|
|
|
InbvBitBlt(Header, 0, 0);
|
2007-02-08 00:50:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Is the boot driver installed? */
|
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
|
|
|
Text = NULL;
|
2007-02-08 00:50:23 +00:00
|
|
|
if (!InbvBootDriverInstalled) return;
|
|
|
|
|
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
|
|
|
/* Load the standard boot screen */
|
|
|
|
Screen = InbvGetResourceAddress(IDB_BOOT_LOGO);
|
|
|
|
if (SharedUserData->NtProductType == NtProductWinNt)
|
2007-10-16 10:40:17 +00:00
|
|
|
{
|
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
|
|
|
/* Workstation product, display appropriate status bar color */
|
[NTOS]: Remove useless variables in kernel code that were set, but never actually used (dead code, tests, copy/pasters). If a variable was set but not used because of missing/#if'ed out code, a note was added instead.
[NTOS]: In the process, fix bugs in the Event dispatcher code that used Win32 EVENT_TYPE instead of NT KOBJECTS enumeration.
[NTOS]: Fix a bug in ObpInsertHandleCount, where the object access check was being done with the previous mode, instead of honoring the probe mode, which is defined by OBJ_FORCE_ACCESS_CHECK.
[NTOS]: Fix a bug in a section function which was always returning STATUS_SUCCESS, now it returns the result of the previous Status = function assignment. If this isn't desired, then don't check for the Status anymore.
[NTOS]: Note that MDL code does not support SkipBytes argument. If it is used, MDL could be invalid.
[NTOS]: Add checks for VerifierAllocation and set it when needed (WIP).
[NTOS]: Clarify what _WORKING_LINKER_ is, and the legal risks in continuing to use a linker that builds non-Microsoft drivers when used with headers whose EULA specify that they can only be used for Microsoft drivers.
svn path=/trunk/; revision=48692
2010-09-04 08:17:17 +00:00
|
|
|
InbvGetResourceAddress(IDB_BAR_PRO);
|
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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Display correct branding based on server suite */
|
|
|
|
if (ExVerifySuite(StorageServer))
|
|
|
|
{
|
|
|
|
/* Storage Server Edition */
|
|
|
|
Text = InbvGetResourceAddress(IDB_STORAGE_SERVER);
|
|
|
|
}
|
|
|
|
else if (ExVerifySuite(ComputeServer))
|
|
|
|
{
|
|
|
|
/* Compute Cluster Edition */
|
|
|
|
Text = InbvGetResourceAddress(IDB_CLUSTER_SERVER);
|
|
|
|
}
|
2007-10-16 10:40:17 +00:00
|
|
|
else
|
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
|
|
|
{
|
|
|
|
/* Normal edition */
|
|
|
|
Text = InbvGetResourceAddress(IDB_SERVER_LOGO);
|
|
|
|
}
|
2013-02-16 17:37:17 +00:00
|
|
|
|
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
|
|
|
/* Server product, display appropriate status bar color */
|
[NTOS]: Remove useless variables in kernel code that were set, but never actually used (dead code, tests, copy/pasters). If a variable was set but not used because of missing/#if'ed out code, a note was added instead.
[NTOS]: In the process, fix bugs in the Event dispatcher code that used Win32 EVENT_TYPE instead of NT KOBJECTS enumeration.
[NTOS]: Fix a bug in ObpInsertHandleCount, where the object access check was being done with the previous mode, instead of honoring the probe mode, which is defined by OBJ_FORCE_ACCESS_CHECK.
[NTOS]: Fix a bug in a section function which was always returning STATUS_SUCCESS, now it returns the result of the previous Status = function assignment. If this isn't desired, then don't check for the Status anymore.
[NTOS]: Note that MDL code does not support SkipBytes argument. If it is used, MDL could be invalid.
[NTOS]: Add checks for VerifierAllocation and set it when needed (WIP).
[NTOS]: Clarify what _WORKING_LINKER_ is, and the legal risks in continuing to use a linker that builds non-Microsoft drivers when used with headers whose EULA specify that they can only be used for Microsoft drivers.
svn path=/trunk/; revision=48692
2010-09-04 08:17:17 +00:00
|
|
|
InbvGetResourceAddress(IDB_BAR_SERVER);
|
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
|
|
|
}
|
2012-12-09 21:43:51 +00:00
|
|
|
|
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
|
|
|
/* Make sure we had a logo */
|
|
|
|
if (Screen)
|
|
|
|
{
|
|
|
|
/* Choose progress bar */
|
|
|
|
TempRotBarSelection = RB_SQUARE_CELLS;
|
|
|
|
|
2012-12-09 21:43:51 +00:00
|
|
|
/*
|
|
|
|
* Save the main image palette and replace it with black palette, so
|
|
|
|
* we can do fade in effect later.
|
|
|
|
*/
|
|
|
|
BitmapInfoHeader = (PBITMAPINFOHEADER)Screen;
|
|
|
|
Palette = (LPRGBQUAD)((PUCHAR)Screen + BitmapInfoHeader->biSize);
|
|
|
|
RtlCopyMemory(_MainPalette, Palette, sizeof(_MainPalette));
|
|
|
|
RtlZeroMemory(Palette, sizeof(_MainPalette));
|
|
|
|
|
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
|
|
|
/* Blit the background */
|
|
|
|
InbvBitBlt(Screen, 0, 0);
|
2010-02-19 03:16:04 +00:00
|
|
|
|
|
|
|
/* Set progress bar coordinates and display it */
|
|
|
|
InbvSetProgressBarCoordinates(257, 352);
|
2012-12-09 21:43:51 +00:00
|
|
|
|
|
|
|
/* Display the boot logo and fade it in */
|
2012-12-09 21:59:25 +00:00
|
|
|
BootImageFadeIn();
|
2012-12-09 21:43:51 +00:00
|
|
|
|
2012-12-09 21:59:25 +00:00
|
|
|
#ifdef CORE_6781_resolved
|
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
|
|
|
/* Check for non-workstation products */
|
|
|
|
if (SharedUserData->NtProductType != NtProductWinNt)
|
|
|
|
{
|
|
|
|
/* Overwrite part of the logo for a server product */
|
|
|
|
InbvScreenToBufferBlt(Buffer, 413, 237, 7, 7, 8);
|
|
|
|
InbvSolidColorFill(418, 230, 454, 256, 0);
|
|
|
|
InbvBufferToScreenBlt(Buffer, 413, 237, 7, 7, 8);
|
2013-02-16 17:37:17 +00:00
|
|
|
|
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
|
|
|
/* In setup mode, you haven't selected a SKU yet */
|
|
|
|
if (ExpInTextModeSetup) Text = NULL;
|
|
|
|
}
|
2012-12-09 21:43:51 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2012-12-09 21:59:25 +00:00
|
|
|
#ifdef CORE_6781_resolved
|
2012-12-09 21:43:51 +00:00
|
|
|
/* Draw the SKU text if it exits */
|
2012-12-09 21:59:25 +00:00
|
|
|
if (Text) InbvBitBlt(Text, 180, 121);
|
2013-06-02 19:04:02 +00:00
|
|
|
#else
|
|
|
|
DBG_UNREFERENCED_LOCAL_VARIABLE(Text);
|
2012-12-09 21:59:25 +00:00
|
|
|
#endif
|
2012-12-09 21:43:51 +00:00
|
|
|
|
|
|
|
/* Draw the progress bar bit */
|
|
|
|
// if (Bar) InbvBitBlt(Bar, 0, 0);
|
|
|
|
|
|
|
|
/* Set filter which will draw text display if needed */
|
|
|
|
InbvInstallDisplayStringFilter(DisplayFilter);
|
2007-02-08 00:50:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Do we have a system thread? */
|
|
|
|
if (SysThreadCreated)
|
|
|
|
{
|
|
|
|
/* We do, set the progress bar location */
|
|
|
|
InbvAcquireLock();
|
|
|
|
RotBarSelection = TempRotBarSelection;
|
|
|
|
//InbvRotBarInit();
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-21 15:53:02 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
INIT_FUNCTION
|
|
|
|
DisplayFilter(PCHAR *String)
|
|
|
|
{
|
2011-06-21 22:15:48 +00:00
|
|
|
/* Windows hack to skip first dots */
|
|
|
|
static BOOLEAN DotHack = TRUE;
|
|
|
|
|
|
|
|
/* If "." is given set *String to empty string */
|
|
|
|
if(DotHack && strcmp(*String, ".") == 0)
|
|
|
|
*String = "";
|
|
|
|
|
|
|
|
if(**String)
|
2011-06-21 19:47:13 +00:00
|
|
|
{
|
|
|
|
/* Remove the filter */
|
|
|
|
InbvInstallDisplayStringFilter(NULL);
|
2013-02-16 17:37:17 +00:00
|
|
|
|
2011-06-21 22:15:48 +00:00
|
|
|
DotHack = FALSE;
|
2011-06-21 19:47:13 +00:00
|
|
|
|
|
|
|
/* Draw text screen */
|
|
|
|
DisplayBootBitmap(TRUE);
|
|
|
|
}
|
2011-06-21 15:53:02 +00:00
|
|
|
}
|
|
|
|
|
2007-02-08 00:50:23 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2010-11-02 16:29:06 +00:00
|
|
|
INIT_FUNCTION
|
2007-02-08 00:50:23 +00:00
|
|
|
FinalizeBootLogo(VOID)
|
|
|
|
{
|
|
|
|
/* Acquire lock and check the display state */
|
|
|
|
InbvAcquireLock();
|
|
|
|
if (InbvGetDisplayState() == INBV_DISPLAY_STATE_OWNED)
|
|
|
|
{
|
|
|
|
/* Clear the screen */
|
|
|
|
VidSolidColorFill(0, 0, 639, 479, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reset progress bar and lock */
|
|
|
|
PltRotBarStatus = 3;
|
|
|
|
InbvReleaseLock();
|
|
|
|
}
|