diff options
author | Simon Glass <sjg@chromium.org> | 2015-08-04 12:33:57 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-05 08:44:07 -0600 |
commit | 42fde30500eef6795129c3e4fda9951048c76617 (patch) | |
tree | 007cebcf8d1ddc0c529e15cf3bd90e8d2f57ca9d /arch/x86/cpu | |
parent | 96a8d409a75af99ac7a9a9ba707d544f9cf44fc0 (diff) |
x86: Add support for passing tables into U-Boot
The EFI stub provides information to U-Boot in a table. This includes the
memory map which is needed to decide where to relocate U-Boot. Collect this
information in the early init code and store it in global_data.
Fix up the BIST code at the same time since we don't have it when booting
from EFI and can assume it is 0.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r-- | arch/x86/cpu/start.S | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index a0dec39abe..e5c1733e59 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -42,6 +42,13 @@ _x86boot_start: /* Tell 32-bit code it is being entered from an in-RAM copy */ movl $GD_FLG_WARM_BOOT, %ebx + + /* + * Zero the BIST (Built-In Self Test) value since we don't have it. + * It must be 0 or the previous loader would have reported an error. + */ + movl $0, %ebp + jmp 1f /* Add a way for tools to discover the _start entry point */ @@ -53,9 +60,13 @@ _start: * Set %ebx to GD_FLG_COLD_BOOT to indicate this. */ movl $GD_FLG_COLD_BOOT, %ebx -1: + /* Save BIST */ movl %eax, %ebp +1: + + /* Save table pointer */ + movl %ecx, %esi /* Load the segement registers to match the GDT loaded in start16.S */ movl $(X86_GDT_ENTRY_32BIT_DS * X86_GDT_ENTRY_SIZE), %eax @@ -133,7 +144,13 @@ car_init_ret: movl %esi, (%edx) skip_hob: +#else + /* Store table pointer */ + movl %esp, %edx + addl $GD_TABLE, %edx + movl %esi, (%edx) #endif + /* Setup first parameter to setup_gdt, pointer to global_data */ movl %esp, %eax |