|
PatchworkOS
|
#include <kernel/acpi/tables.h>#include <kernel/acpi/acpi.h>#include <kernel/fs/file.h>#include <kernel/fs/vfs.h>#include <kernel/log/log.h>#include <kernel/log/panic.h>#include <boot/boot_info.h>#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| static uint64_t | acpi_table_read (file_t *file, void *buffer, uint64_t count, uint64_t *offset) |
| static bool | acpi_is_table_valid (sdt_header_t *table) |
| static bool | acpi_is_xsdt_valid (xsdt_t *xsdt) |
| static bool | acpi_is_rsdp_valid (rsdp_t *rsdp) |
| static uint64_t | acpi_tables_push (sdt_header_t *table) |
| static uint64_t | acpi_tables_load_from_xsdt (xsdt_t *xsdt) |
| static uint64_t | acpi_tables_load_from_fadt (void) |
| static uint64_t | acpi_tables_init_handlers (sdt_header_t *table) |
| void | acpi_tables_init (rsdp_t *rsdp) |
| Initialize ACPI tables and call their init handlers. | |
| void | acpi_tables_expose (void) |
| Expose ACPI tables to sysfs. | |
| sdt_header_t * | acpi_tables_lookup (const char *signature, uint64_t n) |
| Lookup the n'th table matching the signature. | |
Variables | |
| static uint64_t | ssdtAmount = 0 |
| static uint64_t | tableAmount = 0 |
| static acpi_cached_table_t * | cachedTables = NULL |
| static dentry_t * | tablesDir = NULL |
| const acpi_sdt_handler_t | _acpiSdtHandlersStart [] |
| const acpi_sdt_handler_t | _acpiSdtHandlersEnd [] |
| static file_ops_t | tableFileOps |
Definition at line 81 of file tables.c.
References acpi_is_checksum_valid(), rsdp_t::length, LOG_ERR, memcmp(), rsdp_t::revision, RSDP_CURRENT_REVISION, RSDP_SIGNATURE_LENGTH, RSDP_V1_LENGTH, and rsdp_t::signature.
Referenced by acpi_tables_init().
|
static |
Definition at line 48 of file tables.c.
References acpi_is_checksum_valid(), sdt_header_t::length, LOG_ERR, SDT_SIGNATURE_LENGTH, and sdt_header_t::signature.
Referenced by acpi_is_xsdt_valid(), and acpi_tables_push().
Definition at line 65 of file tables.c.
References acpi_is_table_valid(), xsdt_t::header, LOG_ERR, memcmp(), SDT_SIGNATURE_LENGTH, and sdt_header_t::signature.
Referenced by acpi_tables_load_from_xsdt().
|
static |
Definition at line 26 of file tables.c.
References buffer, BUFFER_READ, count, EINVAL, ERR, errno, file, dentry_t::inode, sdt_header_t::length, NULL, and inode_t::private.
|
static |
Definition at line 199 of file tables.c.
References _acpiSdtHandlersEnd, _acpiSdtHandlersStart, ERR, LOG_ERR, memcmp(), SDT_SIGNATURE_LENGTH, and sdt_header_t::signature.
Referenced by acpi_tables_init().
|
static |
Definition at line 166 of file tables.c.
References acpi_tables_lookup(), acpi_tables_push(), fadt_t::dsdt, ERR, FADT_SIGNATURE, LOG_ERR, NULL, and fadt_t::xDsdt.
Referenced by acpi_tables_init().
Definition at line 145 of file tables.c.
References acpi_is_xsdt_valid(), acpi_tables_push(), ERR, xsdt_t::header, sdt_header_t::length, LOG_ERR, sdt_header_t::signature, and xsdt_t::tables.
Referenced by acpi_tables_init().
|
static |
Definition at line 115 of file tables.c.
References acpi_is_table_valid(), cachedTables, ERR, free(), sdt_header_t::length, LOG_ERR, LOG_INFO, malloc(), memcpy(), NULL, sdt_header_t::oemId, realloc(), sdt_header_t::revision, SDT_OEM_ID_LENGTH, SDT_SIGNATURE_LENGTH, sdt_header_t::signature, acpi_cached_table_t::table, and tableAmount.
Referenced by acpi_tables_load_from_fadt(), and acpi_tables_load_from_xsdt().
|
extern |
Referenced by acpi_tables_init_handlers().
|
extern |
Referenced by acpi_tables_init_handlers().
|
static |
Definition at line 18 of file tables.c.
Referenced by acpi_tables_expose(), acpi_tables_init(), acpi_tables_lookup(), and acpi_tables_push().
|
static |
Definition at line 16 of file tables.c.
Referenced by acpi_tables_expose().
|
static |
Definition at line 17 of file tables.c.
Referenced by acpi_tables_expose(), acpi_tables_init(), acpi_tables_lookup(), and acpi_tables_push().
|
static |
Definition at line 44 of file tables.c.
Referenced by acpi_tables_expose().
Definition at line 20 of file tables.c.
Referenced by acpi_tables_expose().