x86: add GDT and IDT

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
Michael Shaw 2026-04-13 04:23:14 -04:00
commit e5b55a6ba5
25 changed files with 1211 additions and 13 deletions

45
include/drivers/acpi.h Normal file
View file

@ -0,0 +1,45 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _ACPI_H_
#define _ACPI_H_
#include <kernel/common.h>
struct acpi_header {
char signature[4];
u32 length;
u8 revision;
u8 checksum;
char oem_id[6];
char oem_table_id[8];
u32 oem_revision;
u32 creator_id;
u32 creator_revision;
} PACKED;
struct rsdt {
struct acpi_header header;
u32 tables[];
};
struct xsdt {
struct acpi_header header;
u64 tables[];
} PACKED;
struct acpi_mcfg_entry {
u64 base_address;
u16 pci_segment_group;
u8 start_bus_number;
u8 end_bus_number;
u32 reserved;
} PACKED;
struct acpi_mcfg {
struct acpi_header header;
u64 reserved;
struct acpi_mcfg_entry entries[];
} PACKED;
void acpi_init();
#endif /* _ACPI_H_ */