1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 04:12:02 +00:00

Fix wrongly named register in __set_memory_registers, add prototype

This commit is contained in:
TuxSH 2018-02-28 07:32:14 +01:00
parent c5b0639b8a
commit 64c8612342
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,7 @@
/* For some reason GAS doesn't know about it, even with .cpu cortex-a57 */
#define cpuactlr_el1 s3_1_c15_c2_0
#define cpuectlr_el1 s3_1_c15_c2_1
.macro RESET_CORE
mov x0, #(1 << 63)
msr cpuactlr_el1, x0 /* disable regional clock gating */
@ -102,7 +104,7 @@ __start_warm:
.global __set_memory_registers
.type __set_memory_registers, %function
__set_memory_registers:
msr cpuactlr_el1, x2
msr cpuectlr_el1, x2
isb
msr scr_el3, x3
msr ttbr0_el3, x0

View file

@ -1,7 +1,11 @@
#include "utils.h"
#include "memory_map.h"
void __set_memory_registers(uintptr_t ttbr0, uintptr_t vbar, uint64_t cpuectlr, uint32_t scr,
uint32_t tcr, uint32_t cptr, uint64_t mair, uint32_t sctlr);
uintptr_t get_warmboot_crt0_stack_address(void);
void set_memory_registers(void);
void flush_dcache_all_tzram_pa(void) {
/* TODO */