virtio-mmio: discover devices from ACPI
https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt https://wiki.linaro.org/LEG/ServerArchitecture/ACPI/LinaroRegistry Change-Id: I330a497173c0a82b789a43720e3d86e1513a661b Reviewed-on: https://review.haiku-os.org/c/haiku/+/5506 Reviewed-by: Fredrik Holmqvist <[email protected]>
This commit is contained in:
committed by
Fredrik Holmqvist
parent
0f1217b8fb
commit
079db739a6
@@ -277,4 +277,48 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
/* The following definitions are adapted from acpica/include/acrestyp.h */
|
||||
|
||||
|
||||
typedef struct acpi_resource_source
|
||||
{
|
||||
uint8 index;
|
||||
uint16 string_length;
|
||||
char *string_ptr;
|
||||
} _PACKED acpi_resource_source;
|
||||
|
||||
typedef struct acpi_resource_fixed_memory32 {
|
||||
uint8 write_protect;
|
||||
uint32 address;
|
||||
uint32 address_length;
|
||||
} _PACKED acpi_resource_fixed_memory32;
|
||||
|
||||
typedef struct acpi_resource_extended_irq {
|
||||
uint8 producer_consumer;
|
||||
uint8 triggering;
|
||||
uint8 polarity;
|
||||
uint8 shareable;
|
||||
uint8 wake_capable;
|
||||
uint8 interrupt_count;
|
||||
acpi_resource_source resource_source;
|
||||
uint32 interrupts[1];
|
||||
} _PACKED acpi_resource_extended_irq;
|
||||
|
||||
typedef union acpi_resource_data {
|
||||
acpi_resource_fixed_memory32 fixed_memory32;
|
||||
acpi_resource_extended_irq extended_irq;
|
||||
} acpi_resource_data;
|
||||
|
||||
typedef struct acpi_resource {
|
||||
uint32 type;
|
||||
uint32 length;
|
||||
acpi_resource_data data;
|
||||
} _PACKED acpi_resource;
|
||||
|
||||
enum {
|
||||
ACPI_RESOURCE_TYPE_FIXED_MEMORY32 = 10,
|
||||
ACPI_RESOURCE_TYPE_EXTENDED_IRQ = 15,
|
||||
};
|
||||
|
||||
|
||||
#endif /* _KERNEL_ACPI_H */
|
||||
|
||||
Reference in New Issue
Block a user