diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-04-07 16:35:18 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-04-07 16:37:52 -0400 |
commit | 3bd2dc6d5c2a3cec5a28e660b0ece699a0e94c0b (patch) | |
tree | 0fe0caf86869d1d8526a7692a8a9aeddf7be6b0c /src/fw/biostables.c | |
parent | 19646a4b51d41e44df17db6807cb7206c70629e3 (diff) | |
download | seabios-3bd2dc6d5c2a3cec5a28e660b0ece699a0e94c0b.zip seabios-3bd2dc6d5c2a3cec5a28e660b0ece699a0e94c0b.tar.gz seabios-3bd2dc6d5c2a3cec5a28e660b0ece699a0e94c0b.tar.bz2 |
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 <kevin@koconnor.net>
Diffstat (limited to 'src/fw/biostables.c')
-rw-r--r-- | src/fw/biostables.c | 9 |
1 files changed, 6 insertions, 3 deletions
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) |