[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/32] hw/arm: add versioning to sbsa-ref machine DT
From: |
Peter Maydell |
Subject: |
[PULL 26/32] hw/arm: add versioning to sbsa-ref machine DT |
Date: |
Mon, 9 May 2022 12:58:42 +0100 |
From: Leif Lindholm <quic_llindhol@quicinc.com>
The sbsa-ref machine is continuously evolving. Some of the changes we
want to make in the near future, to align with real components (e.g.
the GIC-700), will break compatibility for existing firmware.
Introduce two new properties to the DT generated on machine generation:
- machine-version-major
To be incremented when a platform change makes the machine
incompatible with existing firmware.
- machine-version-minor
To be incremented when functionality is added to the machine
without causing incompatibility with existing firmware.
to be reset to 0 when machine-version-major is incremented.
This versioning scheme is *neither*:
- A QEMU versioned machine type; a given version of QEMU will emulate
a given version of the platform.
- A reflection of level of SBSA (now SystemReady SR) support provided.
The version will increment on guest-visible functional changes only,
akin to a revision ID register found on a physical platform.
These properties are both introduced with the value 0.
(Hence, a machine where the DT is lacking these nodes is equivalent
to version 0.0.)
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Message-id: 20220505113947.75714-1-quic_llindhol@quicinc.com
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Radoslaw Biernacki <rad@semihalf.com>
Cc: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/sbsa-ref.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index dac8860f2d0..4bb444684f4 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -192,6 +192,20 @@ static void create_fdt(SBSAMachineState *sms)
qemu_fdt_setprop_cell(fdt, "/", "#address-cells", 0x2);
qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2);
+ /*
+ * This versioning scheme is for informing platform fw only. It is neither:
+ * - A QEMU versioned machine type; a given version of QEMU will emulate
+ * a given version of the platform.
+ * - A reflection of level of SBSA (now SystemReady SR) support provided.
+ *
+ * machine-version-major: updated when changes breaking fw compatibility
+ * are introduced.
+ * machine-version-minor: updated when features are added that don't break
+ * fw compatibility.
+ */
+ qemu_fdt_setprop_cell(fdt, "/", "machine-version-major", 0);
+ qemu_fdt_setprop_cell(fdt, "/", "machine-version-minor", 0);
+
if (ms->numa_state->have_numa_distance) {
int size = nb_numa_nodes * nb_numa_nodes * 3 * sizeof(uint32_t);
uint32_t *matrix = g_malloc0(size);
--
2.25.1
- [PULL 20/32] target/arm: Enable FEAT_CSV2 for -cpu max, (continued)
- [PULL 20/32] target/arm: Enable FEAT_CSV2 for -cpu max, Peter Maydell, 2022/05/09
- [PULL 18/32] target/arm: Enable FEAT_RAS for -cpu max, Peter Maydell, 2022/05/09
- [PULL 21/32] target/arm: Enable FEAT_CSV2_2 for -cpu max, Peter Maydell, 2022/05/09
- [PULL 22/32] target/arm: Enable FEAT_CSV3 for -cpu max, Peter Maydell, 2022/05/09
- [PULL 24/32] target/arm: Define cortex-a76, Peter Maydell, 2022/05/09
- [PULL 23/32] target/arm: Enable FEAT_DGH for -cpu max, Peter Maydell, 2022/05/09
- [PULL 13/32] target/arm: Enable FEAT_Debugv8p4 for -cpu max, Peter Maydell, 2022/05/09
- [PULL 27/32] qapi/machine.json: Add cluster-id, Peter Maydell, 2022/05/09
- [PULL 25/32] target/arm: Define neoverse-n1, Peter Maydell, 2022/05/09
- [PULL 28/32] qtest/numa-test: Specify CPU topology in aarch64_numa_cpu(), Peter Maydell, 2022/05/09
- [PULL 26/32] hw/arm: add versioning to sbsa-ref machine DT,
Peter Maydell <=
- [PULL 14/32] target/arm: Add minimal RAS registers, Peter Maydell, 2022/05/09
- [PULL 31/32] hw/arm/virt: Fix CPU's default NUMA node ID, Peter Maydell, 2022/05/09
- [PULL 29/32] hw/arm/virt: Consider SMP configuration in CPU topology, Peter Maydell, 2022/05/09
- [PULL 32/32] hw/acpi/aml-build: Use existing CPU topology to build PPTT table, Peter Maydell, 2022/05/09
- [PULL 30/32] qtest/numa-test: Correct CPU and NUMA association in aarch64_numa_cpu(), Peter Maydell, 2022/05/09
- Re: [PULL 00/32] target-arm queue, Richard Henderson, 2022/05/09