diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2010-10-07 20:03:33 +1100 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2010-10-07 20:03:33 +1100 |
commit | c868af3e57610b41c6ed4fd8d8744d8cc0a21b29 (patch) | |
tree | 6d2d1efd72aa3e7fc506f7ac65f106d163410ea5 /arch/i386/cpu | |
parent | f2ff75c0a25eb78b4b86fd96c5f0be9dd327e2d7 (diff) | |
download | u-boot-imx-c868af3e57610b41c6ed4fd8d8744d8cc0a21b29.zip u-boot-imx-c868af3e57610b41c6ed4fd8d8744d8cc0a21b29.tar.gz u-boot-imx-c868af3e57610b41c6ed4fd8d8744d8cc0a21b29.tar.bz2 |
x86: Implement fully relocatable image
u-boot.bin can be loaded at any 4-byte aligned memory location and directly
'jumped' to using the 'go' command using the load address as the start
address. Doing so performs a 'warm boot' which skips memory initialisation
and other low-level initialisations, relocates U-Boot to upper memory and
starts U-Boot in RAM as per normal 'cold boot'
Diffstat (limited to 'arch/i386/cpu')
-rw-r--r-- | arch/i386/cpu/start.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S index 8fdcd81..829468f 100644 --- a/arch/i386/cpu/start.S +++ b/arch/i386/cpu/start.S @@ -118,6 +118,11 @@ mem_ok: wbinvd + /* Determine our load offset */ + call 1f +1: popl %ecx + subl $1b, %ecx + /* Set the upper memory limit parameter */ subl $CONFIG_SYS_STACK_SIZE, %eax @@ -127,6 +132,7 @@ mem_ok: /* %eax points to the global data structure */ movl %esp, (GD_RAM_SIZE * 4)(%eax) movl %ebx, (GD_FLAGS * 4)(%eax) + movl %ecx, (GD_LOAD_OFF * 4)(%eax) call board_init_f /* Enter, U-boot! */ |