summaryrefslogtreecommitdiff
path: root/firmware/system.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-02-23 23:22:03 +0000
committerDave Chapman <dave@dchapman.com>2007-02-23 23:22:03 +0000
commitfda1498696258d91d950ca4260daa76e536dcce0 (patch)
tree4cc50527b5a79bd69427a8ba3e25dfc4587685f5 /firmware/system.c
parent87865a52278d71333011794b09ad3791ca20a791 (diff)
downloadrockbox-fda1498696258d91d950ca4260daa76e536dcce0.zip
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.gz
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.bz2
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.xz
Remap flash ROM to 0x20000000 on the ipods and H10s, and implement dbg_save_roms() in the debug menu for those targets to dump the content to a file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12467 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
-rw-r--r--firmware/system.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/system.c b/firmware/system.c
index 49f01df..463eec5 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -754,6 +754,10 @@ void ipod_set_cpu_frequency(void)
void system_init(void)
{
#ifndef BOOTLOADER
+ /* Remap the flash ROM from 0x00000000 to 0x20000000. */
+ MMAP3_LOGICAL = 0x20000000 | 0x3a00;
+ MMAP3_PHYSICAL = 0x00000000 | 0x3f84;
+
/* The hw revision is written to the last 4 bytes of SDRAM by the
bootloader - we save it before Rockbox overwrites it. */
ipod_hw_rev = (*((volatile unsigned long*)(0x01fffffc)));
@@ -897,6 +901,10 @@ static void ipod_set_cpu_speed(void)
void system_init(void)
{
#ifndef BOOTLOADER
+ /* Remap the flash ROM from 0x00000000 to 0x20000000. */
+ MMAP3_LOGICAL = 0x20000000 | 0x3a00;
+ MMAP3_PHYSICAL = 0x00000000 | 0x3f84;
+
ipod_hw_rev = (*((volatile unsigned long*)(0x01fffffc)));
outl(-1, 0xcf00101c);
outl(-1, 0xcf001028);