Kevin O'Connor | 276d4a9 | 2008-06-11 22:47:01 -0400 | [diff] [blame] | 1 | #ifndef __ACPI_H |
| 2 | #define __ACPI_H |
| 3 | |
| 4 | #include "types.h" // u32 |
| 5 | |
| 6 | void acpi_bios_init(void); |
Kevin O'Connor | 9967ab7 | 2008-12-18 21:57:33 -0500 | [diff] [blame] | 7 | u32 find_resume_vector(); |
Kevin O'Connor | 276d4a9 | 2008-06-11 22:47:01 -0400 | [diff] [blame] | 8 | |
Kevin O'Connor | e10e6f8 | 2008-06-21 19:46:43 -0400 | [diff] [blame] | 9 | #define RSDP_SIGNATURE 0x2052545020445352LL // "RSD PTR " |
| 10 | |
Kevin O'Connor | 3574644 | 2009-02-27 20:54:51 -0500 | [diff] [blame] | 11 | struct rsdp_descriptor { /* Root System Descriptor Pointer */ |
| 12 | u64 signature; /* ACPI signature, contains "RSD PTR " */ |
| 13 | u8 checksum; /* To make sum of struct == 0 */ |
| 14 | u8 oem_id [6]; /* OEM identification */ |
| 15 | u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */ |
| 16 | u32 rsdt_physical_address; /* 32-bit physical address of RSDT */ |
| 17 | u32 length; /* XSDT Length in bytes including hdr */ |
| 18 | u64 xsdt_physical_address; /* 64-bit physical address of XSDT */ |
| 19 | u8 extended_checksum; /* Checksum of entire table */ |
| 20 | u8 reserved [3]; /* Reserved field must be 0 */ |
Kevin O'Connor | 276d4a9 | 2008-06-11 22:47:01 -0400 | [diff] [blame] | 21 | }; |
| 22 | |
Kevin O'Connor | 9967ab7 | 2008-12-18 21:57:33 -0500 | [diff] [blame] | 23 | extern struct rsdp_descriptor *RsdpAddr; |
| 24 | |
Kevin O'Connor | 276d4a9 | 2008-06-11 22:47:01 -0400 | [diff] [blame] | 25 | #endif // acpi.h |