summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-12-10 22:02:56 -0800
committerBin Meng <bmeng.cn@gmail.com>2016-01-13 12:20:13 +0800
commitaa02446406af194b7c79c2fae06073690e4fbba3 (patch)
tree5e3c76e17bfac229d27a83cbc9712e4a13c912c1
parentfa85e826c16b9ce1ad302a57e9c4b24db0d8b930 (diff)
downloadtalos-obmc-uboot-aa02446406af194b7c79c2fae06073690e4fbba3.tar.gz
talos-obmc-uboot-aa02446406af194b7c79c2fae06073690e4fbba3.zip
x86: fsp: Simplify fsp_continue()
There is no need to pass shared_data to fsp_continue() so we can remove unnecessary codes that simplifies the function a lot. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/x86/include/asm/fsp/fsp_support.h4
-rw-r--r--arch/x86/lib/fsp/fsp_support.c29
2 files changed, 7 insertions, 26 deletions
diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h
index 7317dda902..f30d7b4854 100644
--- a/arch/x86/include/asm/fsp/fsp_support.h
+++ b/arch/x86/include/asm/fsp/fsp_support.h
@@ -49,14 +49,12 @@ void fsp_init_done(void *hob_list);
/**
* FSP Continuation function
*
- * @shared_data: Shared data base before stack migration
* @status: Always 0
* @hob_list: HOB list pointer
*
* @retval: Never returns
*/
-void fsp_continue(struct shared_data *shared_data, u32 status,
- void *hob_list);
+void fsp_continue(u32 status, void *hob_list);
/**
* Find FSP header offset in FSP image
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index 1d48ff4a8e..0408b5d5cd 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -87,28 +87,12 @@ struct fsp_header *__attribute__((optimize("O0"))) find_fsp_header(void)
return (struct fsp_header *)fsp;
}
-void fsp_continue(struct shared_data *shared_data, u32 status, void *hob_list)
+void fsp_continue(u32 status, void *hob_list)
{
- u32 stack_len;
- u32 stack_base;
- u32 stack_top;
-
post_code(POST_MRC);
assert(status == 0);
- /* Get the migrated stack in normal memory */
- stack_base = (u32)fsp_get_bootloader_tmp_mem(hob_list, &stack_len);
- assert(stack_base != 0);
- stack_top = stack_base + stack_len - sizeof(u32);
-
- /*
- * Old stack base is stored at the very end of the stack top,
- * use it to calculate the migrated shared data base
- */
- shared_data = (struct shared_data *)(stack_base +
- ((u32)shared_data - *(u32 *)stack_top));
-
/* The boot loader main function entry */
fsp_init_done(hob_list);
}
@@ -176,19 +160,18 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
setup_fsp_gdt();
/*
- * Use ASM code to ensure the register value in EAX & ECX
- * will be passed into BlContinuationFunc
+ * Use ASM code to ensure the register value in EAX & EDX
+ * will be passed into fsp_continue
*/
asm volatile (
"pushl %0;"
"call *%%eax;"
".global asm_continuation;"
"asm_continuation:;"
- "movl %%ebx, %%eax;" /* shared_data */
- "movl 4(%%esp), %%edx;" /* status */
- "movl 8(%%esp), %%ecx;" /* hob_list */
+ "movl 4(%%esp), %%eax;" /* status */
+ "movl 8(%%esp), %%edx;" /* hob_list */
"jmp fsp_continue;"
- : : "m"(params_ptr), "a"(init), "b"(&shared_data)
+ : : "m"(params_ptr), "a"(init)
);
/*
OpenPOWER on IntegriCloud