From patchwork Wed Jan 30 03:59:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1033256 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Xgvxdp3k"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43q8zM6grFz9sBb for ; Wed, 30 Jan 2019 15:10:23 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 9D55BC21E16; Wed, 30 Jan 2019 04:03:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EDB10C21E45; Wed, 30 Jan 2019 04:01:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 00A33C21E36; Wed, 30 Jan 2019 04:01:01 +0000 (UTC) Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by lists.denx.de (Postfix) with ESMTPS id 4BEA7C21D8E for ; Wed, 30 Jan 2019 04:00:58 +0000 (UTC) Received: by mail-qt1-f198.google.com with SMTP id 42so27047509qtr.7 for ; Tue, 29 Jan 2019 20:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=oFP5ibkgsp2w3LQ1WOSGo+DcQZOM1/poGoxWaxAuhus=; b=Xgvxdp3kS0lWIAR+PA9OjZ7aVBgsdGCFZzkgaEwUsRxcaifNMNDaqtla6MLzI6pmcO mmZQMaoTvM488M294YT5616IT4kc1bJZi8eca5/x59F430UcEl9zrSo2BUK4MvLObu3F yfqv3yBMRGwNbg+zqcBfzV6eBWFFZNF1VOvsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=oFP5ibkgsp2w3LQ1WOSGo+DcQZOM1/poGoxWaxAuhus=; b=N9TLIe5LTjO/dKMsWyEwDi0ceckbla4LWtvjI2v78rWD0o1FeLVRy2lm9uXazRzW5d YTiTkj+JyeWBciQtNNg7F4NCbdsi3yxW7345je5POWcvdt/QCvfSnWoFqqQ58ZIsLNEA 4Iyh3DtNn9CVGPGOXb6oQLUy5cR9O7p68fmdW1VO9LsE2drvNme/olfmcov3rzekCQSr UThycSW/S4MSaTdvdIiRYugm4JLe9Q759rqkjUPYS5JPodMZa+/wiDsS3iiwT24SGlJe zxKCuux1aNKef3kXIuET39wBw1rAnJpErh1MN+w7rpWNXrQpZFEyrQNK6tuD5NDHeSoz X4kw== X-Gm-Message-State: AJcUukfrhUzv2xk9bvhL8I8Vl8dZl0n1uNT4IeQ8zwQULh+75WaT3vMY E6mCo19rONJsMZJeAjs0gAq+IlRdvi+A9NLZ X-Google-Smtp-Source: ALg8bN7pULAaeDiAS0s/z4rVFdJUjv3kJnaX3roGSX2SOqFWWTDM5tiB01Y35Iv+mhWQjAyHbrXLw8EqKdQMLSPQ X-Received: by 2002:ac8:25fc:: with SMTP id f57mr5195430qtf.12.1548820857439; Tue, 29 Jan 2019 20:00:57 -0800 (PST) Date: Tue, 29 Jan 2019 20:59:25 -0700 In-Reply-To: <20190130035935.235565-1-sjg@chromium.org> Message-Id: <20190130035935.235565-31-sjg@chromium.org> Mime-Version: 1.0 References: <20190130035935.235565-1-sjg@chromium.org> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog From: Simon Glass To: U-Boot Mailing List Subject: [U-Boot] [PATCH 30/40] x86: Don't set up MTRRs in SPL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The MTRRs are normally set up in U-Boot proper, so avoid setting them up in SPL as well. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/init_helpers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 0481f453ca..ac85278cdf 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -18,7 +18,10 @@ __weak ulong board_get_usable_ram_top(ulong total_size) int init_cache_f_r(void) { -#if CONFIG_IS_ENABLED(X86_32BIT_INIT) && !defined(CONFIG_HAVE_FSP) +#if (CONFIG_IS_ENABLED(X86_32BIT_INIT) || \ + (!defined(CONFIG_SPL_BUILD) && \ + !CONFIG_IS_ENABLED(CONFIG_X86_RUN_64BIT))) && \ + !defined(CONFIG_HAVE_FSP) int ret; ret = mtrr_commit(false);