mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hw/acpi/aml-build: Add aml_interrupt() term
Add aml_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 1432522520-8068-7-git-send-email-zhaoshenglong@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
dc17ab1de5
commit
205d1d1c04
2 changed files with 69 additions and 0 deletions
|
@ -111,6 +111,44 @@ typedef enum {
|
|||
AML_READ_WRITE = 1,
|
||||
} AmlReadAndWrite;
|
||||
|
||||
/*
|
||||
* ACPI 5.0: Table 6-187 Extended Interrupt Descriptor Definition
|
||||
* Interrupt Vector Flags Bits[0] Consumer/Producer
|
||||
*/
|
||||
typedef enum {
|
||||
AML_CONSUMER_PRODUCER = 0,
|
||||
AML_CONSUMER = 1,
|
||||
} AmlConsumerAndProducer;
|
||||
|
||||
/*
|
||||
* ACPI 5.0: Table 6-187 Extended Interrupt Descriptor Definition
|
||||
* _HE field definition
|
||||
*/
|
||||
typedef enum {
|
||||
AML_LEVEL = 0,
|
||||
AML_EDGE = 1,
|
||||
} AmlLevelAndEdge;
|
||||
|
||||
/*
|
||||
* ACPI 5.0: Table 6-187 Extended Interrupt Descriptor Definition
|
||||
* _LL field definition
|
||||
*/
|
||||
typedef enum {
|
||||
AML_ACTIVE_HIGH = 0,
|
||||
AML_ACTIVE_LOW = 1,
|
||||
} AmlActiveHighAndLow;
|
||||
|
||||
/*
|
||||
* ACPI 5.0: Table 6-187 Extended Interrupt Descriptor Definition
|
||||
* _SHR field definition
|
||||
*/
|
||||
typedef enum {
|
||||
AML_EXCLUSIVE = 0,
|
||||
AML_SHARED = 1,
|
||||
AML_EXCLUSIVE_AND_WAKE = 2,
|
||||
AML_SHARED_AND_WAKE = 3,
|
||||
} AmlShared;
|
||||
|
||||
typedef
|
||||
struct AcpiBuildTables {
|
||||
GArray *table_data;
|
||||
|
@ -170,6 +208,10 @@ Aml *aml_call3(const char *method, Aml *arg1, Aml *arg2, Aml *arg3);
|
|||
Aml *aml_call4(const char *method, Aml *arg1, Aml *arg2, Aml *arg3, Aml *arg4);
|
||||
Aml *aml_memory32_fixed(uint32_t addr, uint32_t size,
|
||||
AmlReadAndWrite read_and_write);
|
||||
Aml *aml_interrupt(AmlConsumerAndProducer con_and_pro,
|
||||
AmlLevelAndEdge level_and_edge,
|
||||
AmlActiveHighAndLow high_and_low, AmlShared shared,
|
||||
uint32_t irq);
|
||||
Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t max_base,
|
||||
uint8_t aln, uint8_t len);
|
||||
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue