From 3bd2dc6d5c2a3cec5a28e660b0ece699a0e94c0b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 7 Apr 2014 16:35:18 -0400 Subject: Use biostables.c for copying bios tables even when generating them. Use the biostables.c copy_pir(), copy_smbios(), copy_acpi_rsdp(), and copy_mptable() code even when using the legacy bios table generation code. This unifies the final bios table deployment code between qemu, coreboot, and csm. Signed-off-by: Kevin O'Connor --- src/fw/biostables.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/fw/biostables.c') diff --git a/src/fw/biostables.c b/src/fw/biostables.c index b132734..19fcbf9 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -19,7 +19,7 @@ struct pir_header *PirAddr VARFSEG; -static void +void copy_pir(void *pos) { struct pir_header *p = pos; @@ -41,7 +41,7 @@ copy_pir(void *pos) PirAddr = newpos; } -static void +void copy_mptable(void *pos) { struct mptable_floating_s *p = pos; @@ -53,6 +53,9 @@ copy_mptable(void *pos) return; u32 length = p->length * 16; u16 mpclength = ((struct mptable_config_s *)p->physaddr)->length; + // Allocate final memory location. (In theory the config + // structure can go in high memory, but Linux kernels before + // v2.6.30 crash with that.) struct mptable_floating_s *newpos = malloc_fseg(length + mpclength); if (!newpos) { warn_noalloc(); @@ -93,7 +96,7 @@ get_acpi_rsdp_length(void *pos, unsigned size) struct rsdp_descriptor *RsdpAddr; -static void +void copy_acpi_rsdp(void *pos) { if (RsdpAddr) -- cgit v1.1