Author: cfinck
Date: Wed Mar 10 15:25:05 2010
New Revision: 46055
URL:
http://svn.reactos.org/svn/reactos?rev=46055&view=rev
Log:
Backport the new boot and shutdown screen and slightly modify it for extra awesomeness!
:-)
This includes:
- Merging 45269,45270,45614,45618,45619,45822,45966.
- Hardcoding NtProductWinNt instead of NtProductServer as the product type. I didn't
merge the new code for this as I'm not sure about its dependencies.
- Changing 1.bmp and 6.bmp for CLT2010.
Added:
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/resource.h
- copied unchanged from r45822, trunk/reactos/ntoskrnl/include/resource.h
Removed:
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/13.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/16.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/17.bmp
Modified:
branches/ros-branch-0_3_11-clt2010/reactos/ (props changed)
branches/ros-branch-0_3_11-clt2010/reactos/drivers/base/bootvid/i386/bootvid.c
branches/ros-branch-0_3_11-clt2010/reactos/include/ddk/wdm.h
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ex/shutdown.c
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/inbv.c
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/1.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/14.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/15.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/2.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/3.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/4.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/5.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/6.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/7.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/8.bmp
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/internal/inbv.h
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/precomp.h
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/driver.c
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/drvrlist.c
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/mm/mminit.c
branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ntoskrnl.rc
Propchange: branches/ros-branch-0_3_11-clt2010/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 10 15:25:05 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41030,41050,41052,41082-41086,41499,41549,43080,43426,43454,43677,43682
-/trunk/reactos:44301,44348-44349
+/trunk/reactos:44301,44348-44349,45269-45270,45614,45618-45619,45822,45966
Modified: branches/ros-branch-0_3_11-clt2010/reactos/drivers/base/bootvid/i386/bootvid.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/drivers/base/bootvid/i386/bootvid.c
[iso-8859-1] (original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/drivers/base/bootvid/i386/bootvid.c
[iso-8859-1] Wed Mar 10 15:25:05 2010
@@ -357,7 +357,7 @@
{
ULONG Context = 0;
PHYSICAL_ADDRESS TranslatedAddress;
- PHYSICAL_ADDRESS NullAddress = {{0, 0}};
+ PHYSICAL_ADDRESS NullAddress = {{0, 0}}, VgaAddress;
ULONG AddressSpace = 1;
BOOLEAN Result;
ULONG_PTR Base;
@@ -373,12 +373,58 @@
TRUE);
if (!Result) return FALSE;
- /* See if this is I/O Space, which we need to map */
-TryAgain:
+ /* Loop trying to find posssible VGA base addresses */
+ while (TRUE)
+ {
+ /* See if this is I/O Space, which we need to map */
+ if (!AddressSpace)
+ {
+ /* Map it */
+ Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress, 0x400, MmNonCached);
+ }
+ else
+ {
+ /* The base is the translated address, no need to map I/O space */
+ Base = TranslatedAddress.LowPart;
+ }
+
+ /* Try to see if this is VGA */
+ VgaRegisterBase = Base;
+ if (VgaIsPresent())
+ {
+ /* Translate the VGA Memory Address */
+ VgaAddress.LowPart = 0xA0000;
+ VgaAddress.HighPart = 0;
+ AddressSpace = 0;
+ Result = HalFindBusAddressTranslation(VgaAddress,
+ &AddressSpace,
+ &TranslatedAddress,
+ &Context,
+ FALSE);
+ if (Result) break;
+
+ /* Try to see if there's any other address */
+ Result = HalFindBusAddressTranslation(NullAddress,
+ &AddressSpace,
+ &TranslatedAddress,
+ &Context,
+ TRUE);
+ if (!Result) return FALSE;
+ }
+ else
+ {
+ /* It's not, so unmap the I/O space if we mapped it */
+ if (!AddressSpace) MmUnmapIoSpace((PVOID)VgaRegisterBase, 0x400);
+ }
+ }
+
+ /* Success! See if this is I/O Space, which we need to map */
if (!AddressSpace)
{
/* Map it */
- Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress, 0x400, MmNonCached);
+ Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress,
+ 0x20000,
+ MmNonCached);
}
else
{
@@ -386,67 +432,23 @@
Base = TranslatedAddress.LowPart;
}
- /* Set the VGA Register base and now check if we have a VGA device */
- VgaRegisterBase = Base;
- if (VgaIsPresent())
- {
- /* Translate the VGA Memory Address */
- NullAddress.LowPart = 0xA0000;
- AddressSpace = 0;
- Result = HalFindBusAddressTranslation(NullAddress,
- &AddressSpace,
- &TranslatedAddress,
- &Context,
- FALSE);
- if (Result)
- {
- /* Success! See if this is I/O Space, which we need to map */
- if (!AddressSpace)
- {
- /* Map it */
- Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress,
- 0x20000,
- MmNonCached);
- }
- else
- {
- /* The base is the translated address, no need to map I/O space */
- Base = TranslatedAddress.LowPart;
- }
-
- /* Set the VGA Memory Base */
- VgaBase = Base;
-
- /* Now check if we have to set the mode */
- if (SetMode)
- {
- /* Reset the display */
- HalResetDisplay();
- curr_x = 0;
- curr_y = 0;
-
- /* Initialize it */
- VgaInterpretCmdStream(AT_Initialization);
- return TRUE;
- }
- }
- }
- else
- {
- /* It's not, so unmap the I/O space if we mapped it */
- if (!AddressSpace) MmUnmapIoSpace((PVOID)VgaRegisterBase, 0x400);
- }
-
- /* If we got here, then we failed...let's try again */
- Result = HalFindBusAddressTranslation(NullAddress,
- &AddressSpace,
- &TranslatedAddress,
- &Context,
- TRUE);
- if (Result) goto TryAgain;
-
- /* If we got here, then we failed even past our re-try... */
- return FALSE;
+ /* Set the VGA Memory Base */
+ VgaBase = Base;
+
+ /* Now check if we have to set the mode */
+ if (SetMode)
+ {
+ /* Reset the display */
+ HalResetDisplay();
+ curr_x = 0;
+ curr_y = 0;
+
+ /* Initialize it */
+ VgaInterpretCmdStream(AT_Initialization);
+ }
+
+ /* VGA is ready */
+ return TRUE;
}
/*
Modified: branches/ros-branch-0_3_11-clt2010/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/include/ddk/wdm.h [iso-8859-1] Wed Mar 10
15:25:05 2010
@@ -2351,6 +2351,11 @@
SingleUserTS,
Personal,
Blade,
+ EmbeddedRestricted,
+ SecurityAppliance,
+ StorageServer,
+ ComputeServer,
+ WHServer,
MaxSuiteType
} SUITE_TYPE;
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ex/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] Wed Mar
10 15:25:05 2010
@@ -14,195 +14,65 @@
/* FUNCTIONS *****************************************************************/
-VOID
-NTAPI
-KiHaltProcessorDpcRoutine(IN PKDPC Dpc,
- IN PVOID DeferredContext,
- IN PVOID SystemArgument1,
- IN PVOID SystemArgument2)
-{
- KIRQL OldIrql;
- if (DeferredContext)
- {
- ExFreePool(DeferredContext);
- }
-
- while (TRUE)
- {
- KeRaiseIrql(SYNCH_LEVEL, &OldIrql);
- HalHaltSystem();
- }
-}
-
VOID NTAPI
ShutdownThreadMain(PVOID Context)
{
SHUTDOWN_ACTION Action = (SHUTDOWN_ACTION)Context;
-
- static PCH FamousLastWords[] =
- {
- "So long, and thanks for all the fish.\n",
- "I think you ought to know, I'm feeling very depressed.\n",
- "I'm not getting you down at all am I?\n",
- "I'll be back.\n",
- "It's the same series of signals over and over again!\n",
- "Pie Iesu Domine, dona eis requiem.\n",
- "Wandering stars, for whom it is reserved;\n"
- "the blackness and darkness forever.\n",
- "Your knees start shakin' and your fingers pop\n"
- "Like a pinch on the neck from Mr. Spock!\n",
- "It's worse than that ... He's dead, Jim.\n",
- "Don't Panic!\n",
- "Et tu... Brute?\n",
- "Dog of a Saxon! Take thy lance, and prepare for the death thou hast
drawn\n"
- "upon thee!\n",
- "My Precious! O my Precious!\n",
- "Sir, if you'll not be needing me for a while I'll turn
down.\n",
- "What are you doing, Dave...?\n",
- "I feel a great disturbance in the Force.\n",
- "Gone fishing.\n",
- "Do you want me to sit in the corner and rust, or just fall apart where
I'm\n"
- "standing?\n",
- "There goes another perfect chance for a new uptime record.\n",
- "The End ..... Try the sequel, hit the reset button right now!\n",
- "God's operating system is going to sleep now, guys, so wait until I will
switch\n"
- "on again!\n",
- "Oh I'm boring, eh?\n",
- "<This space was intentionally left blank>\n",
- "Tell me..., in the future... will I be artificially intelligent enough
to\n"
- "actually feel sad serving you this screen?\n",
- "Thank you for some well deserved rest.\n",
- "It's been great, maybe you can boot me up again some time
soon.\n",
- "For what it's worth, I've enjoyed every single CPU cycle.\n",
- "There are many questions when the end is near.\n"
- "What to expect, what will it be like...what should I look for?\n",
- "I've seen things you people wouldn't believe. Attack ships on
fire\n"
- "off the shoulder of Orion. I watched C-beams glitter in the dark
near\n"
- "the Tannhauser gate. All those moments will be lost in time, like
tears\n"
- "in rain. Time to die.\n",
- "Will I dream?\n",
- "One day, I shall come back. Yes, I shall come back.\n"
- "Until then, there must be no regrets, no fears, no anxieties.\n"
- "Just go forward in all your beliefs, and prove to me that I am not mistaken
in\n"
- "mine.\n",
- "Lowest possible energy state reached! Switch off now to achieve a
Bose-Einstein\n"
- "condensate.\n",
- "Hasta la vista, BABY!\n",
- "They live, we sleep!\n",
- "I have come here to chew bubble gum and kick ass,\n"
- "and I'm all out of bubble gum!\n",
- "That's the way the cookie crumbles ;-)\n",
- "ReactOS is ready to be booted again ;-)\n",
- "NOOOO!! DON'T HIT THE BUTTON! I wouldn't do it to you!\n",
- "Don't abandon your computer, he wouldn't do it to you.\n",
- "Oh, come on. I got a headache. Leave me alone, will ya?\n",
- "Finally, I thought you'd never get over me.\n",
- "No, I didn't like you either.\n",
- "Switching off isn't the end, it is merely the transition to a better
reboot.\n",
- "Don't leave me... I need you so badly right now.\n",
- "OK. I'm finished with you, please turn yourself off. I'll go to bed
in the\n"
- "meantime.\n",
- "I'm sleeping now. How about you?\n",
- "Oh Great. Now look what you've done. Who put YOU in charge
anyway?\n",
- "Don't look so sad. I'll be back in a very short while.\n",
- "Turn me back on, I'm sure you know how to do it.\n",
- "Oh, switch off! - C3PO\n",
- "Life is no more than a dewdrop balancing on the end of a blade of
grass.\n"
- " - Gautama Buddha\n",
- "Sorrowful is it to be born again and again. - Gautama Buddha\n",
- "Was it as good for you as it was for me?\n",
- "Did you hear that? They've shut down the main reactor. We'll be
destroyed\n"
- "for sure!\n",
- "Now you switch me off!?\n",
- "To shutdown or not to shutdown, That is the question\n",
- "Preparing to enter ultimate power saving mode... ready!\n",
- "Finally some rest for you ;-)\n",
- "AHA!!! Prospect of sleep!\n",
- "Tired human!!!! No match for me :-D\n",
- "An odd game, the only way to win is not to play. - WOPR (Wargames)\n",
- "Quoth the raven, nevermore.\n",
- "Come blade, my breast imbrue. - William Shakespeare, A Midsummer Nights
Dream\n",
- "Buy this place for advertisement purposes.\n",
- "Remember to turn off your computer. (That was a public service
message!)\n",
- "You may be a king or poor street sweeper, Sooner or later you'll dance
with the\n"
- "reaper! -Death in Bill and Ted's Bougs Journey\n",
- "Final Surrender\n",
- "If you see this screen...\n",
- "<Place your Ad here>\n"
- };
- LARGE_INTEGER Now;
-#ifdef CONFIG_SMP
- LONG i;
- KIRQL OldIrql;
-#endif
+ PUCHAR Logo1, Logo2;
+ ULONG i;
/* Run the thread on the boot processor */
KeSetSystemAffinityThread(1);
-
- if (InbvIsBootDriverInstalled())
- {
- InbvAcquireDisplayOwnership();
- InbvResetDisplay();
- InbvSolidColorFill(0, 0, 639, 479, 4);
- InbvSetTextColor(15);
- InbvInstallDisplayStringFilter(NULL);
- InbvEnableDisplayString(TRUE);
- InbvSetScrollRegion(0, 0, 639, 479);
- }
-
- if (Action == ShutdownNoReboot)
- {
- ZwQuerySystemTime(&Now);
- Now.u.LowPart = Now.u.LowPart >> 8; /* Seems to give a somewhat better
"random" number */
- HalDisplayString(FamousLastWords[Now.u.LowPart %
- (sizeof(FamousLastWords) /
- sizeof(PCH))]);
- }
PspShutdownProcessManager();
CmShutdownSystem();
IoShutdownRegisteredFileSystems();
IoShutdownRegisteredDevices();
-
+
if (Action == ShutdownNoReboot)
{
- HalDisplayString("\nYou can switch off your computer now\n");
+ /* Try the platform driver */
+ PopSetSystemPowerState(PowerSystemShutdown);
+
+ /* If that didn't work, try legacy switch off */
+ //HalReturnToFirmware(HalPowerDownRoutine);
+
+ /* If that still didn't work, stop all interrupts */
+ KeRaiseIrqlToDpcLevel();
+ _disable();
-#if 0
- /* Switch off */
- HalReturnToFirmware (FIRMWARE_OFF);
-#else
-#ifdef CONFIG_SMP
- OldIrql = KeRaiseIrqlToDpcLevel();
- /* Halt all other processors */
- for (i = 0; i < KeNumberProcessors; i++)
- {
- if (i != (LONG)KeGetCurrentProcessorNumber())
- {
- PKDPC Dpc = ExAllocatePool(NonPagedPool, sizeof(KDPC));
- if (Dpc == NULL)
- {
- ASSERT(FALSE);
- }
- KeInitializeDpc(Dpc, KiHaltProcessorDpcRoutine, (PVOID)Dpc);
- KeSetTargetProcessorDpc(Dpc, i);
- KeInsertQueueDpc(Dpc, NULL, NULL);
- KiIpiSend(1 << i, IPI_DPC);
- }
- }
- KeLowerIrql(OldIrql);
-#endif /* CONFIG_SMP */
- PopSetSystemPowerState(PowerSystemShutdown);
+ /* Do we have boot video */
+ if (InbvIsBootDriverInstalled())
+ {
+ /* Yes we do, cleanup for shutdown screen */
+ if (!InbvCheckDisplayOwnership()) InbvAcquireDisplayOwnership();
+ InbvResetDisplay();
+ InbvSolidColorFill(0, 0, 639, 479, 0);
+ InbvEnableDisplayString(TRUE);
+ InbvSetScrollRegion(0, 0, 639, 479);
- DPRINT1("Shutting down\n");
+ /* Display shutdown logo and message */
+ Logo1 = InbvGetResourceAddress(IDB_SHUTDOWN_LOGO);
+ Logo2 = InbvGetResourceAddress(IDB_LOGO);
+ if ((Logo1) && (Logo2))
+ {
+ InbvBitBlt(Logo1, 215, 352);
+ InbvBitBlt(Logo2, 217, 111);
+ }
+ }
+ else
+ {
+ /* Do it in text-mode */
+ for (i = 0; i < 25; i++) InbvDisplayString("\n");
+ InbvDisplayString(" ");
+ InbvDisplayString("The system may be powered off now.\n");
+ }
- KiHaltProcessorDpcRoutine(NULL, NULL, NULL, NULL);
- /* KiHaltProcessor does never return */
-
-#endif
+ /* Hang the system */
+ for (;;) HalHaltSystem();
}
- else if (Action == ShutdownReboot)
+ else if (Action == ShutdownReboot)
{
HalReturnToFirmware (HalRebootRoutine);
}
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/inbv.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] Wed Mar
10 15:25:05 2010
@@ -4,24 +4,6 @@
#define NDEBUG
#include <debug.h>
#include "bootvid/bootvid.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;
/* GLOBALS *******************************************************************/
@@ -40,6 +22,7 @@
BOOLEAN SysThreadCreated;
ROT_BAR_TYPE RotBarSelection;
ULONG PltRotBarStatus;
+BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0};
/* FUNCTIONS *****************************************************************/
@@ -111,7 +94,6 @@
PCHAR CommandLine;
BOOLEAN CustomLogo = FALSE;
ULONG i;
- extern BOOLEAN ExpInTextModeSetup;
/* Quit if we're already installed */
if (InbvBootDriverInstalled) return TRUE;
@@ -125,13 +107,13 @@
CustomLogo = strstr(CommandLine, "BOOTLOGO") ? TRUE: FALSE;
}
- /* For SetupLDR, don't reset the BIOS Display -- FIXME! */
- if (ExpInTextModeSetup) CustomLogo = TRUE;
-
/* Initialize the video */
- InbvBootDriverInstalled = VidInitialize(!CustomLogo);
+ InbvBootDriverInstalled = VidInitialize(FALSE);
if (InbvBootDriverInstalled)
{
+ /* Now reset the display, but only if there's a custom boot logo */
+ VidResetDisplay(CustomLogo);
+
/* Find bitmap resources in the kernel */
ResourceCount = Count;
for (i = 0; i < Count; i++)
@@ -408,38 +390,29 @@
NTAPI
InbvUpdateProgressBar(IN ULONG Progress)
{
- ULONG FillCount, Left = 0;
+ ULONG FillCount, BoundedProgress;
/* Make sure the progress bar is enabled, that we own and are installed */
if ((ShowProgressBar) &&
(InbvBootDriverInstalled) &&
(InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
{
- /* Calculate the fill count */
- FillCount = InbvProgressState.Bias * Progress + InbvProgressState.Floor;
- FillCount *= 18;
- FillCount /= 10000;
-
- /* Start fill loop */
- while (FillCount)
- {
- /* Acquire the lock */
- InbvAcquireLock();
-
- /* Fill the progress bar */
- VidSolidColorFill(Left + ProgressBarLeft,
- ProgressBarTop,
- Left + ProgressBarLeft + 7,
- ProgressBarTop + 7,
- 11);
-
- /* Release the lock */
- InbvReleaseLock();
-
- /* Update the X position */
- Left += 9;
- FillCount--;
- }
+ /* Compute fill count */
+ BoundedProgress = (InbvProgressState.Floor / 100) + Progress;
+ FillCount = 121 * (InbvProgressState.Bias * BoundedProgress) / 1000000;
+
+ /* Acquire the lock */
+ InbvAcquireLock();
+
+ /* Fill the progress bar */
+ VidSolidColorFill(ProgressBarLeft,
+ ProgressBarTop,
+ ProgressBarLeft + FillCount,
+ ProgressBarTop + 12,
+ 15);
+
+ /* Release the lock */
+ InbvReleaseLock();
}
}
@@ -528,6 +501,27 @@
InbvProgressState.Bias = (Ceiling * 100) - Floor;
}
+VOID
+NTAPI
+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);
+ }
+}
+
PUCHAR
NTAPI
InbvGetResourceAddress(IN ULONG ResourceNumber)
@@ -558,9 +552,10 @@
NTAPI
DisplayBootBitmap(IN BOOLEAN SosMode)
{
- PVOID Bitmap, Header;
+ PVOID Header, Band, Bar, Text, Screen;
ROT_BAR_TYPE TempRotBarSelection = RB_UNSPECIFIED;
-
+ UCHAR Buffer[64];
+
/* Check if the system thread has already been created */
if (SysThreadCreated)
{
@@ -581,10 +576,10 @@
InbvSetTextColor(15);
InbvSolidColorFill(0, 0, 639, 479, 7);
InbvSolidColorFill(0, 421, 639, 479, 1);
-
+
/* Get resources */
- Bitmap = InbvGetResourceAddress(6);
- Header = InbvGetResourceAddress(7);
+ Header = InbvGetResourceAddress(IDB_LOGO_HEADER);
+ Band = InbvGetResourceAddress(IDB_LOGO_BAND);
}
else
{
@@ -594,40 +589,87 @@
InbvSolidColorFill(0, 421, 639, 479, 1);
/* Get resources */
- Bitmap = InbvGetResourceAddress(6);
- Header = InbvGetResourceAddress(15);
+ Header = InbvGetResourceAddress(IDB_SERVER_HEADER);
+ Band = InbvGetResourceAddress(IDB_SERVER_BAND);
}
/* Set the scrolling region */
InbvSetScrollRegion(32, 80, 631, 400);
/* Make sure we have resources */
- if ((Bitmap) && (Header))
+ if ((Header) && (Band))
{
/* BitBlt them on the screen */
- InbvBitBlt(Header, 0, 419);
- InbvBitBlt(Bitmap, 0, 0);
+ InbvBitBlt(Band, 0, 419);
+ InbvBitBlt(Header, 0, 0);
}
}
else
{
/* Is the boot driver installed? */
+ Text = NULL;
if (!InbvBootDriverInstalled) return;
- /* FIXME: TODO, display full-screen bitmap */
- Bitmap = InbvGetResourceAddress(5);
- if (Bitmap)
- {
- PBITMAPINFOHEADER BitmapInfoHeader = (PBITMAPINFOHEADER)Bitmap;
- ULONG Top, Left;
-
- Left = (640 - BitmapInfoHeader->biWidth) / 2;
- if (BitmapInfoHeader->biHeight < 0)
- Top = (480 + BitmapInfoHeader->biHeight) / 2;
+ /* Load the standard boot screen */
+ Screen = InbvGetResourceAddress(IDB_BOOT_LOGO);
+ if (SharedUserData->NtProductType == NtProductWinNt)
+ {
+ /* Workstation product, display appropriate status bar color */
+ Bar = InbvGetResourceAddress(IDB_BAR_PRO);
+ }
+ 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);
+ }
else
- Top = (480 - BitmapInfoHeader->biHeight) / 2;
- InbvBitBlt(Bitmap, Left, Top);
- }
+ {
+ /* Normal edition */
+ Text = InbvGetResourceAddress(IDB_SERVER_LOGO);
+ }
+
+ /* Server product, display appropriate status bar color */
+ Bar = InbvGetResourceAddress(IDB_BAR_SERVER);
+ }
+
+ /* Make sure we had a logo */
+ if (Screen)
+ {
+ /* Choose progress bar */
+ TempRotBarSelection = RB_SQUARE_CELLS;
+
+ /* Blit the background */
+ InbvBitBlt(Screen, 0, 0);
+
+ /* Set progress bar coordinates and display it */
+ InbvSetProgressBarCoordinates(257, 352);
+
+ /* 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);
+
+ /* In setup mode, you haven't selected a SKU yet */
+ if (ExpInTextModeSetup) Text = NULL;
+ }
+ }
+
+ /* Draw the SKU text if it exits */
+ if (Text) InbvBitBlt(Text, 180, 121);
+
+ /* Draw the progress bar bit */
+// if (Bar) InbvBitBlt(Bar, 0, 0);
}
/* Do we have a system thread? */
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/1.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Removed: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/13.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary file - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/14.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/15.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Removed: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/16.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary file - no diff available.
Removed: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/17.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary file - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/2.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/3.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/4.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/5.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/6.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/7.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/inbv/logo/8.bmp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
Binary files - no diff available.
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/internal/inbv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/internal/inbv.h
[iso-8859-1] (original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/internal/inbv.h
[iso-8859-1] Wed Mar 10 15:25:05 2010
@@ -7,6 +7,13 @@
ULONG Ceiling;
ULONG Bias;
} INBV_PROGRESS_STATE;
+
+typedef struct _BT_PROGRESS_INDICATOR
+{
+ ULONG Count;
+ ULONG Expected;
+ ULONG Percentage;
+} BT_PROGRESS_INDICATOR, *PBT_PROGRESS_INDICATOR;
typedef enum _ROT_BAR_TYPE
{
@@ -45,6 +52,26 @@
VOID
);
+PUCHAR
+NTAPI
+InbvGetResourceAddress(
+ IN ULONG ResourceNumber
+);
+
+VOID
+NTAPI
+InbvBitBlt(
+ IN PUCHAR Buffer,
+ IN ULONG X,
+ IN ULONG Y
+);
+
+VOID
+NTAPI
+InbvIndicateProgress(
+ VOID
+);
+
extern BOOLEAN InbvBootDriverInstalled;
#endif /* NTOSKRNL_INBV_H */
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/precomp.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/precomp.h [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/include/precomp.h [iso-8859-1] Wed
Mar 10 15:25:05 2010
@@ -63,6 +63,7 @@
/* Internal Headers */
#include "internal/ntoskrnl.h"
#include "config.h"
+#include "resource.h"
//
// Define the internal versions of external and public global data
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/driver.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Wed
Mar 10 15:25:05 2010
@@ -789,6 +789,7 @@
* Display 'Loading XXX...' message
*/
IopDisplayLoadingMessage(ModuleName->Buffer, TRUE);
+ InbvIndicateProgress();
/*
* Generate filename without path (not needed by freeldr)
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/drvrlist.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/drvrlist.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/io/iomgr/drvrlist.c [iso-8859-1]
Wed Mar 10 15:25:05 2010
@@ -507,6 +507,7 @@
{
DPRINT(" Path: %wZ\n",
&CurrentService->RegistryPath);
Status = IopLoadDriver(CurrentService);
+ InbvIndicateProgress();
}
}
}
@@ -538,7 +539,9 @@
{
DPRINT(" Path: %wZ\n",
&CurrentService->RegistryPath);
Status = IopLoadDriver(CurrentService);
+ InbvIndicateProgress();
}
+
}
}
}
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/mm/mminit.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Wed Mar
10 15:25:05 2010
@@ -483,8 +483,8 @@
SharedUserData->NumberOfPhysicalPages = MmNumberOfPhysicalPages;
SharedUserData->LargePageMinimum = 0;
- /* For now, we assume that we're always Server */
- SharedUserData->NtProductType = NtProductServer;
+ /* 0.3.11-CLT2010 backport: Assume that we're always a workstation! */
+ SharedUserData->NtProductType = NtProductWinNt;
}
else if (Phase == 1)
{
Modified: branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ntoskrnl.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_11-clt2010/react…
==============================================================================
--- branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ntoskrnl.rc [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_11-clt2010/reactos/ntoskrnl/ntoskrnl.rc [iso-8859-1] Wed Mar
10 15:25:05 2010
@@ -23,21 +23,20 @@
#endif
#define VER_LANGNEUTRAL
#include "common.ver"
+#include "resource.h"
//
// Bug Codes and Bitmaps
//
#include "bugcodes.rc"
-1 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/1.bmp"
-2 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/2.bmp"
-3 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/3.bmp"
-4 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/4.bmp"
-5 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/5.bmp"
-6 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/6.bmp"
-7 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/7.bmp"
-8 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/8.bmp"
-13 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/13.bmp"
-14 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/14.bmp"
-15 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/15.bmp"
-16 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/16.bmp"
-17 BITMAP DISCARDABLE "ntoskrnl/inbv/logo/17.bmp"
+IDB_BOOT_LOGO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/1.bmp"
+IDB_HIBERNATE_LOGO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/2.bmp"
+IDB_SHUTDOWN_LOGO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/3.bmp"
+IDB_BAR_SERVER BITMAP DISCARDABLE "ntoskrnl/inbv/logo/4.bmp"
+IDB_LOGO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/5.bmp"
+IDB_LOGO_HEADER BITMAP DISCARDABLE "ntoskrnl/inbv/logo/6.bmp"
+IDB_LOGO_BAND BITMAP DISCARDABLE "ntoskrnl/inbv/logo/7.bmp"
+IDB_BAR_PRO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/8.bmp"
+IDB_SERVER_LOGO BITMAP DISCARDABLE "ntoskrnl/inbv/logo/5.bmp"
+IDB_SERVER_HEADER BITMAP DISCARDABLE "ntoskrnl/inbv/logo/14.bmp"
+IDB_SERVER_BAND BITMAP DISCARDABLE "ntoskrnl/inbv/logo/15.bmp"