From patchwork Mon Sep 26 03:33:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 674900 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sj8tK2Mq1z9s65 for ; Mon, 26 Sep 2016 13:42:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=Qq7IrWT/; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D2E92A778A; Mon, 26 Sep 2016 05:39:05 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tc_sc2PKDjgL; Mon, 26 Sep 2016 05:39:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 48EFBB3940; Mon, 26 Sep 2016 05:36:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 309FDB382B for ; Mon, 26 Sep 2016 05:35:48 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nEUZaml1psKQ for ; Mon, 26 Sep 2016 05:35:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by theia.denx.de (Postfix) with ESMTPS id 170ECB385E for ; Mon, 26 Sep 2016 05:35:13 +0200 (CEST) Received: by mail-io0-f169.google.com with SMTP id m186so169775682ioa.2 for ; Sun, 25 Sep 2016 20:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=9gRlVZWt9mFAeFoc9dEA5pZIenlVNTb4YXI6a5sKWc8=; b=Qq7IrWT/8aV9T3OerZBgY3Kw8Qu3Qh2Q2qxNylqXZmEHR49QtFvGR2WBJQAArHwcKq E2wSWAW2KBFHHxyMv03015uVjKpk26iyQbazlLim1aldF+zhEmCjWnzVZ2AJyc3er7p0 YJpMGopvnFvEXotC4Y8XoZ1+cC6THfBrH6+fLSdvOFZ22UnF066qBnuYwhFbceBvPdv5 vx8kBA7R290PAIUIPw21EmRMB0Iv4Zosv3tg5XV1DXfb9/24QnyYao7hz2kGpCjaj3HR b0m6rvOC1e2afToonDyv+SIbeVSGOPS/dRODYiZD8TqMhqMioIG10mY1B0nOqAW6EhnR tJvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=9gRlVZWt9mFAeFoc9dEA5pZIenlVNTb4YXI6a5sKWc8=; b=N91r1SeLwJTv0JOdujwxLwKuwOdLDj9FbhIQkaYVcuzQUAYz4+eWuNxM1PLxXrFeEU XEvFh/LToINyzwjW4tBQo6Y4v3+KPFL7KyGKd9IM9Ayp0TcgdPkIbU0Wvmm9W+LvhuAC S6czsq8qTgkg75XTA07nAJ8nDRIGBI0oB0CTQ1VeWcZQA9ShNdzb4N27uQJaSrKWLjgH /0CPSgjuA8HpKf/lCLm6ecoQsGQZUCqooLj+IJU9+SfZBupI37+U/FTdoZxCHt519gmT dX0UtgxFv338uGIJQSPYvDaEE3XvtpB+PLYXteCDF7sQ7hnV9m/pQgGmr/v+/t7iR4v/ ZooQ== X-Gm-Message-State: AA6/9RlwnvgSwpSMv8mietgyGkhJ9kPfCjc3THMMXZb4uUZxFtzubp3DVNXXsvti5nTCyO+z X-Received: by 10.107.14.139 with SMTP id 133mr10656078ioo.140.1474860912213; Sun, 25 Sep 2016 20:35:12 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.55]) by smtp.gmail.com with ESMTPSA id g78sm3135146itb.12.2016.09.25.20.35.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 20:35:06 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 31307222147; Sun, 25 Sep 2016 21:35:04 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 25 Sep 2016 21:33:41 -0600 Message-Id: <1474860866-16406-39-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1474860866-16406-1-git-send-email-sjg@chromium.org> References: <1474860866-16406-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH 38/82] x86: Add Kconfig options to build 64-bit U-Boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a new CONFIG_X86_64 option which will eventually cause U-Boot to be built as a 64-bit application, with SPL doing the 16/32-bit init. Signed-off-by: Simon Glass --- arch/x86/Kconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5193ee7..0505f97 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -5,6 +5,52 @@ config SYS_ARCH default "x86" choice + prompt "Run U-Boot in 32/64-bit mode" + default X86_RUN_32BIT + help + U-Boot can be built as a 32-bit binary which runs in 32-bit mode + even on 64-bit machines. In this case SPL is not used, and U-Boot + runs directly from the reset vector (via 16-bit start-up). + + Alternatively it can be run as a 64-bit binary, thus requiring a + 64-bit machine. In this case SPL runs in 32-bit mode (via 16-bit + start-up) then jumps to U-Boot in 64-bit mode. + + For now, 32-bit mode is recommended, as 64-bit is still + experimental and is missing a lot of features. + +config X86_RUN_32BIT + bool "32-bit" + help + Build U-Boot as a 32-bit binary with no SPL. This is the currently + supported normal setup. U-Boot will stay in 32-bit mode even on + 64-bit machines. When booting a 64-bit kernel, U-Boot will switch + to 64-bit just before starting the kernel. Only the bottom 4GB of + memory can be accessed through normal means, although + arch_phys_memset() can be used for basic access to other memory. + +config X86_RUN_64BIT + bool "64-bit" + select X86_64 + select SUPPORT_SPL + select SPL + select SPL_SEPARATE_BSS + help + Build U-Boot as a 64-bit binary with a 32-bit SPL. This is + experimental and many features are missing. U-Boot SPL starts up, + runs through the 16-bit and 32-bit init, then switches to 64-bit + mode and jumps to U-Boot proper. + +endchoice + +config X86_64 + bool + +config SPL_X86_64 + bool + depends on SPL + +choice prompt "Mainboard vendor" default VENDOR_EMULATION