Skip to content

Commit e912641

Browse files
jchandra-brcmralfbaechle
authored andcommitted
MIPS: Netlogic: Enable access to more than 64GB
The ELPA bit needs to be set in the PAGEGRAIN register to enable access to >64GB physical address. Update reset.S to do this from every hardware thread. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6866/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent a3deecf commit e912641

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎arch/mips/netlogic/common/reset.S‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@
7373
mtcr t1, t0
7474
.endm
7575

76+
/*
77+
* Allow access to physical mem >64G by enabling ELPA in PAGEGRAIN
78+
* register. This is needed before going to C code since the SP can
79+
* in this region. Called from all HW threads.
80+
*/
81+
.macro xlp_early_mmu_init
82+
mfc0 t0, CP0_PAGEMASK, 1
83+
li t1, (1 << 29) /* ELPA bit */
84+
or t0, t1
85+
mtc0 t0, CP0_PAGEMASK, 1
86+
.endm
87+
7688
/*
7789
* L1D cache has to be flushed before enabling threads in XLP.
7890
* On XLP8xx/XLP3xx, we do a low level flush using processor control
@@ -228,6 +240,8 @@ EXPORT(nlm_boot_siblings)
228240
#endif
229241
mtc0 t1, CP0_STATUS
230242

243+
xlp_early_mmu_init
244+
231245
/* mark CPU ready */
232246
li t3, CKSEG1ADDR(RESET_DATA_PHYS)
233247
ADDIU t1, t3, BOOT_CPU_READY
@@ -254,6 +268,7 @@ EXPORT(nlm_reset_entry_end)
254268
LEAF(nlm_init_boot_cpu)
255269
#ifdef CONFIG_CPU_XLP
256270
xlp_config_lsu
271+
xlp_early_mmu_init
257272
#endif
258273
jr ra
259274
nop

0 commit comments

Comments
 (0)