From patchwork Mon Sep 26 03:33:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 674943 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 3sj94F19Mgz9s65 for ; Mon, 26 Sep 2016 13:51:09 +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=j+ZYpWtf; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA3D5B3967; Mon, 26 Sep 2016 05:44:47 +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 cdjpil3krPXE; Mon, 26 Sep 2016 05:44:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 642EFB38A6; Mon, 26 Sep 2016 05:44:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3A81A778B for ; Mon, 26 Sep 2016 05:43:38 +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 Jp1fOc4A9EsL for ; Mon, 26 Sep 2016 05:43:38 +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-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by theia.denx.de (Postfix) with ESMTPS id 1E5E1A7796 for ; Mon, 26 Sep 2016 05:43:26 +0200 (CEST) Received: by mail-io0-f179.google.com with SMTP id m79so170436625ioo.3 for ; Sun, 25 Sep 2016 20:43:26 -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=e5LSMiJmB/kF1KLX0QQyLyXLOpQLBkRoKwEeQaigdrA=; b=j+ZYpWtfxPW4Qn7LOmRFHgXhuFC2eKFszZyn10HSXhGXQ7rgbeqnZaCHSfxKzckLBg ChtrZnI9XJoyzV7E6eoAkqU4eNqXr7oDR5pYUp5Ksrcu4dFvhKBmd7V7Eoe+qSmXCCXP 5Dtl8mob2Zpd78WFJj4XZ1/yTRBlXsizu2M5z6iHJWVg7q5OLjVt6RVXV+M7IFojybIF HwF873dPRZ9dmp6hYHe6C5/4aTdgjC/mPj9m3fwGKlrNN8FOv+FMUKCji7VgQL4EE6fd oBrGg071KEonCUVEjz//B7EKK3PPNt8kIfbI6zsYn8Km9eNwUhXSLY3JydTjLNRxCFnp vTyg== 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=e5LSMiJmB/kF1KLX0QQyLyXLOpQLBkRoKwEeQaigdrA=; b=JmtTwvS6dETGunbz6gX4+91GCWb8p2g7iUgl/+2pZi2KULYXz9hCofpmx19utI4wt3 PHdQlbmTjBXbF+YmGyjQ/95b0xTE+1BfgoN/XGGks5nxfWfIntt96U/uVTSTiNwVfQ41 wQWeHMNTFIOwXeG2Xp3HThjmsjTKVtUI0gdZh/aEetx7wxLrTeFs/8REBz0SXtmAeHf6 JSTQBMcsZULm9SZBSKer9NmuOYMSpChTHvQPBCaFGPRcuyn7CNBhGrBs8NC+imYcjSHj LLpgFJaiNwE3sMPbR8nPc6lPTYRHA7E5r2IyGrlnMH6Xum6+jAH+63d4rJw7tPr4fK79 Lrag== X-Gm-Message-State: AA6/9RmoFqMTVcCYMcvWTHgAJLgLMbwkxp1/Ixx1xOCW/HBZyY+NpDs9xGq85DCQzDLPor82 X-Received: by 10.107.136.209 with SMTP id s78mr24414913ioi.171.1474861404893; Sun, 25 Sep 2016 20:43:24 -0700 (PDT) Received: from kaki.bld.corp.google.com ([2620:0:1005:12:61b7:f33c:9010:eb01]) by smtp.gmail.com with ESMTPSA id o123sm3152962itg.0.2016.09.25.20.43.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 20:43:21 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id B17B1222034; Sun, 25 Sep 2016 21:35:04 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 25 Sep 2016 21:33:42 -0600 Message-Id: <1474860866-16406-40-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 39/82] x86: Kconfig: Add location options for 16/32-bit init 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" At present all 16/32-bit init is controlled by CONFIG_X86_RESET_VECTOR. If this is enabled, then U-Boot is the 'first' boot loader and handles execution from the reset vector through to U-Boot's command prompt. If it is not enabled then U-Boot starts at the 32-bit entry and skips most of its init, assuming that the previous boot loader has done this already. With the move to suport 64-bit operation, we have more cases to consider. The 16-bit and 32-bit init may be in SPL rather than in U-Boot proper. Add Kconfig options which control the location of the 16-bit and the 32-bit init. These are not intended to be user-setting except for experimentation. Their values should be determined by whether 64-bit U-Boot is used. Signed-off-by: Simon Glass --- arch/x86/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0505f97..24d8f4f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -135,6 +135,45 @@ config X86_RESET_VECTOR bool default n +# The following options control where the 16-bit and 32-bit init lies +# If SPL is enabled then it normally holds this init code, and U-Boot proper +# is normally a 64-bit build. +# +# The 16-bit init refers to the reset vector and the small amount of code to +# get the processor into 32-bit mode. It may be in SPL or in U-Boot proper, +# or missing altogether if U-Boot is started from EFI or coreboot. +# +# The 32-bit init refers to processor init, running binary blobs including +# FSP, setting up interrupts and anything else that needs to be done in +# 32-bit code. It is normally in the same place as 32-bit init. +config X86_16BIT_INIT + bool + depends on X86_RESET_VECTOR + default y if X86_RESET_VECTOR && !SPL + help + This is enabled when 16-bit init is in U-Boot proper + +config SPL_X86_16BIT_INIT + bool + depends on X86_RESET_VECTOR + default y if X86_RESET_VECTOR && SPL + help + This is enabled when 16-bit init is in SPL + +config X86_32BIT_INIT + bool + depends on X86_RESET_VECTOR + default y if X86_RESET_VECTOR && !SPL + help + This is enabled when 32-bit init is in U-Boot proper + +config SPL_X86_32BIT_INIT + bool + depends on X86_RESET_VECTOR + default y if X86_RESET_VECTOR && SPL + help + This is enabled when 32-bit init is in SPL + config RESET_SEG_START hex depends on X86_RESET_VECTOR