mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-19 00:42:06 +00:00
rebootstub: pc-relative load (thanks fincs)
This commit is contained in:
parent
e9e3f29d74
commit
cfc9576eaf
2 changed files with 2 additions and 6 deletions
|
@ -18,14 +18,10 @@
|
||||||
.align 4
|
.align 4
|
||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
adr r0, reboot_type
|
ldr r0, reboot_type
|
||||||
ldr r0, [r0]
|
|
||||||
cmp r0, #0x0
|
cmp r0, #0x0
|
||||||
beq do_shutdown
|
beq do_shutdown
|
||||||
b jump_to_reboot_payload
|
b jump_to_reboot_payload
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
reboot_type:
|
reboot_type:
|
||||||
.word 0x00000001
|
.word 0x00000001
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ uint32_t configitem_set(bool privileged, ConfigItem item, uint64_t value) {
|
||||||
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_AMS_IRAM_PAGE) + i) = read32le(rebootstub_bin, i);
|
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_AMS_IRAM_PAGE) + i) = read32le(rebootstub_bin, i);
|
||||||
}
|
}
|
||||||
/* Tell rebootstub to shut down. */
|
/* Tell rebootstub to shut down. */
|
||||||
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_AMS_IRAM_PAGE) + 0x20) = 0x0;
|
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_AMS_IRAM_PAGE) + 0x10) = 0x0;
|
||||||
ams_unmap_irampage();
|
ams_unmap_irampage();
|
||||||
|
|
||||||
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_RTC_PMC) + 0x400ull) = 0x10;
|
MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_RTC_PMC) + 0x400ull) = 0x10;
|
||||||
|
|
Loading…
Reference in a new issue