PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
tables.c File Reference
#include <kernel/mem/paging_types.h>
#include <kernel/acpi/tables.h>
#include <kernel/fs/file.h>
#include <kernel/fs/sysfs.h>
#include <kernel/fs/vfs.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/acpi/acpi.h>
#include <boot/boot_info.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for tables.c:

Go to the source code of this file.

Functions

static uint64_t acpi_table_read (file_t *file, void *buffer, size_t count, size_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)
 
uint64_t acpi_tables_init (rsdp_t *rsdp)
 Initialize ACPI tables and call their init handlers.
 
uint64_t acpi_tables_expose (void)
 Expose ACPI tables to devfs.
 
sdt_header_tacpi_tables_lookup (const char *signature, uint64_t minSize, 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_tcachedTables = NULL
 
static dentry_ttablesDir = NULL
 
static file_ops_t tableFileOps
 

Function Documentation

◆ acpi_table_read()

static uint64_t acpi_table_read ( file_t file,
void *  buffer,
size_t  count,
size_t offset 
)
static

Definition at line 24 of file tables.c.

◆ acpi_is_table_valid()

static bool acpi_is_table_valid ( sdt_header_t table)
static

Definition at line 46 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_is_xsdt_valid()

static bool acpi_is_xsdt_valid ( xsdt_t xsdt)
static

Definition at line 63 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_is_rsdp_valid()

static bool acpi_is_rsdp_valid ( rsdp_t rsdp)
static

Definition at line 79 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_tables_push()

static uint64_t acpi_tables_push ( sdt_header_t table)
static

Definition at line 110 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_tables_load_from_xsdt()

static uint64_t acpi_tables_load_from_xsdt ( xsdt_t xsdt)
static

Definition at line 140 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ acpi_tables_load_from_fadt()

static uint64_t acpi_tables_load_from_fadt ( void  )
static

Definition at line 161 of file tables.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ssdtAmount

uint64_t ssdtAmount = 0
static

Definition at line 18 of file tables.c.

◆ tableAmount

uint64_t tableAmount = 0
static

Definition at line 19 of file tables.c.

◆ cachedTables

acpi_cached_table_t* cachedTables = NULL
static

Definition at line 20 of file tables.c.

◆ tablesDir

dentry_t* tablesDir = NULL
static

Definition at line 22 of file tables.c.

◆ tableFileOps

file_ops_t tableFileOps
static
Initial value:
= {
.read = acpi_table_read,
}
static uint64_t acpi_table_read(file_t *file, void *buffer, size_t count, size_t *offset)
Definition tables.c:24

Definition at line 42 of file tables.c.