Skip to content

Commit 8e7c061

Browse files
pussuwxiaoxiang781216
authored andcommitted
arm64/Kconfig: Make the ARM64_PA/VA_BITS a true Kconfig variable
Enforcing the default 48-bit VA for everyone also implies a 4 page table translation system. However, if less than 40 bits are needed, a full translation table level can be dropped, making the translations faster. Thus, make this into a configurable option, instead of enforcing the same address widht for everyone.
1 parent c19bdf2 commit 8e7c061

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

arch/arm64/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,24 @@ config ARM64_ICACHE_DISABLE
344344
bool "Disable ICACHE at __start"
345345
default n
346346

347+
config ARM64_VA_BITS
348+
int "Virtual address space size"
349+
default 48
350+
---help---
351+
Allows choosing one of multiple possible virtual address
352+
space sizes. The level of translation table is determined by
353+
a combination of page size and virtual address space size.
354+
355+
The choice could be: 32, 36, 42, 48
356+
357+
config ARM64_PA_BITS
358+
int "Physical address space size"
359+
default 48
360+
---help---
361+
Choose the maximum physical address range that the kernel will support.
362+
363+
The choice could be: 32, 36, 42, 48
364+
347365
if ARCH_CHIP_A64
348366
source "arch/arm64/src/a64/Kconfig"
349367
endif

arch/arm64/src/common/arm64_arch.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -265,23 +265,6 @@
265265

266266
#define CONFIG_MAX_XLAT_TABLES 10
267267

268-
/* Virtual address space size
269-
* Allows choosing one of multiple possible virtual address
270-
* space sizes. The level of translation table is determined by
271-
* a combination of page size and virtual address space size.
272-
*
273-
* The choice could be: 32, 36, 42, 48
274-
*/
275-
276-
#define CONFIG_ARM64_VA_BITS 48
277-
/* Physical address space size
278-
* Choose the maximum physical address range that the kernel will support.
279-
*
280-
* The choice could be: 32, 36, 42, 48
281-
*/
282-
283-
#define CONFIG_ARM64_PA_BITS 48
284-
285268
#define L1_CACHE_SHIFT (6)
286269
#define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT)
287270

0 commit comments

Comments
 (0)