diff --git a/README.md b/README.md index 9cd86b1..11d15cf 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,9 @@ This bootloader will: | Offset | Content | |-|-| -| 0x00 | end address of loadable sections | -| 0x04 | entry point | +| 0x00 | start address of target memory region | +| 0x04 | end address of loadable sections | +| 0x08 | entry point | ## Project status TODO diff --git a/startup_stx7105.S b/startup_stx7105.S index 5724d87..7c51efd 100644 --- a/startup_stx7105.S +++ b/startup_stx7105.S @@ -119,8 +119,9 @@ _go_non_privileged: _copy_app: mov.l _app_copy_end_k, r0 /* App load location, in EMI */ - mov.l @r0, r1 /* Offset 0, eidata */ - mov.l _app_base_k, r2 /* App execute location, start of LMI RAM */ + mov.l @r0, r1 /* Offset 0x04, eidata */ + mov.l _app_base_k, r0 /* App base location, in LMI */ + mov.l @r0, r2 /* Offset 0x00, stext */ _loop_copy_app: mov.l @r0+, r3 @@ -252,8 +253,8 @@ _init_ram_k: .long _memory_setup_init_ram _app_base_k: - .long 0x80000000U /* App to be copied to */ + .long 0xA0000000U /* stext */ _app_copy_end_k: - .long 0xA0008000U /* eiaddr */ + .long 0xA0008004U /* eiaddr */ _app_entry_k: - .long 0xA0008004U \ No newline at end of file + .long 0xA0008008U /* entry */ \ No newline at end of file