From patchwork Wed Apr 22 00:45:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Park, Aiden" X-Patchwork-Id: 1274586 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 496MDp6Slsz9sP7 for ; Wed, 22 Apr 2020 10:46:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1107381A26; Wed, 22 Apr 2020 02:45:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7D79D81C46; Wed, 22 Apr 2020 02:45:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 11D6881A26 for ; Wed, 22 Apr 2020 02:45:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aiden.park@intel.com IronPort-SDR: 0yzkYSo2GZnkMw2hUgbaqI8dyvV3M/VzA6bQXV2TqYajke/BuJOk/DHQ5Ryuvo3RMep8yVAc5w gOuUZpVwGgOw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 17:45:36 -0700 IronPort-SDR: 2xR2a0YQ32vtkmlYhm2lL2UKkB6hnUruyit6YLXQFYG4xBei5BvfX0WsDsCenNWENfSxaw02jn HPX5ShR3KW6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="456305598" Received: from younghyu-desk1.jf.intel.com ([134.134.154.164]) by fmsmga005.fm.intel.com with ESMTP; 21 Apr 2020 17:45:35 -0700 From: aiden.park@intel.com To: bmeng.cn@gmail.com, sjg@chromium.org, u-boot@lists.denx.de Cc: Aiden Park Subject: [PATCH 2/8] x86: start64: Add a hook at 64-bit entry Date: Tue, 21 Apr 2020 17:45:01 -0700 Message-Id: <20200422004507.2025-3-aiden.park@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200422004507.2025-1-aiden.park@intel.com> References: <20200422004507.2025-1-aiden.park@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean From: Aiden Park This will allow a board or cpu to do its specific initialization at 64-bit entry if U-Boot is a pure 64-bit binary. Signed-off-by: Aiden Park --- arch/x86/cpu/start64.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/cpu/start64.S b/arch/x86/cpu/start64.S index 7be834788b..b8ac5aab57 100644 --- a/arch/x86/cpu/start64.S +++ b/arch/x86/cpu/start64.S @@ -13,6 +13,11 @@ .globl _start .type _start, @function _start: +#if defined(CONFIG_X86_RUN_64BIT_ONLY) + jmp init_64bit_entry +.globl init_64bit_entry_ret +init_64bit_entry_ret: +#endif /* Set up memory using the existing stack */ mov %rsp, %rdi call board_init_f_alloc_reserve