diff options
| author | Jayachandran C <jchandra@broadcom.com> | 2014-04-29 10:37:47 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-30 10:48:25 -0400 |
| commit | e9126418dd7a86bee32d2dae37df403f7f1e2a13 (patch) | |
| tree | f4ed5bce0aefa196e28535505ea52cab44b6e4ac | |
| parent | a3deecfaa36662ca2e2104be3c305236cf03efcc (diff) | |
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>
| -rw-r--r-- | arch/mips/netlogic/common/reset.S | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/netlogic/common/reset.S b/arch/mips/netlogic/common/reset.S index fda772a8595b..13c1bc5b5988 100644 --- a/arch/mips/netlogic/common/reset.S +++ b/arch/mips/netlogic/common/reset.S | |||
| @@ -74,6 +74,18 @@ | |||
| 74 | .endm | 74 | .endm |
| 75 | 75 | ||
| 76 | /* | 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 | |||
| 88 | /* | ||
| 77 | * L1D cache has to be flushed before enabling threads in XLP. | 89 | * L1D cache has to be flushed before enabling threads in XLP. |
| 78 | * On XLP8xx/XLP3xx, we do a low level flush using processor control | 90 | * On XLP8xx/XLP3xx, we do a low level flush using processor control |
| 79 | * registers. On XLPII CPUs, usual cache instructions work. | 91 | * registers. On XLPII CPUs, usual cache instructions work. |
| @@ -228,6 +240,8 @@ EXPORT(nlm_boot_siblings) | |||
| 228 | #endif | 240 | #endif |
| 229 | mtc0 t1, CP0_STATUS | 241 | mtc0 t1, CP0_STATUS |
| 230 | 242 | ||
| 243 | xlp_early_mmu_init | ||
| 244 | |||
| 231 | /* mark CPU ready */ | 245 | /* mark CPU ready */ |
| 232 | li t3, CKSEG1ADDR(RESET_DATA_PHYS) | 246 | li t3, CKSEG1ADDR(RESET_DATA_PHYS) |
| 233 | ADDIU t1, t3, BOOT_CPU_READY | 247 | ADDIU t1, t3, BOOT_CPU_READY |
| @@ -254,6 +268,7 @@ EXPORT(nlm_reset_entry_end) | |||
| 254 | LEAF(nlm_init_boot_cpu) | 268 | LEAF(nlm_init_boot_cpu) |
| 255 | #ifdef CONFIG_CPU_XLP | 269 | #ifdef CONFIG_CPU_XLP |
| 256 | xlp_config_lsu | 270 | xlp_config_lsu |
| 271 | xlp_early_mmu_init | ||
| 257 | #endif | 272 | #endif |
| 258 | jr ra | 273 | jr ra |
| 259 | nop | 274 | nop |
