aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorXiaojuan Yang <yangxiaojuan@loongson.cn>2022-11-10 14:54:16 +0800
committerSong Gao <gaosong@loongson.cn>2022-11-22 20:56:48 +0800
commit4451cc4653babf90b1808597f3f1dc71e1f63def (patch)
tree92cd8da7ad811003ca7adba7e650e0b89f9a33ee /hw
parente8c8203e55765a73a1d51c99406777b6eb45b2e9 (diff)
downloadqemu-4451cc4653babf90b1808597f3f1dc71e1f63def.zip
qemu-4451cc4653babf90b1808597f3f1dc71e1f63def.tar.gz
qemu-4451cc4653babf90b1808597f3f1dc71e1f63def.tar.bz2
hw/loongarch: Replace the value of uart info with macro
Using macro to replace the value of uart info such as addr, size in acpi_build method. Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20221115115008.3372489-1-yangxiaojuan@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw')
-rw-r--r--hw/loongarch/acpi-build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index 68dfb9f..7d5f5a7 100644
--- a/hw/loongarch/acpi-build.c
+++ b/hw/loongarch/acpi-build.c
@@ -226,7 +226,8 @@ static void build_uart_device_aml(Aml *table)
aml_append(crs,
aml_qword_memory(AML_POS_DECODE, AML_MIN_FIXED, AML_MAX_FIXED,
AML_NON_CACHEABLE, AML_READ_WRITE,
- 0, 0x1FE001E0, 0x1FE001E7, 0, 0x8));
+ 0, VIRT_UART_BASE, VIRT_UART_BASE + VIRT_UART_SIZE - 1,
+ 0, VIRT_UART_SIZE));
aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH,
AML_SHARED, &uart_irq, 1));
aml_append(dev, aml_name_decl("_CRS", crs));