2021-12-24 19:13:28 +00:00
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
2023-02-03 20:47:05 +00:00
|
|
|
#include "./../../terminal/kterm.h"
|
2023-02-03 19:01:31 +00:00
|
|
|
#include "../../../lib/include/mem.h"
|
2021-12-24 19:13:28 +00:00
|
|
|
struct RSDPTR {
|
|
|
|
char signature[8];
|
|
|
|
uint8_t Checksum ;
|
|
|
|
char OEMID [6];
|
|
|
|
uint8_t Revision;
|
|
|
|
uint32_t RsdtAddress;
|
|
|
|
}__attribute__((packed));
|
|
|
|
|
|
|
|
struct ACPISDTHeader{
|
|
|
|
char Signature[4];
|
|
|
|
uint32_t Length;
|
|
|
|
uint8_t CheckSum;
|
|
|
|
char OEMID[6];
|
|
|
|
char OEMTableID[8];
|
|
|
|
uint32_t OEMRevision;
|
|
|
|
uint32_t CreatorID;
|
|
|
|
uint32_t CreatorRevision;
|
|
|
|
}__attribute__((packed));
|
|
|
|
|
|
|
|
|
|
|
|
struct RSDT{
|
|
|
|
struct ACPISDTHeader header;
|
|
|
|
uint32_t PointerToSDT[]; // Length of array : (header.Length - sizeof(header))/ 4
|
|
|
|
}__attribute__((packed));
|
|
|
|
|
|
|
|
RSDPTR* FindRSD();
|
|
|
|
|
|
|
|
void printRSD(RSDPTR* rsd);
|
|
|
|
|
|
|
|
RSDT* getRSDT(RSDPTR* rsd);
|