diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-05 13:30:29 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-05 13:30:29 +0000 |
commit | 0218397cf4f0420a258a8ff6d87cc630cb3bada6 (patch) | |
tree | bdbb8dc54258e5aa23ede898e2bca90b8a459206 | |
parent | 9a54d9645df4b08789dcf5a7a74e60bf84e407be (diff) | |
download | rockbox-0218397cf4f0420a258a8ff6d87cc630cb3bada6.tar.gz rockbox-0218397cf4f0420a258a8ff6d87cc630cb3bada6.zip |
Gigabeat S bootloader: 1) Switch order of .vectors to be contiguous with initialized sections. 2) Clean all caches in main before doing anything else because vector copying counts as self-modifying code. Up to v.00000012.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17381 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | bootloader/gigabeat-s.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/imx31/boot.lds | 24 |
2 files changed, 16 insertions, 13 deletions
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c index 8858479de3..abfe57ce1f 100644 --- a/bootloader/gigabeat-s.c +++ b/bootloader/gigabeat-s.c | |||
@@ -147,8 +147,11 @@ void main(void) | |||
147 | char tarstring[6]; | 147 | char tarstring[6]; |
148 | char model[5]; | 148 | char model[5]; |
149 | 149 | ||
150 | /* Flush and invalidate all caches (because vectors were written) */ | ||
151 | invalidate_icache(); | ||
152 | |||
150 | lcd_clear_display(); | 153 | lcd_clear_display(); |
151 | printf("Gigabeat S Rockbox Bootloader v.00000011"); | 154 | printf("Gigabeat S Rockbox Bootloader v.00000012"); |
152 | system_init(); | 155 | system_init(); |
153 | kernel_init(); | 156 | kernel_init(); |
154 | printf("kernel init done"); | 157 | printf("kernel init done"); |
diff --git a/firmware/target/arm/imx31/boot.lds b/firmware/target/arm/imx31/boot.lds index d8bb2fc3d1..a7570c1cf0 100644 --- a/firmware/target/arm/imx31/boot.lds +++ b/firmware/target/arm/imx31/boot.lds | |||
@@ -56,8 +56,17 @@ SECTIONS | |||
56 | . = ALIGN(0x4); | 56 | . = ALIGN(0x4); |
57 | _dataend = . ; | 57 | _dataend = . ; |
58 | } > DRAM | 58 | } > DRAM |
59 | |||
60 | .vectors 0x0 : | ||
61 | { | ||
62 | _vectorsstart = .; | ||
63 | *(.vectors); | ||
64 | KEEP(*(.vectors)); | ||
65 | _vectorsend = .; | ||
66 | } AT > DRAM | ||
67 | _vectorscopy = LOADADDR(.vectors); | ||
59 | 68 | ||
60 | .stack : | 69 | .stack (NOLOAD) : |
61 | { | 70 | { |
62 | *(.stack) | 71 | *(.stack) |
63 | _stackbegin = .; | 72 | _stackbegin = .; |
@@ -67,7 +76,7 @@ SECTIONS | |||
67 | stackend = .; | 76 | stackend = .; |
68 | } > IRAM | 77 | } > IRAM |
69 | 78 | ||
70 | .bss : | 79 | .bss (NOLOAD) : |
71 | { | 80 | { |
72 | _edata = .; | 81 | _edata = .; |
73 | *(.bss*); | 82 | *(.bss*); |
@@ -75,16 +84,7 @@ SECTIONS | |||
75 | *(COMMON) | 84 | *(COMMON) |
76 | _end = .; | 85 | _end = .; |
77 | } > DRAM | 86 | } > DRAM |
78 | 87 | ||
79 | .vectors 0x0 : | ||
80 | { | ||
81 | _vectorsstart = .; | ||
82 | *(.vectors); | ||
83 | KEEP(*(.vectors)); | ||
84 | _vectorsend = .; | ||
85 | } AT > DRAM | ||
86 | _vectorscopy = LOADADDR(.vectors); | ||
87 | |||
88 | .devbss (NOLOAD) : | 88 | .devbss (NOLOAD) : |
89 | { | 89 | { |
90 | _devbssdata = .; | 90 | _devbssdata = .; |