20 #ifndef KERNEL_MACHINE_X86_COMMON_ACPI_H 21 #define KERNEL_MACHINE_X86_COMMON_ACPI_H 25 #include "../../core/processor/x86_common/Multiprocessor.h" 26 #include "pedigree/kernel/compiler.h" 27 #include "pedigree/kernel/processor/MemoryRegion.h" 28 #include "pedigree/kernel/processor/types.h" 29 #include "pedigree/kernel/utilities/Vector.h" 30 #include "pedigree/kernel/utilities/new" 40 inline static Acpi &instance()
50 inline bool validApicInfo()
const 52 return m_bValidApicInfo;
54 inline uint64_t getLocalApicAddress()
const 56 return m_LocalApicAddress;
64 #if defined(MULTIPROCESSOR) 65 inline bool validProcessorInfo()
const 67 return m_bValidProcessorInfo;
70 getProcessorList()
const 85 Acpi &operator=(const Acpi &);
102 uint64_t xsdtAddress;
103 uint8_t extendedChecksum;
107 struct SystemDescriptionTableHeader
115 uint32_t oemRevision;
117 uint32_t creatorRevision;
120 struct FixedACPIDescriptionTable
122 SystemDescriptionTableHeader header;
124 uint32_t firmwareControl;
126 uint8_t interruptModel;
128 uint16_t sciInterrupt;
129 uint32_t smiCommandPort;
130 uint8_t acpiEnableCommand;
131 uint8_t acpiDisableCommand;
132 uint8_t s4BiosCommand;
134 uint32_t pm1aEventBlock;
135 uint32_t pm1bEventBlock;
136 uint32_t pm1aControlBlock;
137 uint32_t pm1bControlBlock;
138 uint32_t pm2ControlBlock;
139 uint32_t pmTimerBlock;
142 uint8_t pm1EventLength;
143 uint8_t pm1ControlLength;
144 uint8_t pm2ControlLength;
145 uint8_t pmTimerLength;
146 uint8_t gpe0BlockLength;
147 uint8_t gpe1BlockLength;
150 uint16_t pmLevel2Latency;
151 uint16_t pmLevel3Latency;
153 uint16_t flushStride;
156 uint8_t cmosDayAlarmIndex;
157 uint8_t cmosMonthAlarmIndex;
158 uint8_t cmosCenturyIndex;
159 uint8_t reserved3[3];
163 struct ProcessorLocalApic
175 uint32_t globalSystemInterruptBase;
178 struct InterruptSourceOverride
182 uint8_t globalSystemInterrupt;
192 bool checksum(const RsdtPointer *pRdstPointer) INITIALISATION_ONLY;
194 checksum(const SystemDescriptionTableHeader *pHeader) INITIALISATION_ONLY;
197 RsdtPointer *m_pRsdtPointer;
199 SystemDescriptionTableHeader *m_pRsdt;
200 FixedACPIDescriptionTable *m_pFacp;
203 SystemDescriptionTableHeader *m_pApic;
205 bool m_bValidApicInfo;
207 uint64_t m_LocalApicAddress;
210 #if defined(MULTIPROCESSOR) 211 bool m_bValidProcessorInfo;
216 static Acpi m_Instance;
#define INITIALISATION_ONLY
A vector / dynamic array.
Special memory entity in the kernel's virtual address space.