public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: aiden.park at intel.com <aiden.park@intel.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/8] x86: slimbootloader: Support 64-bit operation
Date: Tue, 21 Apr 2020 17:45:03 -0700	[thread overview]
Message-ID: <20200422004507.2025-5-aiden.park@intel.com> (raw)
In-Reply-To: <20200422004507.2025-1-aiden.park@intel.com>

From: Aiden Park <aiden.park@intel.com>

This supports 64-bit U-Boot as a Slim Bootloader payload.

Signed-off-by: Aiden Park <aiden.park@intel.com>
---
 arch/x86/cpu/slimbootloader/Makefile         |  9 +++++++--
 arch/x86/cpu/slimbootloader/entry64.S        | 14 ++++++++++++++
 arch/x86/cpu/slimbootloader/slimbootloader.c | 17 +++++++++++++++--
 3 files changed, 36 insertions(+), 4 deletions(-)
 create mode 100644 arch/x86/cpu/slimbootloader/entry64.S

diff --git a/arch/x86/cpu/slimbootloader/Makefile b/arch/x86/cpu/slimbootloader/Makefile
index aac9fa3db8..79fa699501 100644
--- a/arch/x86/cpu/slimbootloader/Makefile
+++ b/arch/x86/cpu/slimbootloader/Makefile
@@ -1,5 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
-# Copyright (C) 2019 Intel Corporation <www.intel.com>
+# Copyright (C) 2019-2020 Intel Corporation <www.intel.com>
 
-obj-y += car.o slimbootloader.o sdram.o serial.o
+ifeq ($(CONFIG_X86_64),y)
+obj-y += entry64.o
+else
+obj-y += car.o
+endif
+obj-y += slimbootloader.o sdram.o serial.o
diff --git a/arch/x86/cpu/slimbootloader/entry64.S b/arch/x86/cpu/slimbootloader/entry64.S
new file mode 100644
index 0000000000..5e101e18a9
--- /dev/null
+++ b/arch/x86/cpu/slimbootloader/entry64.S
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020 Intel Corporation <www.intel.com>
+ */
+
+#include <generated/asm-offsets.h>
+
+.section .text
+
+.globl init_64bit_entry
+init_64bit_entry:
+	/* Save hob pointer parameter */
+	mov	%rcx, %r10
+	jmp	init_64bit_entry_ret
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index 21dcfb2142..7857e4cd8b 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (C) 2019 Intel Corporation <www.intel.com>
+ * Copyright (C) 2019-2020 Intel Corporation <www.intel.com>
  */
 
 #include <common.h>
@@ -43,11 +43,23 @@ static void tsc_init(void)
 
 int arch_cpu_init(void)
 {
+	int ret = 0;
+
 	tsc_init();
 
-	return x86_cpu_init_f();
+#if !CONFIG_IS_ENABLED(X86_64)
+	ret = x86_cpu_init_f();
+#endif
+	return ret;
 }
 
+#if CONFIG_IS_ENABLED(X86_64)
+int set_hob_list(void *hob_list)
+{
+	gd->arch.hob_list = hob_list;
+	return 0;
+}
+#else
 int checkcpu(void)
 {
 	return 0;
@@ -57,3 +69,4 @@ int print_cpuinfo(void)
 {
 	return default_print_cpuinfo();
 }
+#endif
-- 
2.20.1

  parent reply	other threads:[~2020-04-22  0:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  0:44 [PATCH 0/8] Support 64-bit U-Boot for Slim Bootloader aiden.park at intel.com
2020-04-22  0:45 ` [PATCH 1/8] x86: Add a new X86_RUN_64BIT_ONLY to Kconfig aiden.park at intel.com
2020-04-26 20:15   ` Simon Glass
2020-04-29  5:44     ` Park, Aiden
2020-04-30  9:13       ` Bin Meng
2020-05-01 18:36         ` Park, Aiden
2020-05-03  2:26           ` Simon Glass
2020-04-22  0:45 ` [PATCH 2/8] x86: start64: Add a hook at 64-bit entry aiden.park at intel.com
2020-04-26 20:15   ` Simon Glass
2020-04-29  5:48     ` Park, Aiden
2020-04-22  0:45 ` [PATCH 3/8] x86: start64: Support HOB in 64-bit U-Boot aiden.park at intel.com
2020-04-26 20:15   ` Simon Glass
2020-04-29  5:57     ` Park, Aiden
2020-04-22  0:45 ` aiden.park at intel.com [this message]
2020-04-26 20:15   ` [PATCH 4/8] x86: slimbootloader: Support 64-bit operation Simon Glass
2020-04-29  6:01     ` Park, Aiden
2020-04-29 18:03       ` Simon Glass
2020-05-01 18:34         ` Park, Aiden
2020-04-22  0:45 ` [PATCH 5/8] configs: slimbootloader: Add x86_64 slimbootloader config aiden.park at intel.com
2020-04-26 20:32   ` Simon Glass
2020-04-29  6:02     ` Park, Aiden
2020-04-30  9:13     ` Bin Meng
2020-04-22  0:45 ` [PATCH 6/8] x86: Fix 64-bit compile warning aiden.park at intel.com
2020-04-26 19:45   ` Simon Glass
2020-04-29  6:08     ` Park, Aiden
2020-04-22  0:45 ` [PATCH 7/8] x86: enable 64-bit kernel boot from 64-bit U-Boot aiden.park at intel.com
2020-04-26 20:15   ` Simon Glass
2020-04-29  6:17     ` Park, Aiden
2020-04-22  0:45 ` [PATCH 8/8] doc: slimbootloader: Update 64-bit build instruction aiden.park at intel.com
2020-04-30  9:13   ` Bin Meng
2020-04-26 20:15 ` [PATCH 0/8] Support 64-bit U-Boot for Slim Bootloader Simon Glass
2020-04-29  5:41   ` Park, Aiden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422004507.2025-5-aiden.park@intel.com \
    --to=aiden.park@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox