FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
acpi.h File Reference

The ACPI Header. More...

#include <stdint.h>
#include <stddef.h>
Include dependency graph for acpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sdt
struct  acpi_gas

Functions

struct sdt __attribute__ ((packed))
 AHCI command header structure.
void acpi_init ()
 Initializes and iterates through all ACPI tables.
void * acpi_find_sdt (const char *signature, size_t index)
 Searches for an STD Header in the ACPI Tables.
void acpi_reboot (uintptr_t hhdm_offset)
 Reboots using ACPI, if ACPI is unresponsive it tires hard reset and then triple fault.

Variables

char * oem_name
bool virtualized
char signature [4]
uint32_t length
uint8_t rev
uint8_t checksum
char oem_id [6]
char oem_table_id [8]
uint32_t oem_rev
uint32_t creator_id
uint32_t creator_rev
struct acpi_gas __attribute__
 Physical Region Descriptor Table (PRDT) entry.

Detailed Description

The ACPI Header.

Author
Pradosh & Mintsuki (https://github.com/mintsuki)
Version
0.1
Date
2023-10-29

Definition in file acpi.h.

Function Documentation

◆ __attribute__()

struct sdt __attribute__ ( (packed) )

AHCI command header structure.

AHCI command table structure.

Physical Region Descriptor Table (PRDT) entry.

Represents the command header for a single AHCI port.

AHCI command header structure.

Definition at line 1 of file ahci.h.

◆ acpi_find_sdt()

void * acpi_find_sdt ( const char * signature,
size_t index )

Searches for an STD Header in the ACPI Tables.

Parameters
signatureSignature of the requested STD Header
indexThe index of the requested SDT Header
Returns
Address of the ACPI Table

◆ acpi_reboot()

void acpi_reboot ( uintptr_t hhdm_offset)

Reboots using ACPI, if ACPI is unresponsive it tires hard reset and then triple fault.

Parameters
hhdm_offsetThe HHDM Offset offered by Limine bootloader.

Variable Documentation

◆ __attribute__

struct __attribute__

Physical Region Descriptor Table (PRDT) entry.

AHCI command table structure.

Definition at line 57 of file ahci.h.

◆ checksum

uint8_t checksum

Definition at line 3 of file acpi.h.

◆ creator_id

uint32_t creator_id

Definition at line 7 of file acpi.h.

◆ creator_rev

uint32_t creator_rev

Definition at line 8 of file acpi.h.

◆ length

uint32_t length

Definition at line 1 of file acpi.h.

◆ oem_id

char oem_id[6]

Definition at line 4 of file acpi.h.

◆ oem_rev

uint32_t oem_rev

Definition at line 6 of file acpi.h.

◆ oem_table_id

char oem_table_id[8]

Definition at line 5 of file acpi.h.

◆ rev

uint8_t rev

Definition at line 2 of file acpi.h.

◆ signature

char signature[4]

Definition at line 0 of file acpi.h.