[HALX86] Bugcheck in case the ACPI initialization failed (for ACPI HAL) (#5376)

CORE-16302
This commit is contained in:
Victor Perevertkin 2023-07-02 02:01:11 +03:00 committed by GitHub
parent fb1162431d
commit 16882dcfa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -72,6 +72,7 @@ HalInitSystem(IN ULONG BootPhase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock) IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{ {
PKPRCB Prcb = KeGetCurrentPrcb(); PKPRCB Prcb = KeGetCurrentPrcb();
NTSTATUS Status;
/* Check the boot phase */ /* Check the boot phase */
if (BootPhase == 0) if (BootPhase == 0)
@ -97,7 +98,11 @@ HalInitSystem(IN ULONG BootPhase,
} }
/* Initialize ACPI */ /* Initialize ACPI */
HalpSetupAcpiPhase0(LoaderBlock); Status = HalpSetupAcpiPhase0(LoaderBlock);
if (!NT_SUCCESS(Status))
{
KeBugCheckEx(ACPI_BIOS_ERROR, Status, 0, 0, 0);
}
/* Initialize the PICs */ /* Initialize the PICs */
HalpInitializePICs(TRUE); HalpInitializePICs(TRUE);

View file

@ -35,7 +35,7 @@ NTAPI
HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{ {
/* There is no ACPI on these HALs */ /* There is no ACPI on these HALs */
return STATUS_NO_SUCH_DEVICE; return STATUS_SUCCESS;
} }
CODE_SEG("INIT") CODE_SEG("INIT")