git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unit testing framework and devicetree framework refactoring (#50)
[lunaix-os.git]
/
lunaix-os
/
includes
/
hal
/
acpi
/
madt.h
diff --git
a/lunaix-os/includes/hal/acpi/madt.h
b/lunaix-os/includes/hal/acpi/madt.h
index ef03bfd5b013dc74ef97dec0c60e3d394faec940..c12ab28b02d148e4d5af6ba968f724d7ac25d8cf 100644
(file)
--- a/
lunaix-os/includes/hal/acpi/madt.h
+++ b/
lunaix-os/includes/hal/acpi/madt.h
@@
-13,9
+13,10
@@
*/
typedef struct
{
*/
typedef struct
{
- u
int
8_t type;
- u
int
8_t length;
+ u8_t type;
+ u8_t length;
} ACPI_TABLE_PACKED acpi_ics_hdr_t;
} ACPI_TABLE_PACKED acpi_ics_hdr_t;
+#define __acpi_ics_hdr(acpi_ptr) ((acpi_ics_hdr_t*)__ptr(acpi_ptr))
/**
* @brief ACPI Processor Local APIC Structure (PLAS)
/**
* @brief ACPI Processor Local APIC Structure (PLAS)
@@
-26,10
+27,11
@@
typedef struct
typedef struct
{
acpi_ics_hdr_t header;
typedef struct
{
acpi_ics_hdr_t header;
- u
int
8_t processor_id;
- u
int
8_t apic_id;
- u
int
32_t flags;
+ u8_t processor_id;
+ u8_t apic_id;
+ u32_t flags;
} ACPI_TABLE_PACKED acpi_apic_t;
} ACPI_TABLE_PACKED acpi_apic_t;
+#define __acpi_apic(acpi_ptr) ((acpi_apic_t*)__ptr(acpi_ptr))
/**
* @brief ACPI IO APIC Structure (IOAS)
/**
* @brief ACPI IO APIC Structure (IOAS)
@@
-41,12
+43,14
@@
typedef struct
typedef struct
{
acpi_ics_hdr_t header;
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;
+ 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;
} ACPI_TABLE_PACKED acpi_ioapic_t;
+#define __acpi_ioapic(acpi_ptr) ((acpi_ioapic_t*)__ptr(acpi_ptr))
/**
* @brief ACPI Interrupt Source Override (INTSO)
/**
* @brief ACPI Interrupt Source Override (INTSO)
@@
-60,26
+64,28
@@
typedef struct
typedef struct
{
acpi_ics_hdr_t header;
typedef struct
{
acpi_ics_hdr_t header;
- u
int
8_t bus;
+ u8_t bus;
// source, which is the original IRQ back in the era of IBM PC/AT, the 8259
// PIC
// source, which is the original IRQ back in the era of IBM PC/AT, the 8259
// PIC
- u
int
8_t source;
+ u8_t source;
// global system interrupt. The override of source in APIC mode
// global system interrupt. The override of source in APIC mode
- u
int
32_t gsi;
- u
int
16_t flags;
+ u32_t gsi;
+ u16_t flags;
} ACPI_TABLE_PACKED acpi_intso_t;
} ACPI_TABLE_PACKED acpi_intso_t;
+#define __acpi_intso(acpi_ptr) ((acpi_intso_t*)__ptr(acpi_ptr))
typedef struct
{
acpi_sdthdr_t header;
typedef struct
{
acpi_sdthdr_t header;
-
void*
apic_addr;
- u
int
32_t flags;
+
u32_t
apic_addr;
+ u32_t flags;
// Here is a bunch of packed ICS reside here back-to-back.
} ACPI_TABLE_PACKED acpi_madt_t;
// Here is a bunch of packed ICS reside here back-to-back.
} ACPI_TABLE_PACKED acpi_madt_t;
+#define __acpi_madt(acpi_ptr) ((acpi_madt_t*)__ptr(acpi_ptr))
typedef struct
{
typedef struct
{
-
void*
apic_addr;
+
u32_t
apic_addr;
acpi_apic_t* apic;
acpi_ioapic_t* ioapic;
acpi_intso_t** irq_exception;
acpi_apic_t* apic;
acpi_ioapic_t* ioapic;
acpi_intso_t** irq_exception;