[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 2/7] target/arm/tcg: increase cache level for cpu=max
From: |
Alireza Sanaee |
Subject: |
[PATCH v6 2/7] target/arm/tcg: increase cache level for cpu=max |
Date: |
Tue, 14 Jan 2025 17:45:56 +0000 |
This patch addresses cache description in the `aarch64_max_tcg_initfn`
function for cpu=max. It introduces three layers of caches and modifies
the cache description registers accordingly.
Signed-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
target/arm/tcg/cpu64.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
index 93573ceeb1..9434804061 100644
--- a/target/arm/tcg/cpu64.c
+++ b/target/arm/tcg/cpu64.c
@@ -1086,6 +1086,19 @@ void aarch64_max_tcg_initfn(Object *obj)
uint64_t t;
uint32_t u;
+ /*
+ * Expanded cache set
+ */
+ cpu->clidr = 0x8200123; /* 4 4 3 in 3 bit fields */
+ /* 64KB L1 dcache */
+ cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 7);
+ /* 64KB L1 icache */
+ cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 2);
+ /* 1MB L2 unified cache */
+ cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 1 * MiB, 7);
+ /* 2MB L3 unified cache */
+ cpu->ccsidr[4] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 2 * MiB, 7);
+
/*
* Unset ARM_FEATURE_BACKCOMPAT_CNTFRQ, which we would otherwise default
* to because we started with aarch64_a57_initfn(). A 'max' CPU might
--
2.34.1
- [RFC PATCH v6 0/6] Specifying cache topology on ARM, Alireza Sanaee, 2025/01/14
- [PATCH v6 1/7] tests: virt: Update expected ACPI tables for virt test, Alireza Sanaee, 2025/01/14
- [PATCH v6 2/7] target/arm/tcg: increase cache level for cpu=max,
Alireza Sanaee <=
- [PATCH v6 3/7] arm/virt.c: add cache hierarchy to device tree, Alireza Sanaee, 2025/01/14
- [PATCH v6 4/7] bios-tables-test: prepare to change ARM ACPI virt PPTT, Alireza Sanaee, 2025/01/14
- [PATCH v6 5/7] hw/acpi/aml-build.c: add cache hierarchy to pptt table, Alireza Sanaee, 2025/01/14
- [PATCH v6 6/7] tests/qtest/bios-table-test: testing new ARM ACPI PPTT topology, Alireza Sanaee, 2025/01/14
- [PATCH v6 7/7] Update the ACPI tables according to the acpi aml_build change, also empty bios-tables-test-allowed-diff.h., Alireza Sanaee, 2025/01/14