[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/23] target/loongarch: Define address space information for
From: |
Jiaxun Yang |
Subject: |
[PATCH v2 16/23] target/loongarch: Define address space information for LoongArch32 |
Date: |
Thu, 26 Dec 2024 21:19:47 +0000 |
LoongArch32 have 32 bit vaddr and 36 bit paddr as per architecture
specification.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
target/loongarch/cpu-param.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/target/loongarch/cpu-param.h b/target/loongarch/cpu-param.h
index
db5ad1c69fafaf368ad7f0c960afecb5a96ddcf2..48512883e550c80570eb2bf02c802f4979151008
100644
--- a/target/loongarch/cpu-param.h
+++ b/target/loongarch/cpu-param.h
@@ -8,9 +8,15 @@
#ifndef LOONGARCH_CPU_PARAM_H
#define LOONGARCH_CPU_PARAM_H
-#define TARGET_LONG_BITS 64
-#define TARGET_PHYS_ADDR_SPACE_BITS 48
-#define TARGET_VIRT_ADDR_SPACE_BITS 48
+#if defined(TARGET_LOONGARCH64)
+# define TARGET_LONG_BITS 64
+# define TARGET_PHYS_ADDR_SPACE_BITS 48
+# define TARGET_VIRT_ADDR_SPACE_BITS 48
+#elif defined(TARGET_LOONGARCH32)
+# define TARGET_LONG_BITS 32
+# define TARGET_PHYS_ADDR_SPACE_BITS 36
+# define TARGET_VIRT_ADDR_SPACE_BITS 32
+#endif
#define TARGET_PAGE_BITS 12
--
2.43.0
- [PATCH v2 12/23] target/loongarch: Scrutinise TCG bitops translation for 32 bit build, (continued)
- [PATCH v2 13/23] target/loongarch: Fix rdtimer on 32bit build, Jiaxun Yang, 2024/12/26
- [PATCH v2 14/23] target/loongarch: Scrutinise TCG arithmetic translation for 32 bit build, Jiaxun Yang, 2024/12/26
- [PATCH v2 15/23] target/loongarch: Fix load type for gen_ll, Jiaxun Yang, 2024/12/26
- [PATCH v2 16/23] target/loongarch: Define address space information for LoongArch32,
Jiaxun Yang <=
- [PATCH v2 17/23] target/loongarch: Refactoring is_la64/is_va32 for LoongArch32, Jiaxun Yang, 2024/12/26
- [PATCH v2 18/23] target/loongarch: ifdef out 64 bit CPUs on 32 bit builds, Jiaxun Yang, 2024/12/26
- [PATCH v2 19/23] target/loongarch: Introduce max32 CPU type, Jiaxun Yang, 2024/12/26
- [PATCH v2 22/23] target/loongarch: Wire up LoongArch32 Kconfigs, Jiaxun Yang, 2024/12/26
- [PATCH v2 20/23] hw/loongarch/virt: Default to max32 CPU for LoongArch 32 build, Jiaxun Yang, 2024/12/26