29 #define ACPI_SMALL_LEN_MASK 0x03 32 #define ACPI_END_RESOURCE 0x78 51 #define ACPI_LARGE 0x80 54 #define ACPI_QWORD_ADDRESS_SPACE_RESOURCE 0x8a 79 #define ACPI_ADDRESS_TYPE_MEM 0x00 82 #define ACPI_ADDRESS_TYPE_BUS 0x02 209 #define ACPI_SIGNATURE( a, b, c, d ) \ 210 ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) ) 213 #define RSDP_SIGNATURE { 'R', 'S', 'D', ' ', 'P', 'T', 'R', ' ' } 230 #define RSDT_SIGNATURE ACPI_SIGNATURE ( 'R', 'S', 'D', 'T' ) 241 #define FADT_SIGNATURE ACPI_SIGNATURE ( 'F', 'A', 'C', 'P' ) 264 #define ACPI_PM1_CNT 0 265 #define ACPI_PM1_CNT_SLP_TYP(x) ( (x) << 10 ) 266 #define ACPI_PM1_CNT_SLP_EN ( 1 << 13 ) 269 #define ACPI_PM_TMR 0 272 #define DSDT_SIGNATURE ACPI_SIGNATURE ( 'D', 'S', 'D', 'T' ) 275 #define SSDT_SIGNATURE ACPI_SIGNATURE ( 'S', 'S', 'D', 'T' ) 324 #define ACPI_MODELS __table ( struct acpi_model, "acpi_models" ) 327 #define __acpi_model __table_entry ( ACPI_MODELS, 01 ) 336 #define ACPI_INLINE( _subsys, _api_func ) \ 337 SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func ) 346 #define PROVIDE_ACPI( _subsys, _api_func, _func ) \ 347 PROVIDE_SINGLE_API ( ACPI_PREFIX_ ## _subsys, _api_func, _func ) 355 #define PROVIDE_ACPI_INLINE( _subsys, _api_func ) \ 356 PROVIDE_SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func ) 366 #include <bits/acpi.h> 386 #define acpi_describe_TYPE( object_type ) \ 387 typeof ( struct acpi_descriptor * ( object_type ) )
uint16_t len
Length of data items.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint8_t unused[20]
Unused by iPXE.
Standard do-nothing ACPI interface.
struct acpi_qword_address_space_resource qword
QWORD address space resource descriptor.
uint32_t pm2_cnt_blk
PM2 Control Register Block.
struct list_head descs
List of descriptors.
struct acpi_small_resource small
Small resource descriptor.
uint8_t checksum
To make sum of entire table == 0.
static size_t acpi_resource_len(union acpi_resource *res)
Get length of ACPI resource descriptor.
struct acpi_large_resource large
Large resource descriptor.
char oem_id[6]
OEM identification.
static size_t acpi_small_len(struct acpi_small_resource *res)
Get length of ACPI small resource descriptor.
uint64_t desc
Microcode descriptor list physical address.
unsigned long long uint64_t
int acpi_extract(uint32_t signature, void *data, int(*extract)(userptr_t zsdt, size_t len, size_t offset, void *data))
Extract value from DSDT/SSDT.
int(* install)(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
ACPI Root System Description Table (RSDT)
static void(*) struct refcnt refcnt)
uint32_t facs
Physical address of FACS.
Access to external ("user") memory.
static union acpi_resource * acpi_resource_next(union acpi_resource *res)
Get next ACPI resource descriptor.
A doubly-linked list entry (or list head)
struct acpi_model * model
Table model.
static unsigned int acpi_resource_tag(union acpi_resource *res)
Get ACPI resource tag.
static size_t acpi_large_len(struct acpi_large_resource *res)
Get length of ACPI large resource descriptor.
int acpi_install(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
uint32_t userptr_t
A pointer to a user buffer.
uint32_t pm_tmr_blk
PM Timer Control Register Block.
userptr_t acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
uint8_t general
General flags.
void acpi_del(struct acpi_descriptor *desc)
Remove ACPI descriptor.
userptr_t acpi_find_via_rsdt(uint32_t signature, unsigned int index)
Locate ACPI table via RSDT.
void acpi_add(struct acpi_descriptor *desc)
Add ACPI descriptor.
Fixed ACPI Description Table (FADT)
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
struct list_head list
List of ACPI descriptors for this model.
uint64_t max
Maximum address.
char signature[8]
Signature.
uint32_t entry[0]
ACPI table entries.
void acpi_fix_checksum(struct acpi_header *acpi)
Fix up ACPI table checksum.
An ACPI small resource descriptor header.
An ACPI QWORD address space resource descriptor.
uint32_t pm1a_cnt_blk
PM1a Control Register Block.
userptr_t acpi_find(uint32_t signature, unsigned int index)
Locate ACPI table.
#define cpu_to_le32(value)
uint64_t min
Minimum address.
struct acpi_end_resource end
End resource descriptor.
uint64_t offset
Translation offset.
uint8_t type
Resource type.
An ACPI large resource descriptor header.
userptr_t acpi_find_rsdt(void)
Locate ACPI root system description table.
#define le16_to_cpu(value)
An ACPI resource descriptor.
uint64_t granularity
Granularity.
uint8_t specific
Type-specific flags.
struct acpi_header acpi
ACPI header.
#define ACPI_SMALL_LEN_MASK
ACPI small resource length mask.
int(* complete)(struct acpi_descriptor *desc)
Check if ACPI descriptor is complete.
#define INIT_LIST_HEAD(list)
Initialise a list head.
An ACPI descriptor (used to construct ACPI tables)
#define ACPI_LARGE
ACPI large resource flag.
uint32_t dsdt
Physical address of DSDT.
uint32_t pm1b_cnt_blk
PM1b Control Register Block.
uint32_t rsdt
Physical address of RSDT.
struct acpi_descriptor * acpi_describe(struct interface *interface)
Get object's ACPI descriptor.
An ACPI end resource descriptor.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
uint8_t revision
Revision.
uint8_t data[48]
Additional event data.
struct refcnt * refcnt
Reference count of containing object.
uint16_t offset
Offset to command line.
Root System Description Pointer.
u8 signature
CPU signature.
uint8_t checksum
Checksum.
struct acpi_large_resource hdr
Header.
struct acpi_header acpi
ACPI header.
struct acpi_small_resource hdr
Header.
static void acpi_init(struct acpi_descriptor *desc, struct acpi_model *model, struct refcnt *refcnt)
Initialise ACPI descriptor.
userptr_t(* acpi_finder)(uint32_t signature, unsigned int index)