comparison target-utils/compalstage/compalstage.S @ 11:21eec7569eb8

loadtools support for C139/140 target: -c 1004 compalstage variant supercedes the previous -c 1003 version and supports the new C139 boot code version found in the wild that expects "1004" or greater in the signature bytes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 25 Jul 2016 21:09:33 +0000
parents e7502631a0f9
children
comparison
equal deleted inserted replaced
10:56b1bab3e09b 11:21eec7569eb8
20 mov pc, #0 20 mov pc, #0
21 reg_addr: 21 reg_addr:
22 .word 0xFFFFFB10 22 .word 0xFFFFFB10
23 23
24 #if PAD_TO_1003 24 #if PAD_TO_1003
25 /*
26 * The older and most familiar versions of C139/140 boot code expect the
27 * signature bytes to be "1003" or greater, but a recently encountered
28 * newer version expects them to be "1004" or greater instead. As the
29 * actual comparison check in all currently known boot code versions is
30 * an inequality (the signature bytes in the downloaded image need to be
31 * greater than or equal to the hard-coded reference values), always
32 * putting "1004" in our compalstage image instead of "1003" should satisfy
33 * all existing C1xx boot code versions, or at least all currently known
34 * ones. However, having an image named compalstage-1003.bin with the
35 * corresponding -c 1003 loadtools option that is actually "1004" inside
36 * feels a little "wrong" in some sense, while getting rid of the -c 1003
37 * option would break old user instructions, hence let's go ahead and do the
38 * silly exercise of building both "1003" and "1004" versions.
39 */
25 .org 0x3be0 40 .org 0x3be0
41 #if MAGIC_1004
42 .ascii "1004"
43 #else
26 .ascii "1003" 44 .ascii "1003"
27 #endif 45 #endif
46 #endif