x86: Provide copy of RSDP in bootinfo

This gives a rootserver a way to find the ACPI tables in cases where there is no BIOS region
to scan for an RSDP.
This commit is contained in:
Alexander Boettcher 2017-10-05 13:43:06 +11:00 committed by Adrian Danis
parent e8625c6d81
commit 023977fc4b
4 changed files with 15 additions and 0 deletions

View file

@ -40,6 +40,7 @@ bool_t init_sys_state(
uint32_t num_drhu,
paddr_t* drhu_list,
acpi_rmrr_list_t *rmrr_list,
acpi_rsdp_t *acpi_rsdp,
seL4_X86_BootInfo_VBE *vbe,
seL4_X86_BootInfo_mmap_t *mb_mmap
);

View file

@ -87,5 +87,6 @@ typedef struct {
#define SEL4_BOOTINFO_HEADER_PADDING 0
#define SEL4_BOOTINFO_HEADER_X86_VBE 1
#define SEL4_BOOTINFO_HEADER_X86_MBMMAP 2
#define SEL4_BOOTINFO_HEADER_X86_ACPI_RSDP 3
#endif // __LIBSEL4_BOOTINFO_TYPES_H

View file

@ -251,6 +251,7 @@ init_sys_state(
uint32_t num_drhu,
paddr_t* drhu_list,
acpi_rmrr_list_t *rmrr_list,
acpi_rsdp_t *acpi_rsdp,
seL4_X86_BootInfo_VBE *vbe,
seL4_X86_BootInfo_mmap_t *mb_mmap
)
@ -341,6 +342,17 @@ init_sys_state(
extra_bi_offset += sizeof(seL4_X86_BootInfo_VBE);
}
/* populate acpi rsdp block */
if (acpi_rsdp) {
seL4_BootInfoHeader header;
header.id = SEL4_BOOTINFO_HEADER_X86_ACPI_RSDP;
header.len = sizeof(header) + sizeof(*acpi_rsdp);
memcpy((void*)(extra_bi_region.start + extra_bi_offset), &header, sizeof(header));
extra_bi_offset += sizeof(header);
memcpy((void*)(extra_bi_region.start + extra_bi_offset), acpi_rsdp, sizeof(*acpi_rsdp));
extra_bi_offset += sizeof(*acpi_rsdp);
}
/* populate multiboot mmap block */
mb_mmap->header.id = SEL4_BOOTINFO_HEADER_X86_MBMMAP;
mb_mmap->header.len = mb_mmap_size;

View file

@ -224,6 +224,7 @@ try_boot_sys_node(cpu_id_t cpu_id)
boot_state.num_drhu,
boot_state.drhu_list,
&boot_state.rmrr_list,
&boot_state.acpi_rsdp,
&boot_state.vbe_info,
&boot_state.mb_mmap_info
)) {