|
| #define | ACPI_ADDRESS_TYPE_MEM 0x00 |
| | A memory address space type. More...
|
| |
| #define | ACPI_ADDRESS_TYPE_IO 0x01 |
| | An I/O address space type. More...
|
| |
| #define | ACPI_ADDRESS_TYPE_BUS 0x02 |
| | A bus number address space type. More...
|
| |
| #define | ACPI_SMALL_LEN_MASK 0x03 |
| | ACPI small resource length mask. More...
|
| |
| #define | ACPI_END_RESOURCE 0x78 |
| | An ACPI end resource descriptor. More...
|
| |
| #define | ACPI_LARGE 0x80 |
| | ACPI large resource flag. More...
|
| |
| #define | ACPI_QWORD_ADDRESS_SPACE_RESOURCE 0x8a |
| | An ACPI QWORD address space resource descriptor. More...
|
| |
| #define | ACPI_SIGNATURE(a, b, c, d) ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) ) |
| | Build ACPI signature. More...
|
| |
| #define | RSDP_SIGNATURE { 'R', 'S', 'D', ' ', 'P', 'T', 'R', ' ' } |
| | Root System Description Pointer signature. More...
|
| |
| #define | RSDT_SIGNATURE ACPI_SIGNATURE ( 'R', 'S', 'D', 'T' ) |
| | Root System Description Table (RSDT) signature. More...
|
| |
| #define | FADT_SIGNATURE ACPI_SIGNATURE ( 'F', 'A', 'C', 'P' ) |
| | Fixed ACPI Description Table (FADT) signature. More...
|
| |
| #define | ACPI_PM1_CNT 0 |
| | ACPI PM1 Control Register (within PM1a_CNT_BLK or PM1A_CNT_BLK) More...
|
| |
| #define | ACPI_PM1_CNT_SLP_TYP(x) ( (x) << 10 ) |
| | Sleep type. More...
|
| |
| #define | ACPI_PM1_CNT_SLP_EN ( 1 << 13 ) |
| | Sleep enable. More...
|
| |
| #define | ACPI_PM_TMR 0 |
| | ACPI PM Timer Register (within PM_TMR_BLK) More...
|
| |
| #define | DSDT_SIGNATURE ACPI_SIGNATURE ( 'D', 'S', 'D', 'T' ) |
| | Differentiated System Description Table (DSDT) signature. More...
|
| |
| #define | SSDT_SIGNATURE ACPI_SIGNATURE ( 'S', 'S', 'D', 'T' ) |
| | Secondary System Description Table (SSDT) signature. More...
|
| |
| #define | ACPI_MODELS __table ( struct acpi_model, "acpi_models" ) |
| | ACPI models. More...
|
| |
| #define | __acpi_model __table_entry ( ACPI_MODELS, 01 ) |
| | Declare an ACPI model. More...
|
| |
| #define | ACPI_INLINE(_subsys, _api_func) SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func ) |
| | Calculate static inline ACPI API function name. More...
|
| |
| #define | PROVIDE_ACPI(_subsys, _api_func, _func) PROVIDE_SINGLE_API ( ACPI_PREFIX_ ## _subsys, _api_func, _func ) |
| | Provide an ACPI API implementation. More...
|
| |
| #define | PROVIDE_ACPI_INLINE(_subsys, _api_func) PROVIDE_SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func ) |
| | Provide a static inline ACPI API implementation. More...
|
| |
| #define | acpi_describe_TYPE(object_type) typeof ( struct acpi_descriptor * ( object_type ) ) |
| |
|
| | FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
| |
| static unsigned int | acpi_resource_tag (union acpi_resource *res) |
| | Get ACPI resource tag. More...
|
| |
| static size_t | acpi_small_len (struct acpi_small_resource *res) |
| | Get length of ACPI small resource descriptor. More...
|
| |
| static size_t | acpi_large_len (struct acpi_large_resource *res) |
| | Get length of ACPI large resource descriptor. More...
|
| |
| static size_t | acpi_resource_len (union acpi_resource *res) |
| | Get length of ACPI resource descriptor. More...
|
| |
| static union acpi_resource * | acpi_resource_next (union acpi_resource *res) |
| | Get next ACPI resource descriptor. More...
|
| |
| static const char * | acpi_name (uint32_t signature) |
| | Transcribe ACPI table signature (for debugging) More...
|
| |
| static void | acpi_init (struct acpi_descriptor *desc, struct acpi_model *model, struct refcnt *refcnt) |
| | Initialise ACPI descriptor. More...
|
| |
| const struct acpi_header * | acpi_find_via_rsdt (uint32_t signature, unsigned int index) |
| | Locate ACPI table via RSDT. More...
|
| |
| const struct acpi_rsdt * | acpi_find_rsdt (void) |
| | Locate ACPI root system description table. More...
|
| |
| const struct acpi_header * | acpi_find (uint32_t signature, unsigned int index) |
| | Locate ACPI table. More...
|
| |
| struct acpi_descriptor * | acpi_describe (struct interface *interface) |
| | Get object's ACPI descriptor. More...
|
| |
| void | acpi_fix_checksum (struct acpi_header *acpi) |
| | Fix up ACPI table checksum. More...
|
| |
| const struct acpi_header * | acpi_table (uint32_t signature, unsigned int index) |
| | Locate ACPI table. More...
|
| |
| int | acpi_extract (uint32_t signature, void *data, int(*extract)(const struct acpi_header *zsdt, size_t len, size_t offset, void *data)) |
| | Extract value from DSDT/SSDT. More...
|
| |
| void * | acpi_ioremap (struct acpi_address *address, size_t len) |
| | Map an ACPI generic address. More...
|
| |
| void | acpi_add (struct acpi_descriptor *desc) |
| | Add ACPI descriptor. More...
|
| |
| void | acpi_del (struct acpi_descriptor *desc) |
| | Remove ACPI descriptor. More...
|
| |
| int | acpi_install (int(*install)(struct acpi_header *acpi)) |
| | Install ACPI tables. More...
|
| |
ACPI data structures.
Definition in file acpi.h.
Locate ACPI table via RSDT.
- Parameters
-
| signature | Requested table signature |
| index | Requested index of table with this signature |
- Return values
-
| table | Table, or NULL if not found |
Definition at line 105 of file acpi.c.
116 DBG (
"RSDT not found\n" );
122 DBGC (
colour,
"RSDT %#08lx has invalid signature:\n",
123 virt_to_phys ( rsdt ) );
125 sizeof ( rsdt->
acpi ) );
129 if (
len <
sizeof ( rsdt->
acpi ) ) {
130 DBGC (
colour,
"RSDT %#08lx has invalid length:\n",
131 virt_to_phys ( rsdt ) );
133 sizeof ( rsdt->
acpi ) );
139 sizeof ( rsdt->
entry[0] ) );
142 for ( i = 0 ; i <
count ; i++ ) {
145 table = phys_to_virt ( rsdt->
entry[i] );
156 if ( acpi_checksum ( table ) != 0 ) {
157 DBGC (
colour,
"RSDT %#08lx found %s with bad " 158 "checksum at %#08lx\n", virt_to_phys ( rsdt ),
160 virt_to_phys ( table ) );
164 DBGC (
colour,
"RSDT %#08lx found %s at %#08lx\n",
166 virt_to_phys ( table ) );
170 DBGC (
colour,
"RSDT %#08lx could not find %s\n",
#define RSDT_SIGNATURE
Root System Description Table (RSDT) signature.
#define le32_to_cpu(value)
const struct acpi_rsdt * acpi_find_rsdt(void)
Locate ACPI root system description table.
ACPI Root System Description Table (RSDT)
#define colour
Colour for debug messages.
uint32_t entry[0]
ACPI table entries.
static unsigned int count
Number of entries.
#define cpu_to_le32(value)
struct acpi_header acpi
ACPI header.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
#define DBG(...)
Print a debugging message.
u8 signature
CPU signature.
#define NULL
NULL pointer (VOID *)
References acpi_rsdt::acpi, acpi_find_rsdt(), acpi_name(), colour, count, cpu_to_le32, DBG, DBGC, DBGC_HDA, acpi_rsdt::entry, index, le32_to_cpu, len, acpi_header::length, NULL, RSDT_SIGNATURE, signature, and acpi_header::signature.
Referenced by acpi_find().
Get object's ACPI descriptor.
- Parameters
-
- Return values
-
| desc | ACPI descriptor, or NULL |
Definition at line 320 of file acpi.c.
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
struct interface * intf
Original interface.
struct ena_llq_option desc
Descriptor counts.
struct acpi_descriptor * acpi_describe(struct interface *intf)
Get object's ACPI descriptor.
#define acpi_describe_TYPE(object_type)
static uint16_t struct vmbus_xfer_pages_operations * op
An ACPI descriptor (used to construct ACPI tables)
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
#define NULL
NULL pointer (VOID *)
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
References acpi_describe(), acpi_describe_TYPE, desc, dest, interface::intf, intf_get_dest_op, intf_object(), intf_put(), NULL, and op.
Referenced by acpi_describe(), and sanpath_open().
Extract value from DSDT/SSDT.
- Parameters
-
| signature | Signature (e.g. "_S5_") |
| data | Data buffer |
| extract | Extraction method |
- Return values
-
Definition at line 227 of file acpi.c.
241 dsdt = phys_to_virt ( fadt->
dsdt );
248 for ( i = 0 ; ; i++ ) {
257 DBGC (
colour,
"ACPI could not find \"%s\"\n",
struct arbelprm_rc_send_wqe rc
#define SSDT_SIGNATURE
Secondary System Description Table (SSDT) signature.
#define ENOENT
No such file or directory.
const struct acpi_header * acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
#define container_of(ptr, type, field)
Get containing structure.
#define colour
Colour for debug messages.
Fixed ACPI Description Table (FADT)
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
#define FADT_SIGNATURE
Fixed ACPI Description Table (FADT) signature.
uint32_t dsdt
Physical address of DSDT.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
uint8_t data[48]
Additional event data.
static int acpi_zsdt(const struct acpi_header *zsdt, uint32_t signature, void *data, int(*extract)(const struct acpi_header *zsdt, size_t len, size_t offset, void *data))
Extract value from DSDT/SSDT.
u8 signature
CPU signature.
References acpi, acpi_name(), acpi_table(), acpi_zsdt(), colour, container_of, data, DBGC, acpi_fadt::dsdt, ENOENT, FADT_SIGNATURE, rc, signature, and SSDT_SIGNATURE.
Referenced by acpi_mac(), and acpi_poweroff().