Bootloader: Difference between revisions
No edit summary |
|||
| Line 227: | Line 227: | ||
FIRMLOAD_EXIT: | FIRMLOAD_EXIT: | ||
Here firmboot() is called, which should never return. The instruction after this bl is a call for panic(). | Here firmboot() is called, which should never return. The instruction after this bl is a call for panic(). | ||
== Boot11 == | |||
* ... | |||
main(): | |||
LT_1263c(); | |||
... | |||
LT_13944() | |||
... | |||
pxi_init(); | |||
initializefuncptr_firmboot_start(firmbootbegin_funcptr); | |||
firmboot(); | |||
return; | |||
LT_12220/initializefuncptr_firmboot_start | |||
inr0=funcptr | |||
This writes inr0 to address 0x1ffe8028, then returns. | |||
This initializes the funcptr which firmboot() can call after the very first func-call. | |||
LT_13944 | |||
if([[I2C_Registers|i2cmcu_readregf]](sp+0)==0) | |||
{ | |||
return (*((u8*)0x10147000) >> 4) & 1;//Reads [[GPIO_Registers|GPIO]] when reading I2C fails. | |||
} | |||
Here it basically does "return <byte loaded from sp+0> ^ 0x2". Hence in this case, it will return 0x2 when the system shell is closed(sleep-mode), otherwise 0x0 is returned. | |||
LT_12454/firmboot | |||
This is the arm11 version of the boot9 firmboot() function, like boot9 this is the final function called from main(). The functionality for these two functions are identical, minus addresses. | |||
ptr = firmboot_loadentrypoint11(); | |||
funcptr = *(0x1ffe8028); | |||
if(funcptr)funcptr(ptr); | |||
LT_11ffc(ptr); | |||
return; | |||
== Boot Procedure == | == Boot Procedure == | ||