FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
acpi.h
Go to the documentation of this file.
1
11#ifndef __ACPI_H_
12#define __ACPI_H_ 1
13
14#include <stdint.h>
15#include <stddef.h>
16
17extern char* oem_name;
18
19extern bool virtualized;
20
21struct sdt {
22 char signature[4];
23 uint32_t length;
24 uint8_t rev;
25 uint8_t checksum;
26 char oem_id[6];
27 char oem_table_id[8];
28 uint32_t oem_rev;
29 uint32_t creator_id;
30 uint32_t creator_rev;
31} __attribute__((packed));
32
33struct acpi_gas {
34 uint8_t address_space;
35 uint8_t bit_width;
36 uint8_t bit_offset;
37 uint8_t access_size;
38 uint64_t address;
39};
40
41
46void acpi_init();
47
55void *acpi_find_sdt(const char *signature, size_t index);
56
62void acpi_reboot(uintptr_t hhdm_offset);
63
64#endif
void acpi_reboot(uintptr_t hhdm_offset)
Reboots using ACPI, if ACPI is unresponsive it tires hard reset and then triple fault.
void * acpi_find_sdt(const char *signature, size_t index)
Searches for an STD Header in the ACPI Tables.
struct acpi_gas __attribute__
Physical Region Descriptor Table (PRDT) entry.
Definition ahci.h:71
void acpi_init()
Initializes and iterates through all ACPI tables.
Definition acpi.h:21