https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16882dcfa40138218db7dc2482175e583bc4c9aa

commit 16882dcfa40138218db7dc2482175e583bc4c9aa
Author:     Victor Perevertkin <[email protected]>
AuthorDate: Sun Jul 2 02:01:11 2023 +0300
Commit:     GitHub <[email protected]>
CommitDate: Sun Jul 2 02:01:11 2023 +0300

    [HALX86] Bugcheck in case the ACPI initialization failed (for ACPI HAL) 
(#5376)
    
    CORE-16302
---
 hal/halx86/generic/halinit.c | 7 ++++++-
 hal/halx86/legacy/halpcat.c  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hal/halx86/generic/halinit.c b/hal/halx86/generic/halinit.c
index f918167cc61..868e1b48ffa 100644
--- a/hal/halx86/generic/halinit.c
+++ b/hal/halx86/generic/halinit.c
@@ -72,6 +72,7 @@ HalInitSystem(IN ULONG BootPhase,
               IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 {
     PKPRCB Prcb = KeGetCurrentPrcb();
+    NTSTATUS Status;
 
     /* Check the boot phase */
     if (BootPhase == 0)
@@ -97,7 +98,11 @@ HalInitSystem(IN ULONG BootPhase,
         }
 
         /* Initialize ACPI */
-        HalpSetupAcpiPhase0(LoaderBlock);
+        Status = HalpSetupAcpiPhase0(LoaderBlock);
+        if (!NT_SUCCESS(Status))
+        {
+            KeBugCheckEx(ACPI_BIOS_ERROR, Status, 0, 0, 0);
+        }
 
         /* Initialize the PICs */
         HalpInitializePICs(TRUE);
diff --git a/hal/halx86/legacy/halpcat.c b/hal/halx86/legacy/halpcat.c
index 445b6924201..36fc91603cf 100644
--- a/hal/halx86/legacy/halpcat.c
+++ b/hal/halx86/legacy/halpcat.c
@@ -35,7 +35,7 @@ NTAPI
 HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 {
     /* There is no ACPI on these HALs */
-    return STATUS_NO_SUCH_DEVICE;
+    return STATUS_SUCCESS;
 }
 
 CODE_SEG("INIT")

Reply via email to