ACPI: Always use the loader-reported root pointer.
We always did under EFI but not under BIOS. Now, the BIOS loader reports the root pointer as well, so we don't need to find it again. Change-Id: Ie83adb53f098d44f2688a1a327c084f94afa2673 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8941 Reviewed-by: Fredrik Holmqvist <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
46dd344bdd
commit
72a67f8d8a
@@ -38,8 +38,8 @@ typedef struct {
|
|||||||
// hpet stuff
|
// hpet stuff
|
||||||
uint32 hpet_phys;
|
uint32 hpet_phys;
|
||||||
FixedWidthPointer<void> hpet;
|
FixedWidthPointer<void> hpet;
|
||||||
// needed for UEFI, otherwise kernel acpi support can't find ACPI root
|
|
||||||
FixedWidthPointer<void> acpi_root;
|
FixedWidthPointer<void> acpi_root;
|
||||||
} _PACKED arch_kernel_args;
|
} _PACKED arch_kernel_args;
|
||||||
|
|
||||||
|
|
||||||
#endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */
|
#endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */
|
||||||
|
|||||||
@@ -240,9 +240,6 @@ AcpiOsGetRootPointer()
|
|||||||
phys_addr_t* acpiRootPointer = (phys_addr_t*)get_boot_item("ACPI_ROOT_POINTER", NULL);
|
phys_addr_t* acpiRootPointer = (phys_addr_t*)get_boot_item("ACPI_ROOT_POINTER", NULL);
|
||||||
if (acpiRootPointer != NULL)
|
if (acpiRootPointer != NULL)
|
||||||
sACPIRoot = *acpiRootPointer;
|
sACPIRoot = *acpiRootPointer;
|
||||||
|
|
||||||
if (sACPIRoot == 0)
|
|
||||||
sACPIRoot = arch_init_find_root_pointer();
|
|
||||||
}
|
}
|
||||||
return sACPIRoot;
|
return sACPIRoot;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -13,12 +13,6 @@ extern "C" {
|
|||||||
|
|
||||||
#include "arch_init.h"
|
#include "arch_init.h"
|
||||||
|
|
||||||
ACPI_PHYSICAL_ADDRESS
|
|
||||||
arch_init_find_root_pointer()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_init_interrupt_controller()
|
arch_init_interrupt_controller()
|
||||||
|
|||||||
@@ -22,18 +22,6 @@ extern "C" {
|
|||||||
#define APIC_MODE 1
|
#define APIC_MODE 1
|
||||||
|
|
||||||
|
|
||||||
ACPI_PHYSICAL_ADDRESS
|
|
||||||
arch_init_find_root_pointer()
|
|
||||||
{
|
|
||||||
ACPI_PHYSICAL_ADDRESS address;
|
|
||||||
ACPI_STATUS status = AcpiFindRootPointer(&address);
|
|
||||||
if (status == AE_OK)
|
|
||||||
return address;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_init_interrupt_controller()
|
arch_init_interrupt_controller()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,13 +8,6 @@
|
|||||||
#define ARCH_INIT_H
|
#define ARCH_INIT_H
|
||||||
|
|
||||||
|
|
||||||
/** Find the ACPI root pointer using arch or platform-specific code.
|
|
||||||
*
|
|
||||||
* For example on x86, search for it in the BIOS.
|
|
||||||
*/
|
|
||||||
ACPI_PHYSICAL_ADDRESS arch_init_find_root_pointer();
|
|
||||||
|
|
||||||
|
|
||||||
/** Initialize platform specific interrupt controller configuration.
|
/** Initialize platform specific interrupt controller configuration.
|
||||||
*
|
*
|
||||||
* For example on x86, enable PIC or APIC depending on boot options.
|
* For example on x86, enable PIC or APIC depending on boot options.
|
||||||
|
|||||||
@@ -10,13 +10,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "acpi.h"
|
|
||||||
#include "mmu.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
|
|
||||||
|
#include <boot/stage2.h>
|
||||||
|
|
||||||
|
#include "acpi.h"
|
||||||
|
#include "mmu.h"
|
||||||
|
|
||||||
|
|
||||||
//#define TRACE_ACPI
|
//#define TRACE_ACPI
|
||||||
#ifdef TRACE_ACPI
|
#ifdef TRACE_ACPI
|
||||||
@@ -241,7 +243,9 @@ acpi_init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsdp != NULL && acpi_check_rsdt(rsdp) == B_OK)
|
if (rsdp != NULL && acpi_check_rsdt(rsdp) == B_OK) {
|
||||||
|
gKernelArgs.arch_args.acpi_root = rsdp;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user