41 #define colour FADT_SIGNATURE 82 acpi->checksum -= acpi_checksum (
acpi );
93 unsigned int index ) {
106 unsigned int index ) {
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",
186 int ( * extract ) (
const struct acpi_header *zsdt,
198 for (
offset =
sizeof ( *zsdt ) ;
207 DBGC ( zsdt,
"DSDT/SSDT %#08lx found %s at offset %#zx\n",
228 int ( * extract ) (
const struct acpi_header *zsdt,
241 dsdt = phys_to_virt ( fadt->
dsdt );
248 for ( i = 0 ; ; i++ ) {
257 DBGC (
colour,
"ACPI could not find \"%s\"\n",
276 return ( (
void * )
base );
#define RSDT_SIGNATURE
Root System Description Table (RSDT) signature.
struct arbelprm_rc_send_wqe rc
#define le32_to_cpu(value)
const struct acpi_rsdt * acpi_find_rsdt(void)
Locate ACPI root system description table.
const struct acpi_header *(* acpi_finder)(uint32_t signature, unsigned int index)
const struct acpi_header * acpi_find_via_rsdt(uint32_t signature, unsigned int index)
Locate ACPI table via RSDT.
uint64_t address
Base address.
#define SSDT_SIGNATURE
Secondary System Description Table (SSDT) signature.
#define ENOENT
No such file or directory.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
const struct acpi_header * acpi_table(uint32_t signature, unsigned int index)
Locate ACPI table.
static acpi_find(uint32_t signature, unsigned int index)
Locate ACPI table.
int(* install)(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
ACPI Root System Description Table (RSDT)
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
struct interface * intf
Original interface.
void acpi_del(struct acpi_descriptor *desc)
Remove ACPI descriptor.
#define list_del(list)
Delete an entry from a list.
struct ena_llq_option desc
Descriptor counts.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define ACPI_ADDRESS_TYPE_IO
An I/O address space type.
#define container_of(ptr, type, field)
Get containing structure.
Access to external ("user") memory.
#define colour
Colour for debug messages.
Fixed ACPI Description Table (FADT)
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
uint32_t entry[0]
ACPI table entries.
#define FADT_SIGNATURE
Fixed ACPI Description Table (FADT) signature.
static unsigned int count
Number of entries.
void acpi_fix_checksum(struct acpi_header *acpi)
Fix up ACPI table checksum.
#define cpu_to_le32(value)
int acpi_install(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
#define ref_get(refcnt)
Get additional reference to object.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
struct acpi_descriptor * acpi_describe(struct interface *intf)
Get object's ACPI descriptor.
#define acpi_describe_TYPE(object_type)
struct acpi_header acpi
ACPI header.
static uint16_t struct vmbus_xfer_pages_operations * op
An ACPI descriptor (used to construct ACPI tables)
uint32_t dsdt
Physical address of DSDT.
void * acpi_ioremap(struct acpi_address *address, size_t len)
Map an ACPI generic address.
#define ACPI_ADDRESS_TYPE_MEM
A memory address space type.
An ACPI generic address structure.
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
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
uint8_t data[48]
Additional event data.
#define ACPI_MODELS
ACPI models.
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.
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.
typeof(acpi_finder=acpi_find)
ACPI table finder.
uint16_t offset
Offset to command line.
#define DBG(...)
Print a debugging message.
void * ioremap(unsigned long bus_addr, size_t len)
Map bus address as an I/O address.
#define le64_to_cpu(value)
#define list_check_contains_entry(entry, head, member)
Check list contains a specified entry.
u8 signature
CPU signature.
void acpi_add(struct acpi_descriptor *desc)
Add ACPI descriptor.
#define NULL
NULL pointer (VOID *)
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
#define ref_put(refcnt)
Drop reference to object.