diff --git a/qiboot/gta03-qi.ocd b/qiboot/gta03-qi.ocd new file mode 100755 index 0000000..16cf0bd --- /dev/null +++ b/qiboot/gta03-qi.ocd @@ -0,0 +1,33 @@ +# gta03 Qi script +# Andy Green + +reset halt +wait_halt + +# bring the steppingstone part of qi image into steppingstone +# +load_binary /projects/openmoko/bootloader/image/qi 0x0 +# +# mark ourselves as JTAG load +# +mww 0x4 0xffffffff + +# +# we have to run that so SDRAM exists in a usable way +# fixed jumpthrough at 0x8 is executed after steppingstone +# init (including RAM) has completed +# +bp 0x8 4 hw +resume 0x0 +wait_halt +rbp 0x8 + +# +# now prep the SDRAM +# +load_binary /projects/openmoko/bootloader/image/qi 0x33000000 +# +# and continue... +resume 0x8 +# + diff --git a/qiboot/src/start.S b/qiboot/src/start.S index 43cfffd..1514e0f 100644 --- a/qiboot/src/start.S +++ b/qiboot/src/start.S @@ -28,6 +28,17 @@ _start: b start_code _is_jtag: .word 0 +/* it's at a fixed address (+0x8) so we can breakpoint it in the JTAG script + * we need to go through this hassle because before this moment, SDRAM is not + * working so we can't prep it from JTAG + */ + +_steppingstone_done: + ldr pc, _start_armboot + +_start_armboot: + .word start_qi + _TEXT_BASE: .word TEXT_BASE @@ -192,10 +203,7 @@ clbss_l: /* we are going to jump into the C part of the init now */ spin: - ldr pc, _start_armboot - -_start_armboot: - .word start_qi + b _steppingstone_done /* *************************************************************************