rockbox/firmware/target/arm
Marcin Bukat c3a62cee96 rk27xx: pass the NAND bootloader's handoff words to the OF
Before it jumps to an image, the rk27xx NAND bootloader writes three
words at the address in RKW header field 0x14: a magic, its version
and which copy of the image it loaded. The original firmware never
initialises them: it reports the version over USB and counts its own
reboots in the third word, and once the count reaches 5 it reboots
into a mode the NAND bootloader will not boot. When our bootloader
started the OF, nothing wrote them, so the OF ran with whatever was
left in DRAM.

Field 0x14 of our own images held a constant taken from some other
image. Point it at the last 12 bytes of DRAM, which nothing uses
before our bootloader runs. load_rkw() in the bootloader now reads
the words there before loading an image, and writes them at the
address in the loaded image's header when that lies between the
image and the bootloader. Started over USB, it passes version 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ife1d63e361a780c28a9f0626d110552b98bb6b7f
2026-10-07 18:09:15 +02:00
..
as3525 usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
imx31 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
imx233 imx233: Increase bootloader's firmware buffer size to 2MB 2026-09-29 15:15:45 -04:00
ipod ipodnano3g: power, RTC, backlight, battery and audio 2026-09-20 08:53:53 -04:00
iriver chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
olympus chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pbell chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
philips chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pp firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
rk27xx rk27xx: pass the NAND bootloader's handoff words to the OF 2026-10-07 18:09:15 +02:00
s3c2440 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
s5l8700 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
s5l8702 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
samsung chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sandisk chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
stm32 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
tcc780x firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
tms320dm320 usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
ata-as-arm.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
ata-nand-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bits-armv4.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bits-armv6.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-armv7m.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-armv7m.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
crt0.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
i2c-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lcd-c200_c200v2.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lcd-ssd1815.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-arm.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-armv6.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
nvic-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm-telechips.c pcm_sink: allow per-sink swvol/hwvol selection 2026-08-14 22:39:13 +09:00
powermgmt-ascodec.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-classic.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-classic.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-micro.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-micro.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
uc87xx.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
usb-drv-arc.c usb: accept replacement SETUP after an abandoned control transfer 2026-09-27 09:19:39 -04:00
usb-s3c6400x.c usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
usb-tcc.c usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
vectors-arm-micro.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
wmcodec-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00