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

Fix LP0 entry. Exit still fails in warmboot bin.

This commit is contained in:
Michael Scire 2018-03-10 18:57:17 -08:00
parent ab2b8e4db5
commit 32bd5b3a73

View file

@ -68,7 +68,7 @@ void save_se_and_power_down_cpu(void) {
APBDEV_PMC_SCRATCH43_0 = (uint32_t)(WARMBOOT_GET_RAM_SEGMENT_PA(WARMBOOT_RAM_SEGMENT_ID_SE_STATE));
se_set_in_context_save_mode(false);
se_check_error_status_reg();
if (!configitem_is_retail()) {
/* TODO: uart_log("OYASUMI"); */
}
@ -167,7 +167,7 @@ uint32_t cpu_suspend(uint64_t power_state, uint64_t entrypoint, uint64_t argumen
BPMP_VECTOR_FIQ = 0x40003004; /* Reboot. */
/* Hold the BPMP in reset. */
clkrst_disable(CARDEVICE_BPMP);
MAKE_CAR_REG(0x300) = 2;
/* Copy BPMP firmware. */
uint8_t *lp0_entry_code = (uint8_t *)(LP0_ENTRY_GET_RAM_SEGMENT_ADDRESS(LP0_ENTRY_RAM_SEGMENT_ID_LP0_ENTRY_CODE));
@ -175,7 +175,7 @@ uint32_t cpu_suspend(uint64_t power_state, uint64_t entrypoint, uint64_t argumen
flush_dcache_range(lp0_entry_code, lp0_entry_code + bpmpfw_bin_size);
/* Take the BPMP out of reset. */
clkrst_enable(CARDEVICE_BPMP);
MAKE_CAR_REG(0x304) = 2;
/* Start executing BPMP firmware. */
FLOW_CTLR_HALT_COP_EVENTS_0 = 0;