1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 05:42:17 +00:00

fusee: Fix a bug in cluster boot code.

This commit is contained in:
hexkyz 2018-09-04 19:16:03 +01:00 committed by GitHub
parent 5542352239
commit ad4605abde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,12 +77,12 @@ void cluster_boot_cpu0(uint32_t entry)
udelay(2); udelay(2);
car->pllx_base = 0x80404E02; car->pllx_base = 0x80404E02;
car->pllx_base = 0x404E02; car->pllx_base = 0x404E02;
car->pllx_misc = ((car->pllx_base & 0xFFFBFFFF) | 0x40000); car->pllx_misc = ((car->pllx_misc & 0xFFFBFFFF) | 0x40000);
car->pllx_base = 0x40404E02; car->pllx_base = 0x40404E02;
} }
while (!(car->pllx_base & 0x8000000)) { while (!(car->pllx_base & 0x8000000)) {
/* Spinlock. */ /* Wait. */
} }
/* Configure MSELECT source and enable clock. */ /* Configure MSELECT source and enable clock. */
@ -111,13 +111,13 @@ void cluster_boot_cpu0(uint32_t entry)
/* Request and wait for RAM repair. */ /* Request and wait for RAM repair. */
FLOW_CTLR_RAM_REPAIR_0 = 1; FLOW_CTLR_RAM_REPAIR_0 = 1;
while (!(FLOW_CTLR_RAM_REPAIR_0 & 2)){ while (!(FLOW_CTLR_RAM_REPAIR_0 & 2)){
/* Spinlock. */ /* Wait. */
} }
MAKE_EXCP_VEC_REG(0x100) = 0; MAKE_EXCP_VEC_REG(0x100) = 0;
/* Set reset vector. */ /* Set reset vector. */
SB_AA64_RESET_LOW_0 = entry | 1; SB_AA64_RESET_LOW_0 = (entry | 1);
SB_AA64_RESET_HIGH_0 = 0; SB_AA64_RESET_HIGH_0 = 0;
/* Non-secure reset vector write disable. */ /* Non-secure reset vector write disable. */