path: root/firmware/target/arm
diff options
authorTomasz Moń <>2021-05-20 21:16:46 +0200
committerTomasz Moń <>2021-05-21 18:55:14 +0000
commit00b46267907073eb6d03cbbd3bd58e67b2a5475c (patch)
tree78bef7140ac67a941ab95b651510b0c7c184f25c /firmware/target/arm
parent53886079680d3ff782b778b3d307ce1ff3188075 (diff)
Sansa Connect: Clear recoverzap parameter
Clearing recoverzap parameter exists the Recovery Mode. This makes it possible to run Rockbox on Sansa Connect without relying on original Linux firmware. Enable write-through cache on flash memory as write-back complicates handling without any real benefits. The flash memory accepts commands as series of writes at predefined addresses, so it is important that the cache does not interfere with the writes. Change-Id: I219f962f20953d84df43012cf16bbb16d673add8
Diffstat (limited to 'firmware/target/arm')
2 files changed, 9 insertions, 9 deletions
diff --git a/firmware/target/arm/tms320dm320/ b/firmware/target/arm/tms320dm320/
index c59cc7f514..2db687d533 100644
--- a/firmware/target/arm/tms320dm320/
+++ b/firmware/target/arm/tms320dm320/
@@ -38,12 +38,12 @@ STARTUP(target/arm/tms320dm320/crt0.o)
/* Offset in flash from beginning, we don't want overwrite OF bootloader
- due to recovery mode and more importantly - hardware block protection.
- This offset makes Rockbox bootloader a replacement for OF vmlinux.
- In .srr file header add any valid memory address from following
- <0x1000000; 0x1300180) u (0x131EAF4; 0x1420000) u (0x1440000; 0x5000000>
- ensuring that complete bootloader fits in.
- Entry point in .srr file should be equal to _loadaddress. */
+ * due to recovery mode and more importantly - hardware block protection.
+ * Rockbox bootloader is flashed into kernel partition and chainloaded
+ * from OF bootloader via Arbitrary Code Execution exploit. The first
+ * instruction must be position independent as Rockbox bootloader will be
+ * copied to RAM at 0x01000000 and executed from RAM.
+ */
#define FLASHSIZE 0x00400000
#define FLASHMEMORIG 0x00120010
/* Kernel partition is 2 M, srr header is 16 bytes, sig is 2048 bytes */
diff --git a/firmware/target/arm/tms320dm320/crt0.S b/firmware/target/arm/tms320dm320/crt0.S
index 9f2c8dbe04..e57e28a470 100644
--- a/firmware/target/arm/tms320dm320/crt0.S
+++ b/firmware/target/arm/tms320dm320/crt0.S
@@ -201,14 +201,14 @@ _start:
mov r3, #CACHE_NONE
bl map_section
- /* Enable caching for FLASH */
+ /* Enable write-through caching for FLASH */
ldr r0, =_flash_start
ldr r1, =_flash_start
ldr r2, =_flash_sizem
- mov r3, #CACHE_ALL
+ mov r3, #(CACHE_ALL & ~BUFFERED)
bl map_section
- /* Enable caching for RAM */
+ /* Enable write-back caching for RAM */
ldr r0, =_sdram_start
ldr r1, =_sdram_start
ldr r2, =_sdram_sizem