|
#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_ADDRESS_TYPE_MEM 0x00 |
| A memory address space type. More...
|
|
#define | ACPI_ADDRESS_TYPE_BUS 0x02 |
| A bus number address space type. 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...
|
|
userptr_t | acpi_find_via_rsdt (uint32_t signature, unsigned int index) |
| Locate ACPI table via RSDT. More...
|
|
userptr_t | acpi_find_rsdt (void) |
| Locate ACPI root system description table. More...
|
|
userptr_t | 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...
|
|
userptr_t | acpi_table (uint32_t signature, unsigned int index) |
| Locate ACPI table. More...
|
|
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. 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 UNULL if not found |
Definition at line 110 of file acpi.c.
123 DBG (
"RSDT not found\n" );
130 DBGC (
colour,
"RSDT %#08lx has invalid signature:\n",
137 if (
len <
sizeof ( rsdtab->
acpi ) ) {
138 DBGC (
colour,
"RSDT %#08lx has invalid length:\n",
149 for ( i = 0 ; i <
count ; i++ ) {
159 sizeof (
acpi.signature ) );
170 if ( acpi_checksum ( table ) != 0 ) {
171 DBGC (
colour,
"RSDT %#08lx found %s with bad " 178 DBGC (
colour,
"RSDT %#08lx found %s at %08lx\n",
184 DBGC (
colour,
"RSDT %#08lx could not find %s\n",
#define RSDT_SIGNATURE
Root System Description Table (RSDT) signature.
#define le32_to_cpu(value)
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
unsigned long user_to_phys(userptr_t userptr, off_t offset)
Convert user pointer to physical address.
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
#define offsetof(type, field)
Get offset of a field within a structure.
ACPI Root System Description Table (RSDT)
#define colour
Colour for debug messages.
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
uint32_t entry[0]
ACPI table entries.
#define cpu_to_le32(value)
union aes_table_entry entry[256]
Table entries, indexed by S(N)
userptr_t acpi_find_rsdt(void)
Locate ACPI root system description table.
struct acpi_header acpi
ACPI header.
#define UNULL
Equivalent of NULL for user pointers.
uint16_t count
Number of entries.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
typeof(acpi_finder=acpi_find)
ACPI table finder.
uint64_t index
Index of the first segment within the content.
#define DBG(...)
Print a debugging message.
unsigned long userptr_t
A pointer to a user buffer.
if(natsemi->flags &NATSEMI_64BIT) return 1
References acpi, acpi_rsdt::acpi, acpi_find_rsdt(), acpi_name(), colour, copy_from_user(), count, cpu_to_le32, DBG, DBGC, DBGC_HDA, entry, acpi_rsdt::entry, index, le32_to_cpu, len, offsetof, phys_to_user(), RSDT_SIGNATURE, signature, typeof(), UNULL, and user_to_phys().
Referenced by acpi_find().
Get object's ACPI descriptor.
- Parameters
-
- Return values
-
desc | ACPI descriptor, or NULL |
Definition at line 313 of file acpi.c.
321 desc =
op (
object );
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
struct interface * intf
Original interface.
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.
#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, 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 240 of file acpi.c.
261 for ( i = 0 ; ; i++ ) {
270 DBGC (
colour,
"ACPI could not find \"%s\"\n",
struct arbelprm_rc_send_wqe rc
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
#define SSDT_SIGNATURE
Secondary System Description Table (SSDT) signature.
userptr_t acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
#define ENOENT
No such file or directory.
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
#define colour
Colour for debug messages.
Fixed ACPI Description Table (FADT)
#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(userptr_t zsdt, uint32_t signature, void *data, int(*extract)(userptr_t zsdt, size_t len, size_t offset, void *data))
Extract value from DSDT/SSDT.
unsigned long userptr_t
A pointer to a user buffer.
References acpi_name(), acpi_table(), acpi_zsdt(), colour, copy_from_user(), data, DBGC, acpi_fadt::dsdt, ENOENT, FADT_SIGNATURE, phys_to_user(), rc, signature, and SSDT_SIGNATURE.
Referenced by acpi_mac(), and acpi_poweroff().