NameDateSize

..19-Aug-20199

acpi.hH A D25-Jul-20193.6 KiB

READMEH A D25-Jul-20191.4 KiB

regions.hH A D25-Jul-20193.4 KiB

tables/H25-Jul-201920

README

1<!--
2  Copyright 2017, Data61
3  Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4  ABN 41 687 119 230.
5
6  This software may be distributed and modified according to the terms of
7  the BSD 2-Clause license. Note that NO WARRANTY is provided.
8  See "LICENSE_BSD2.txt" for details.
9
10  @TAG(DATA61_BSD)
11-->
12
13This is a generic, OS independent acpi library.
14
15INITIALISATION
16
17#include <acpi/acpi.h>
18#include <acpi/regions.h>
19
20The function acpi_init will parse the acpi tables and bring them into
21virtual memory. It requires two functions from the user:
22
23    * acpi_map_paddr to map a physical area of memory (to any virtual
24    address).
25    * acpi_unmap_vaddr to unmap an area mapped with the
26    previous function.
27
28The parsing works by mapping in all of the acpi tables one by one and
29copying them to memory allocated with malloc. The mapped table will then
30be unmapped. This avoids requiring all of physical memory to be mapped
31at a constant offset (which isn't an option really, as on x86 this could
32be our entire address range).
33
34FINDING ACPI TABLES
35
36Once acpi_init has been called, use acpi_find_region with the constants
37in acpi/regions.h to find the table you are looking for.
38
39CAUTION
40
41Not all tables are implemented. If you can't find the table you are
42looking for, dig into the source. Sorry.
43
44There are debugging functions in src/printer* and src/browser*. These have
45not been tested recently, but are left in case they are required in future.
46