From 925751080d1562b5ae7d91f496ca168626256684 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 4 Feb 2007 19:15:04 +0000 Subject: [PATCH] - Fix call to VidInitialize. - Disable call to HalDisplayReset to avoid bugcheck. [Lock held] - Don't unload bootvid after Phase 3 I/O Init since we still need to call it. - Implement HalpTranslateResourceAddress since bootvid (and other windows boot drivers, potentially) needs it. svn path=/trunk/; revision=25721 --- reactos/drivers/base/bootvid/bootvid.c | 2 +- reactos/hal/halx86/generic/bus.c | 24 ++++++++++++++++++- .../include/reactos/drivers/bootvid/bootvid.h | 7 +++--- reactos/ntoskrnl/inbv/inbv.c | 5 +--- reactos/ntoskrnl/io/iomgr/driver.c | 2 +- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/reactos/drivers/base/bootvid/bootvid.c b/reactos/drivers/base/bootvid/bootvid.c index 4f93f045ec4..5dac44df3be 100644 --- a/reactos/drivers/base/bootvid/bootvid.c +++ b/reactos/drivers/base/bootvid/bootvid.c @@ -423,7 +423,7 @@ TryAgain: // // Reset the display // - HalResetDisplay(); + //HalResetDisplay(); curr_x = 0; curr_y = 0; diff --git a/reactos/hal/halx86/generic/bus.c b/reactos/hal/halx86/generic/bus.c index eef102dce26..7da8f94fbf6 100644 --- a/reactos/hal/halx86/generic/bus.c +++ b/reactos/hal/halx86/generic/bus.c @@ -93,6 +93,28 @@ HalpGetSystemInterruptVector(IN ULONG BusNumber, return Vector; } +BOOLEAN +NTAPI +HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress, + IN OUT PULONG_PTR Context, + IN BOOLEAN NextBus) +{ + /* Make sure we have a context */ + if (!Context) return FALSE; + + /* If we have data in the context, then this shouldn't be a new lookup */ + if ((*Context) && (NextBus == TRUE)) return FALSE; + + /* Return bus data */ + TranslatedAddress->QuadPart = BusAddress.QuadPart; + + /* Set context value and return success */ + *Context = 1; + return TRUE; +} + VOID NTAPI HalpInitNonBusHandler(VOID) @@ -100,7 +122,7 @@ HalpInitNonBusHandler(VOID) /* These should be written by the PCI driver later, but we give defaults */ HalPciTranslateBusAddress = HalpTranslateBusAddress; HalPciAssignSlotResources = HalpAssignSlotResources; - //HalFindBusAddressTranslation = HalpFindBusAddressTranslation; + HalFindBusAddressTranslation = HalpFindBusAddressTranslation; } /* PUBLIC FUNCTIONS **********************************************************/ diff --git a/reactos/include/reactos/drivers/bootvid/bootvid.h b/reactos/include/reactos/drivers/bootvid/bootvid.h index 0e0667982f6..bd10426b290 100644 --- a/reactos/include/reactos/drivers/bootvid/bootvid.h +++ b/reactos/include/reactos/drivers/bootvid/bootvid.h @@ -40,7 +40,7 @@ VidBufferToScreenBlt(IN PUCHAR Buffer, IN ULONG Width, IN ULONG Height, IN ULONG Delta); - + VOID NTAPI VidDisplayString(PUCHAR String); @@ -50,7 +50,7 @@ NTAPI VidBitBlt(PUCHAR Buffer, ULONG Left, ULONG Top); - + VOID NTAPI VidScreenToBufferBlt(PUCHAR Buffer, @@ -59,7 +59,7 @@ VidScreenToBufferBlt(PUCHAR Buffer, ULONG Width, ULONG Height, ULONG Delta); - + VOID NTAPI VidSolidColorFill(IN ULONG Left, @@ -68,5 +68,4 @@ VidSolidColorFill(IN ULONG Left, IN ULONG Bottom, IN UCHAR Color); - #endif diff --git a/reactos/ntoskrnl/inbv/inbv.c b/reactos/ntoskrnl/inbv/inbv.c index 551e60c944a..95e48a2316f 100644 --- a/reactos/ntoskrnl/inbv/inbv.c +++ b/reactos/ntoskrnl/inbv/inbv.c @@ -104,8 +104,7 @@ InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock, } /* Initialize the video */ - InbvBootDriverInstalled = VidInitialize(CustomLogo); - DPRINT1("Init: %lx\n", InbvBootDriverInstalled); + InbvBootDriverInstalled = VidInitialize(!CustomLogo); if (InbvBootDriverInstalled) { /* Find bitmap resources in the kernel */ @@ -239,10 +238,8 @@ InbvDisplayString(IN PCHAR String) /* Acquire the lock */ InbvAcquireLock(); -#if 0 /* Make sure we're installed and display the string */ if (InbvBootDriverInstalled) VidDisplayString(String); -#endif /* Call Headless (We don't support headless for now) HeadlessDispatch(DISPLAY_STRING); */ diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index e959c055e85..fb551ab0787 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -1018,7 +1018,7 @@ IopInitializeBootDrivers(VOID) } /* Loop modules again */ - NextEntry = ListHead->Flink->Flink->Flink; + NextEntry = ListHead->Flink->Flink->Flink->Flink; while (ListHead != NextEntry) { /* Get the entry */