summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/ipod.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index b3ff7bcedb..bafcb4909d 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -56,6 +56,49 @@ unsigned char *loadbuffer = (unsigned char *)DRAM_START;
56/* Bootloader version */ 56/* Bootloader version */
57char version[] = APPSVERSION; 57char version[] = APPSVERSION;
58 58
59struct sysinfo
60{
61 unsigned IsyS; /* == "IsyS" */
62 unsigned len;
63 char BoardHwName[16];
64 char pszSerialNumber[32];
65 char pu8FirewireGuid[16];
66 unsigned boardHwRev;
67 unsigned bootLoaderImageRev;
68 unsigned diskModeImageRev;
69 unsigned diagImageRev;
70 unsigned osImageRev;
71 unsigned iram_perhaps;
72 unsigned Flsh;
73 unsigned flash_zero;
74 unsigned flash_base;
75 unsigned flash_size;
76 unsigned flash_zero2;
77 unsigned Sdrm;
78 unsigned sdram_zero;
79 unsigned sdram_base;
80 unsigned sdram_size;
81 unsigned sdram_zero2;
82 unsigned Frwr;
83 unsigned frwr_zero;
84 unsigned frwr_base;
85 unsigned frwr_size;
86 unsigned frwr_zero2;
87 unsigned Iram;
88 unsigned iram_zero;
89 unsigned iram_base;
90 unsigned iram_size;
91 unsigned iram_zero2;
92 char pad7[120];
93 unsigned boardHwSwInterfaceRev;
94
95 /* added in V3 */
96 char HddFirmwareRev[10];
97 unsigned short RegionCode;
98 unsigned PolicyFlags;
99 char ModelNumStr[16];
100};
101
59#define BUTTON_LEFT 1 102#define BUTTON_LEFT 1
60#define BUTTON_MENU 2 103#define BUTTON_MENU 2
61#define BUTTON_RIGHT 3 104#define BUTTON_RIGHT 3
@@ -220,6 +263,24 @@ void fatal_error(void)
220 263
221} 264}
222 265
266static struct sysinfo ** const sysinfo_ptr =
267#if CONFIG_CPU == PP5002 || CONFIG_CPU == PP5020
268 0x40017f1c;
269#elif CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024
270 0x4001ff1c;
271#endif
272
273static unsigned ipod_get_hwrev_sysinfo(void)
274{
275 if ( (*sysinfo_ptr)->IsyS == *(unsigned *)"IsyS" )
276 {
277 if ((*sysinfo_ptr)->len == 0xf8)
278 return (*sysinfo_ptr)->sdram_zero2;
279 else
280 return (*sysinfo_ptr)->boardHwSwInterfaceRev;
281 }
282 return 0xffffffff; /* unknown */
283}
223 284
224void* main(void) 285void* main(void)
225{ 286{
@@ -270,6 +331,9 @@ void* main(void)
270 printf("Rockbox boot loader"); 331 printf("Rockbox boot loader");
271 printf("Version: %s", version); 332 printf("Version: %s", version);
272 printf("IPOD version: 0x%08x", IPOD_HW_REVISION); 333 printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
334
335 printf("SysI ptr: %08x", *sysinfo_ptr);
336 printf("SysI HWR: %08x", ipod_get_hwrev_sysinfo());
273 337
274 i=ata_init(); 338 i=ata_init();
275 if (i==0) { 339 if (i==0) {