From patchwork Sun Jul 11 03:15:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1503615 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=oZZlzHyZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4GMsXy71kKz9sV8 for ; Sun, 11 Jul 2021 13:18:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3BE1A8335C; Sun, 11 Jul 2021 05:15:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oZZlzHyZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD4F583320; Sun, 11 Jul 2021 05:15:32 +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=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3792083320 for ; Sun, 11 Jul 2021 05:15:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32d.google.com with SMTP id 59-20020a9d0ac10000b0290462f0ab0800so14356288otq.11 for ; Sat, 10 Jul 2021 20:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tWst3khZ8sOnXNK1OJpKrrllOlS8FzuVyyot63iPfBU=; b=oZZlzHyZgFmdDLeLucTIqFaS9Y/DFYbwdnwo9jHnbOltBTW7VImvGIu61LNLpUnCPP Ga38fmpR53COyU7yQyHRQ3gMorkVJkyr+3m53//7EDF7kTjgcg/x9fQDt7abHVsBkyRL PSh5E6LnBQHdueHj36gScXM2sRuuEcseQGBnQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tWst3khZ8sOnXNK1OJpKrrllOlS8FzuVyyot63iPfBU=; b=X1m4BqId5W2dLkzimZNW7qXwE1O06ciMeaclpiO/3UBWdZFrW3zenuvQiCYFLAWCeN STI5OTpwsLYxq4INspqZCBoBwrPoQDjoiQrGn2ToPQFFnhQD4p7wXxQPd9OpJpryXkbh PE7z1sf4JyNR6vTFfkk24/wtxSig/z9APxTvqiQ9zqRV6kPTbdVYpMp9BYdHmMW2Pfyr uE2+dYlZpiO+4rWyodCLa7ejFoZvUIZUN7vJRDozaG3e4Kw4HnhDWTR9DWt3nA1/NvfL 69F+oyZ/luk89PObddGfMH/rV2FxrRUaz1AfoI8XBruxeguxxpsHd0WOjaiAgAHtTfvQ BFOA== X-Gm-Message-State: AOAM530NTU8kvqWjvWRDGwpZsfLVbgaVz/aOYF4UuQuqsDT1rwoWt73J KeMCX51rncW7wJWsME/VMjF4cMXPDxqZrw== X-Google-Smtp-Source: ABdhPJzi/sL+f9SZP1ACSSXGHNDhg9DLLDLyXLRusDPFtMR5ig1cto1HZ6RAIG7FIJyS36+wH9PPiA== X-Received: by 2002:a9d:7686:: with SMTP id j6mr34855954otl.232.1625973326653; Sat, 10 Jul 2021 20:15:26 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c25sm2244855otn.47.2021.07.10.20.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 20:15:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Christian Melki , Simon Glass , Bin Meng , Igor Opaniuk , Wolfgang Wallner Subject: [PATCH] x86: Ensure the e820 map is installed in all cases Date: Sat, 10 Jul 2021 21:15:21 -0600 Message-Id: <20210710211515.1.I245c034f736e5cb88039244d13f8e81ee9f26373@changeid> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.103.2 at phobos.denx.de X-Virus-Status: Clean This is a revert of a recent logic change in setup_zimage(). We do actually need to install this information always. Change it to install from the Coreboot tables if available, else the normal source. Fixes: e7bae8283fe ("x86: Allow installing an e820 when booting from coreboot") Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/zimage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 90fc8a466d7..cf4210cd4ba 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -313,12 +313,12 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, int bootproto = get_boot_protocol(hdr, false); log_debug("Setup E820 entries\n"); - if (ll_boot_init()) { - setup_base->e820_entries = install_e820_map( - ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); - } else if (IS_ENABLED(CONFIG_COREBOOT_SYSINFO)) { + if (IS_ENABLED(CONFIG_COREBOOT_SYSINFO)) { setup_base->e820_entries = cb_install_e820_map( ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); + } else { + setup_base->e820_entries = install_e820_map( + ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); } if (bootproto == 0x0100) {