mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/arm/virt-acpi-build.c: Migrate SPCR creation to common location
RISC-V should also generate the SPCR in a manner similar to ARM. Therefore, instead of replicating the code, relocate this function to the common AML build. Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20240129021440.17640-2-jeeheng.sia@starfivetech.com> [ Changes by AF: - Add missing Language SPCR entry ] Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
3011c1dd9c
commit
7dd0b070fa
4 changed files with 117 additions and 41 deletions
|
@ -90,6 +90,39 @@ typedef struct AcpiFadtData {
|
|||
unsigned *xdsdt_tbl_offset;
|
||||
} AcpiFadtData;
|
||||
|
||||
typedef struct AcpiGas {
|
||||
uint8_t id; /* Address space ID */
|
||||
uint8_t width; /* Register bit width */
|
||||
uint8_t offset; /* Register bit offset */
|
||||
uint8_t size; /* Access size */
|
||||
uint64_t addr; /* Address */
|
||||
} AcpiGas;
|
||||
|
||||
/* SPCR (Serial Port Console Redirection table) */
|
||||
typedef struct AcpiSpcrData {
|
||||
uint8_t interface_type;
|
||||
uint8_t reserved[3];
|
||||
struct AcpiGas base_addr;
|
||||
uint8_t interrupt_type;
|
||||
uint8_t pc_interrupt;
|
||||
uint32_t interrupt; /* Global system interrupt */
|
||||
uint8_t baud_rate;
|
||||
uint8_t parity;
|
||||
uint8_t stop_bits;
|
||||
uint8_t flow_control;
|
||||
uint8_t terminal_type;
|
||||
uint8_t language;
|
||||
uint8_t reserved1;
|
||||
uint16_t pci_device_id; /* Must be 0xffff if not PCI device */
|
||||
uint16_t pci_vendor_id; /* Must be 0xffff if not PCI device */
|
||||
uint8_t pci_bus;
|
||||
uint8_t pci_device;
|
||||
uint8_t pci_function;
|
||||
uint32_t pci_flags;
|
||||
uint8_t pci_segment;
|
||||
uint32_t reserved2;
|
||||
} AcpiSpcrData;
|
||||
|
||||
#define ACPI_FADT_ARM_PSCI_COMPLIANT (1 << 0)
|
||||
#define ACPI_FADT_ARM_PSCI_USE_HVC (1 << 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue