Started fleshing out the storage API
This commit is contained in:
35
kernel/acpi/rsdp.h
Normal file
35
kernel/acpi/rsdp.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "../terminal/kterm.h"
|
||||
#include <CoreLib/Memory.h>
|
||||
#include <stdint-gcc.h>
|
||||
|
||||
struct RSDPDescriptor {
|
||||
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 Revision;
|
||||
uint8_t CheckSum;
|
||||
char OEMID[6];
|
||||
char OEMTableID[8];
|
||||
uint32_t OEMRevision;
|
||||
uint32_t CreatorID;
|
||||
uint32_t CreatorRevision;
|
||||
};
|
||||
|
||||
|
||||
struct RSDT{
|
||||
struct ACPISDTHeader h;
|
||||
uint32_t PointerToSDT[]; // Length of array : (header.Length - sizeof(header))/ 4
|
||||
}__attribute__((packed));
|
||||
RSDPDescriptor* FindRSD();
|
||||
|
||||
void printRSD(RSDPDescriptor* rsd);
|
||||
|
||||
RSDT* getRSDT(RSDPDescriptor* rsd);
|
||||
Reference in New Issue
Block a user