45 lines
720 B
C
45 lines
720 B
C
/* 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_ */
|