Skip to content

Commit e557793

Browse files
atishp04palmer-dabbelt
authored andcommitted
RISC-V: Fix maximum allowed phsyical memory for RV32
Linux kernel can only map 1GB of address space for RV32 as the page offset is set to 0xC0000000. The current description in the Kconfig is confusing as it indicates that RV32 can support 2GB of physical memory. That is simply not true for current kernel. In future, a 2GB split support can be added to allow 2GB physical address space. Reviewed-by: Anup Patel <[email protected]> Signed-off-by: Atish Patra <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent abb8e86 commit e557793

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/riscv/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ config PA_BITS
137137

138138
config PAGE_OFFSET
139139
hex
140-
default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
140+
default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB
141141
default 0x80000000 if 64BIT && !MMU
142142
default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
143143
default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
@@ -247,10 +247,12 @@ config MODULE_SECTIONS
247247

248248
choice
249249
prompt "Maximum Physical Memory"
250-
default MAXPHYSMEM_2GB if 32BIT
250+
default MAXPHYSMEM_1GB if 32BIT
251251
default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
252252
default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
253253

254+
config MAXPHYSMEM_1GB
255+
bool "1GiB"
254256
config MAXPHYSMEM_2GB
255257
bool "2GiB"
256258
config MAXPHYSMEM_128GB

0 commit comments

Comments
 (0)