Add support for limine RSDP request
This commit is contained in:
parent
4410dde3f2
commit
0cc86fc37d
8 changed files with 83 additions and 0 deletions
36
include/kernel/acpi.h
Normal file
36
include/kernel/acpi.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef _ACPI_H_
|
||||
#define _ACPI_H_
|
||||
|
||||
#ifndef __ASM__
|
||||
|
||||
#include <kernel/common.h>
|
||||
|
||||
struct rsdp {
|
||||
char signature[8];
|
||||
uint8_t checksum;
|
||||
char oemid[6];
|
||||
uint8_t revision;
|
||||
uint32_t rsdt_addr;
|
||||
|
||||
uint32_t length;
|
||||
uint64_t xsdt_addr; /* the REAL address */
|
||||
uint8_t checksum_ext;
|
||||
char reserved[3];
|
||||
} PACKED;
|
||||
|
||||
struct acpi_header {
|
||||
char signature[4];
|
||||
uint32_t length;
|
||||
uint8_t revision;
|
||||
uint8_t checksum;
|
||||
char oem_id[6];
|
||||
char oem_table_id[8];
|
||||
uint32_t oem_revision;
|
||||
uint32_t creator_id;
|
||||
uint32_t creator_revision;
|
||||
} PACKED;
|
||||
|
||||
void acpi_init();
|
||||
|
||||
#endif /* __ASM__ */
|
||||
#endif /* _ACPI_H_ */
|
||||
|
|
@ -7,4 +7,6 @@
|
|||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define PACKED __attribute__((packed))
|
||||
|
||||
#endif /* _COMMON_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue