[U-Boot,v2,05/13] x86: efi: payload: Add arch_cpu_init()

Message ID 1528817785-20208-6-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Bin Meng
Headers show
Series
  • x86: efi: Fixes and enhancements to application and payload support
Related show

Commit Message

Bin Meng June 12, 2018, 3:36 p.m.
This adds arch_cpu_init() to the payload codes, in preparation for
supporting a generic efi payload.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/x86/cpu/efi/payload.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Bin Meng June 17, 2018, 1:18 p.m. | #1
On Tue, Jun 12, 2018 at 11:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> This adds arch_cpu_init() to the payload codes, in preparation for
> supporting a generic efi payload.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/efi/payload.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>

applied to u-boot-x86, thanks!

Patch

diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 81fb8b5..9fd9f57 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -5,11 +5,9 @@ 
  */
 
 #include <common.h>
-#include <debug_uart.h>
 #include <efi.h>
 #include <errno.h>
-#include <linux/err.h>
-#include <linux/types.h>
+#include <asm/post.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -126,6 +124,13 @@  int dram_init_banksize(void)
 	return 0;
 }
 
+int arch_cpu_init(void)
+{
+	post_code(POST_CPU_INIT);
+
+	return x86_cpu_init_f();
+}
+
 int checkcpu(void)
 {
 	return 0;