From 32bd5b3a737a62ce28270071556071c48711285a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 10 Mar 2018 18:57:17 -0800 Subject: [PATCH] Fix LP0 entry. Exit still fails in warmboot bin. --- exosphere/src/lp0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exosphere/src/lp0.c b/exosphere/src/lp0.c index 44cbc2da6..494fe81c3 100644 --- a/exosphere/src/lp0.c +++ b/exosphere/src/lp0.c @@ -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;