regression: test serial port r/w.
[lunaix-os.git] / lunaix-os / includes / hal / acpi / madt.h
index 72aca46158af180a83657b235fd258275e8931df..538e521837e12167c2fb25bfa53f5f60f2b75c9a 100644 (file)
@@ -13,9 +13,9 @@
  */
 typedef struct
 {
-    uint8_t type;
-    uint8_t length;
-} __attribute__((packed)) acpi_ics_hdr_t;
+    u8_t type;
+    u8_t length;
+} ACPI_TABLE_PACKED acpi_ics_hdr_t;
 
 /**
  * @brief ACPI Processor Local APIC Structure (PLAS)
@@ -26,10 +26,10 @@ typedef struct
 typedef struct
 {
     acpi_ics_hdr_t header;
-    uint8_t processor_id;
-    uint8_t apic_id;
-    uint32_t flags;
-} __attribute__((packed)) acpi_apic_t;
+    u8_t processor_id;
+    u8_t apic_id;
+    u32_t flags;
+} ACPI_TABLE_PACKED acpi_apic_t;
 
 /**
  * @brief ACPI IO APIC Structure (IOAS)
@@ -41,12 +41,13 @@ typedef struct
 typedef struct
 {
     acpi_ics_hdr_t header;
-    uint8_t ioapic_id;
-    uint8_t reserved;
-    uint32_t ioapic_addr;
-    // The global system interrupt offset for this IOAPIC. (Kind of IRQ offset for a slave IOAPIC)
-    uint32_t gis_offset;
-} __attribute__((packed)) acpi_ioapic_t;
+    u8_t ioapic_id;
+    u8_t reserved;
+    u32_t ioapic_addr;
+    // The global system interrupt offset for this IOAPIC. (Kind of IRQ offset
+    // for a slave IOAPIC)
+    u32_t gis_offset;
+} ACPI_TABLE_PACKED acpi_ioapic_t;
 
 /**
  * @brief ACPI Interrupt Source Override (INTSO)
@@ -60,22 +61,22 @@ typedef struct
 typedef struct
 {
     acpi_ics_hdr_t header;
-    uint8_t bus;
+    u8_t bus;
     // source, which is the original IRQ back in the era of IBM PC/AT, the 8259
     // PIC
-    uint8_t source;
+    u8_t source;
     // global system interrupt. The override of source in APIC mode
-    uint32_t gsi;
-    uint16_t flags;
-} __attribute__((packed)) acpi_intso_t;
+    u32_t gsi;
+    u16_t flags;
+} ACPI_TABLE_PACKED acpi_intso_t;
 
 typedef struct
 {
     acpi_sdthdr_t header;
     void* apic_addr;
-    uint32_t flags;
+    u32_t flags;
     // Here is a bunch of packed ICS reside here back-to-back.
-} __attribute__((packed)) acpi_madt_t;
+} ACPI_TABLE_PACKED acpi_madt_t;
 
 typedef struct
 {
@@ -83,6 +84,6 @@ typedef struct
     acpi_apic_t* apic;
     acpi_ioapic_t* ioapic;
     acpi_intso_t** irq_exception;
-} __attribute__((packed)) acpi_madt_toc_t;
+} ACPI_TABLE_PACKED acpi_madt_toc_t;
 
 #endif /* __LUNAIX_ACPI_MADT_H */