MOS Source Code
Loading...
Searching...
No Matches
acpi.c File Reference
+ Include dependency graph for acpi.c:

Go to the source code of this file.

Classes

struct  acpi_sysfs_item_t
 

Macros

#define do_verify_checksum(var, header, type)
 

Functions

static void __sysfs_acpi_init (void)
 
 MOS_INIT (SYSFS, __sysfs_acpi_init)
 
static bool acpi_sysfs_mmap (sysfs_file_t *f, vmap_t *vmap, off_t offset)
 
static bool acpi_sysfs_munmap (sysfs_file_t *f, vmap_t *vmap, bool *unmapped)
 
static void register_sysfs_acpi_rsdp (const acpi_rsdp_t *rsdp)
 
static void register_sysfs_acpi_node (const char table_name[4], const acpi_sdt_header_t *header)
 
should_inline bool verify_sdt_checksum (const acpi_sdt_header_t *tableHeader)
 
static void do_handle_sdt_header (const acpi_sdt_header_t *const header)
 
static void do_iterate_sdts (const acpi_rsdp_t *rsdp)
 
void acpi_parse_rsdt (const acpi_rsdp_t *rsdp)
 
const acpi_rsdp_tacpi_find_rsdp (ptr_t start, size_t size)
 

Variables

ptr_t x86_acpi_dsdt = 0
 
static sysfs_item_t acpi_sysfs_items []
 
static sysfs_dir_t __sysfs_acpi = { .list_node = LIST_NODE_INIT(__sysfs_acpi), .name = "acpi", .items = acpi_sysfs_items, .num_items = MOS_ARRAY_SIZE(acpi_sysfs_items), ._dentry = NULL, ._dynamic_items = LIST_HEAD_INIT(__sysfs_acpi._dynamic_items), }
 

Macro Definition Documentation

◆ do_verify_checksum

#define do_verify_checksum ( var,
header,
type )
Value:
var = container_of(header, type, sdt_header); \
if (!verify_sdt_checksum(&(var)->sdt_header)) \
mos_panic(#type " checksum error");
should_inline bool verify_sdt_checksum(const acpi_sdt_header_t *tableHeader)
Definition acpi.c:100
#define container_of(ptr, type, member)
Definition mos_global.h:50

Definition at line 30 of file acpi.c.

Referenced by do_handle_sdt_header(), and do_iterate_sdts().

Function Documentation

◆ __sysfs_acpi_init()

static void __sysfs_acpi_init ( void )
static

Definition at line 28 of file acpi.c.

◆ MOS_INIT()

MOS_INIT ( SYSFS ,
__sysfs_acpi_init  )

◆ acpi_sysfs_mmap()

static bool acpi_sysfs_mmap ( sysfs_file_t * f,
vmap_t * vmap,
off_t offset )
static

Definition at line 42 of file acpi.c.

Referenced by register_sysfs_acpi_node(), and register_sysfs_acpi_rsdp().

+ Here is the call graph for this function:

◆ acpi_sysfs_munmap()

static bool acpi_sysfs_munmap ( sysfs_file_t * f,
vmap_t * vmap,
bool * unmapped )
static

Definition at line 54 of file acpi.c.

Referenced by register_sysfs_acpi_node(), and register_sysfs_acpi_rsdp().

+ Here is the call graph for this function:

◆ register_sysfs_acpi_rsdp()

static void register_sysfs_acpi_rsdp ( const acpi_rsdp_t * rsdp)
static

Definition at line 62 of file acpi.c.

Referenced by acpi_parse_rsdt().

+ Here is the call graph for this function:

◆ register_sysfs_acpi_node()

static void register_sysfs_acpi_node ( const char table_name[4],
const acpi_sdt_header_t * header )
static

Definition at line 81 of file acpi.c.

Referenced by do_handle_sdt_header().

+ Here is the call graph for this function:

◆ verify_sdt_checksum()

should_inline bool verify_sdt_checksum ( const acpi_sdt_header_t * tableHeader)

Definition at line 100 of file acpi.c.

Referenced by do_handle_sdt_header(), and do_iterate_sdts().

◆ do_handle_sdt_header()

static void do_handle_sdt_header ( const acpi_sdt_header_t *const header)
static

Definition at line 108 of file acpi.c.

Referenced by do_iterate_sdts().

+ Here is the call graph for this function:

◆ do_iterate_sdts()

static void do_iterate_sdts ( const acpi_rsdp_t * rsdp)
static

Definition at line 131 of file acpi.c.

Referenced by acpi_parse_rsdt().

+ Here is the call graph for this function:

◆ acpi_parse_rsdt()

void acpi_parse_rsdt ( const acpi_rsdp_t * rsdp)

Definition at line 173 of file acpi.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

◆ acpi_find_rsdp()

const acpi_rsdp_t * acpi_find_rsdp ( ptr_t start,
size_t size )

Definition at line 180 of file acpi.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

Variable Documentation

◆ x86_acpi_dsdt

ptr_t x86_acpi_dsdt = 0

Definition at line 22 of file acpi.c.

Referenced by do_handle_sdt_header().

◆ acpi_sysfs_items

sysfs_item_t acpi_sysfs_items[]
static
Initial value:
= {
0,
}

Definition at line 24 of file acpi.c.

◆ __sysfs_acpi

sysfs_dir_t __sysfs_acpi = { .list_node = LIST_NODE_INIT(__sysfs_acpi), .name = "acpi", .items = acpi_sysfs_items, .num_items = MOS_ARRAY_SIZE(acpi_sysfs_items), ._dentry = NULL, ._dynamic_items = LIST_HEAD_INIT(__sysfs_acpi._dynamic_items), }
static

Definition at line 28 of file acpi.c.

Referenced by register_sysfs_acpi_node(), and register_sysfs_acpi_rsdp().