summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hajnoczi2022-11-22 15:59:57 +0100
committerStefan Hajnoczi2022-11-22 15:59:57 +0100
commit16a550bdc0e49fcda0e6a6c55d648700ad33c8a4 (patch)
treeea1a2022f484e0824c510d400de576ec00f928bc
parentMerge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu ... (diff)
parenthw/loongarch: Replace the value of uart info with macro (diff)
downloadqemu-16a550bdc0e49fcda0e6a6c55d648700ad33c8a4.tar.gz
qemu-16a550bdc0e49fcda0e6a6c55d648700ad33c8a4.tar.xz
qemu-16a550bdc0e49fcda0e6a6c55d648700ad33c8a4.zip
Merge tag 'pull-loongarch-20221122' of https://gitlab.com/gaosong/qemu into staging
LoongArch pull for 7.2-rc2 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEIAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCY3zJLQAKCRBAov/yOSY+ # 3wHkBADTgirzsosyvVGza6nHD1QTEK6ZqnvYB0wCoxKBt1btvzLoKO5gbe7S3Pq4 # obFurS+5QclwIuLR6ZkihNGMBL+uq6XZryUGG3pU8h1XZigdduiEk7l7YGF+N+hz # /7ESJGHzCTiXyTTXBNgLJEJYfUYdV+kWbXkIQuJGT+kdlzUifA== # =Uod8 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 22 Nov 2022 08:05:49 EST # gpg: using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF # gpg: Good signature from "Song Gao <m17746591750@163.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B8FF 1DA0 D2FD CB2D A09C 6C2C 40A2 FFF2 3926 3EDF * tag 'pull-loongarch-20221122' of https://gitlab.com/gaosong/qemu: hw/loongarch: Replace the value of uart info with macro hw/loongarch: Fix setprop_sized method in fdt rtc node. hw/loongarch: Add default stdout uart in fdt Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--hw/loongarch/acpi-build.c3
-rw-r--r--hw/loongarch/virt.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index 68dfb9f88a..7d5f5a757d 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));
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 5136940b0b..958be74fa1 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -53,7 +53,7 @@ static void fdt_add_rtc_node(LoongArchMachineState *lams)
nodename = g_strdup_printf("/rtc@%" PRIx64, base);
qemu_fdt_add_subnode(ms->fdt, nodename);
qemu_fdt_setprop_string(ms->fdt, nodename, "compatible", "loongson,ls7a-rtc");
- qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", 0x0, base, size);
+ qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", 2, base, 2, size);
g_free(nodename);
}
@@ -69,6 +69,7 @@ static void fdt_add_uart_node(LoongArchMachineState *lams)
qemu_fdt_setprop_string(ms->fdt, nodename, "compatible", "ns16550a");
qemu_fdt_setprop_cells(ms->fdt, nodename, "reg", 0x0, base, 0x0, size);
qemu_fdt_setprop_cell(ms->fdt, nodename, "clock-frequency", 100000000);
+ qemu_fdt_setprop_string(ms->fdt, "/chosen", "stdout-path", nodename);
g_free(nodename);
}
@@ -87,6 +88,7 @@ static void create_fdt(LoongArchMachineState *lams)
"linux,dummy-loongson3");
qemu_fdt_setprop_cell(ms->fdt, "/", "#address-cells", 0x2);
qemu_fdt_setprop_cell(ms->fdt, "/", "#size-cells", 0x2);
+ qemu_fdt_add_subnode(ms->fdt, "/chosen");
}
static void fdt_add_cpu_nodes(const LoongArchMachineState *lams)