aboutsummaryrefslogtreecommitdiff
path: root/src/pirtable.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-12-28 21:50:29 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-12-28 21:50:29 -0500
commit51358db90f6ebff28c17555f4b965d3a66830c64 (patch)
treeb6a10da2274d4be284c2634ff395413e8b8babbd /src/pirtable.c
parent4a754b38ee5f8fa9539e49033063b1854d32ae3e (diff)
downloadseabios-hppa-51358db90f6ebff28c17555f4b965d3a66830c64.zip
seabios-hppa-51358db90f6ebff28c17555f4b965d3a66830c64.tar.gz
seabios-hppa-51358db90f6ebff28c17555f4b965d3a66830c64.tar.bz2
Move pir table offset from ebda to a global variable.
Also, make sure the pir table is defined with the 16bit code.
Diffstat (limited to 'src/pirtable.c')
-rw-r--r--src/pirtable.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pirtable.c b/src/pirtable.c
index 8e3c366..f776ee9 100644
--- a/src/pirtable.c
+++ b/src/pirtable.c
@@ -9,11 +9,16 @@
#include "util.h" // checksum
#include "biosvar.h" // SET_EBDA
+u16 PirOffset VAR16;
+
struct pir_table {
struct pir_header pir;
struct pir_slot slots[6];
-} PACKED PIR_TABLE __aligned(16) = {
-#if CONFIG_PIRTABLE
+} PACKED;
+
+extern struct pir_table PIR_TABLE;
+#if CONFIG_PIRTABLE && !CONFIG_COREBOOT
+struct pir_table PIR_TABLE __aligned(16) VAR16 = {
.pir = {
.version = 0x0100,
.size = sizeof(struct pir_table),
@@ -83,8 +88,8 @@ struct pir_table {
.slot_nr = 5,
},
}
-#endif // CONFIG_PIRTABLE
};
+#endif // CONFIG_PIRTABLE && !CONFIG_COREBOOT
void
create_pirtable()
@@ -96,5 +101,5 @@ create_pirtable()
PIR_TABLE.pir.signature = PIR_SIGNATURE;
PIR_TABLE.pir.checksum = -checksum((u8*)&PIR_TABLE, sizeof(PIR_TABLE));
- SET_EBDA(pir_loc, &PIR_TABLE.pir);
+ PirOffset = (u32)&PIR_TABLE.pir - BUILD_BIOS_ADDR;
}