]> xenbits.xensource.com Git - seabios.git/commitdiff
Move fw/mptable.h to std/mptable.h.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 15 Sep 2013 02:48:04 +0000 (22:48 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 19 Sep 2013 00:48:34 +0000 (20:48 -0400)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/fw/biostables.c
src/fw/mptable.c
src/fw/mptable.h [deleted file]
src/fw/paravirt.c
src/std/mptable.h [new file with mode: 0644]
src/util.h

index 5200e65fe2e8de503d7cfb5e40c88fda491d0890..fea7511e107b0fe5e021af6e46bf250bc856abbb 100644 (file)
@@ -7,8 +7,8 @@
 #include "acpi.h" // struct rsdp_descriptor
 #include "config.h" // CONFIG_*
 #include "malloc.h" // malloc_fseg
-#include "mptable.h" // MPTABLE_SIGNATURE
 #include "output.h" // dprintf
+#include "std/mptable.h" // MPTABLE_SIGNATURE
 #include "std/pirtable.h" // struct pir_header
 #include "std/smbios.h" // struct smbios_entry_point
 #include "string.h" // memcpy
index 9877bae4dc9517c745af45b94ba1831e97a312f0..b4534693c04e83d280843743ce9b6e439c0241d1 100644 (file)
@@ -9,9 +9,9 @@
 #include "hw/pci.h"
 #include "hw/pci_regs.h"
 #include "malloc.h" // free
-#include "mptable.h" // MPTABLE_SIGNATURE
 #include "output.h" // dprintf
 #include "romfile.h" // romfile_loadint
+#include "std/mptable.h" // MPTABLE_SIGNATURE
 #include "string.h" // memset
 #include "util.h" // MaxCountCPUs
 #include "x86.h" // cpuid
diff --git a/src/fw/mptable.h b/src/fw/mptable.h
deleted file mode 100644 (file)
index 6252854..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __MPTABLE_H
-#define __MPTABLE_H
-
-#include "types.h" // u32
-
-#define MPTABLE_SIGNATURE 0x5f504d5f  // "_MP_"
-
-struct mptable_floating_s {
-    u32 signature;
-    u32 physaddr;
-    u8 length;
-    u8 spec_rev;
-    u8 checksum;
-    u8 feature1;
-    u8 feature2;
-    u8 reserved[3];
-};
-
-#define MPCONFIG_SIGNATURE 0x504d4350  // "PCMP"
-
-struct mptable_config_s {
-    u32 signature;
-    u16 length;
-    u8 spec;
-    u8 checksum;
-    char oemid[8];
-    char productid[12];
-    u32 oemptr;
-    u16 oemsize;
-    u16 entrycount;
-    u32 lapic;
-    u16 exttable_length;
-    u8 exttable_checksum;
-    u8 reserved;
-} PACKED;
-
-#define MPT_TYPE_CPU 0
-#define MPT_TYPE_BUS 1
-#define MPT_TYPE_IOAPIC 2
-#define MPT_TYPE_INTSRC 3
-#define MPT_TYPE_LOCAL_INT 4
-
-struct mpt_cpu {
-    u8 type;
-    u8 apicid;
-    u8 apicver;
-    u8 cpuflag;
-    u32 cpusignature;
-    u32 featureflag;
-    u32 reserved[2];
-} PACKED;
-
-struct mpt_bus {
-    u8 type;
-    u8 busid;
-    char bustype[6];
-} PACKED;
-
-struct mpt_ioapic {
-    u8 type;
-    u8 apicid;
-    u8 apicver;
-    u8 flags;
-    u32 apicaddr;
-} PACKED;
-
-struct mpt_intsrc {
-    u8 type;
-    u8 irqtype;
-    u16 irqflag;
-    u8 srcbus;
-    u8 srcbusirq;
-    u8 dstapic;
-    u8 dstirq;
-} PACKED;
-
-// mptable.c
-void mptable_setup(void);
-
-#endif // mptable.h
index a49c80a730a6093470a34aafc5e239e5f07a27a1..573511c207d83e822d0fb8e661d6046ba3f43c0b 100644 (file)
@@ -16,7 +16,6 @@
 #include "ioport.h" // outw
 #include "malloc.h" // malloc_tmp
 #include "memmap.h" // add_e820
-#include "mptable.h" // mptable_setup
 #include "output.h" // dprintf
 #include "paravirt.h" // qemu_cfg_preinit
 #include "romfile.h" // romfile_loadint
diff --git a/src/std/mptable.h b/src/std/mptable.h
new file mode 100644 (file)
index 0000000..fa6a229
--- /dev/null
@@ -0,0 +1,77 @@
+#ifndef __MPTABLE_H
+#define __MPTABLE_H
+
+#include "types.h" // u32
+
+#define MPTABLE_SIGNATURE 0x5f504d5f  // "_MP_"
+
+struct mptable_floating_s {
+    u32 signature;
+    u32 physaddr;
+    u8 length;
+    u8 spec_rev;
+    u8 checksum;
+    u8 feature1;
+    u8 feature2;
+    u8 reserved[3];
+};
+
+#define MPCONFIG_SIGNATURE 0x504d4350  // "PCMP"
+
+struct mptable_config_s {
+    u32 signature;
+    u16 length;
+    u8 spec;
+    u8 checksum;
+    char oemid[8];
+    char productid[12];
+    u32 oemptr;
+    u16 oemsize;
+    u16 entrycount;
+    u32 lapic;
+    u16 exttable_length;
+    u8 exttable_checksum;
+    u8 reserved;
+} PACKED;
+
+#define MPT_TYPE_CPU 0
+#define MPT_TYPE_BUS 1
+#define MPT_TYPE_IOAPIC 2
+#define MPT_TYPE_INTSRC 3
+#define MPT_TYPE_LOCAL_INT 4
+
+struct mpt_cpu {
+    u8 type;
+    u8 apicid;
+    u8 apicver;
+    u8 cpuflag;
+    u32 cpusignature;
+    u32 featureflag;
+    u32 reserved[2];
+} PACKED;
+
+struct mpt_bus {
+    u8 type;
+    u8 busid;
+    char bustype[6];
+} PACKED;
+
+struct mpt_ioapic {
+    u8 type;
+    u8 apicid;
+    u8 apicver;
+    u8 flags;
+    u32 apicaddr;
+} PACKED;
+
+struct mpt_intsrc {
+    u8 type;
+    u8 irqtype;
+    u16 irqflag;
+    u8 srcbus;
+    u8 srcbusirq;
+    u8 dstapic;
+    u8 dstirq;
+} PACKED;
+
+#endif // mptable.h
index 0b3a8e7e15671fff0bd14ef065b80611222ba5bb..ab45ac67aaf6802eb00c0b6ee9a7c2f0ef1327c8 100644 (file)
@@ -61,6 +61,9 @@ int csm_bootprio_fdc(struct pci_device *pci, int port, int fdid);
 int csm_bootprio_ata(struct pci_device *pci, int chanid, int slave);
 int csm_bootprio_pci(struct pci_device *pci);
 
+// fw/mptable.c
+void mptable_setup(void);
+
 // fw/shadow.c
 void make_bios_writable(void);
 void make_bios_readonly(void);