PCI fixes
[seabios.git] / src / pirtable.c
index c20a169f7867a86f4879c3ddbbea8e9827ffad6a..433b889ce63efea7dca2a4f59f8f40c5708ca5d6 100644 (file)
 struct pir_table {
     struct pir_header pir;
     struct pir_slot slots[6];
-} PACKED PIR_TABLE VISIBLE16 __attribute__((aligned(16))) = {
+} PACKED PIR_TABLE __attribute__((aligned(16))) = {
 #if CONFIG_PIRTABLE
     .pir = {
-        .signature = PIR_SIGNATURE,
         .version = 0x0100,
         .size = sizeof(struct pir_table),
         .router_devfunc = 0x08,
         .compatible_devid = 0x122e8086,
-        .checksum = 0x37, // XXX - should auto calculate
     },
     .slots = {
         {
@@ -93,6 +91,7 @@ create_pirtable()
     if (! CONFIG_PIRTABLE)
         return;
 
+    PIR_TABLE.pir.signature = PIR_SIGNATURE;
     PIR_TABLE.pir.checksum = -checksum((u8*)&PIR_TABLE, sizeof(PIR_TABLE));
     SET_EBDA(pir_loc, (u32)&PIR_TABLE);
 }