From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5CA7C4338F for ; Sat, 31 Jul 2021 08:47:05 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4CEC661040 for ; Sat, 31 Jul 2021 08:47:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4CEC661040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06D288327D; Sat, 31 Jul 2021 10:46:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QbyoS2yd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8678983259; Sat, 31 Jul 2021 10:45:56 +0200 (CEST) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 BE25F82DD3 for ; Sat, 31 Jul 2021 10:45:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pl1-x630.google.com with SMTP id d1so13920783pll.1 for ; Sat, 31 Jul 2021 01:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BGFNKHAxC86w2evaInJ6Q2WQufqpCW4At88Z7xmaqyQ=; b=QbyoS2ydoPIRvPt5kXAkqRuXldcfTV40zoSngeNX9rd9tt7muUuWBWlSqQPDrQFige HTQDGsm6xSVE+1k7fQZZYXRlgO1c9h+688N8fTsoNIYWGELYtTBODSRS9mCiozRVv5In gFC7a8kCAXNQnw9d/jFwGAstBYgjocOue/PzQ11/QENocHovsAOBIiHHrjfttQ4jG8TY TMEq2HrCulyLnYt3HWf9FFcWWZD1wH94ZRsy5QGNBb5r+Hbb7UM9m/PoRCfYYZIN7NZI yURyEJ40P8ESxrIKfIOuqPkaF2KFwspSQhorL2A5pU3QthnveEaejLhsx6BbqKMHvFpD s3Tg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BGFNKHAxC86w2evaInJ6Q2WQufqpCW4At88Z7xmaqyQ=; b=JnNXXOdity5ebQLUvJKrH1TZbbTRkdsYMyCJjoo37qweJPDINcmqkdRs57niyyW+yZ ALBekFrSx0Be4f7gefXvEcNxnz8bbjUlhoq24yFilvdZJk0WwrHFsD6bS+5DyFttWNlF yMVHe79Mu43R8TfpTjgw5AjTIKnG+8fPTk5CvFqzsuX/9uJivFi1m+RMYhIVG7LyLRY2 G13wNbiKYJSazWRHzcuFsKf4C8EKy4JVXhsD4PE4JW14UqFMZg3mDNTk3UaeUhOgzY5B ggwD3jbSjVEYpzvXNvcLf/wm8bPdMO0Zqooi6MjBr7rTNmb0Qk2iW+/sZttbfBVwd4k1 pBcA== X-Gm-Message-State: AOAM530ww7z94oqDuT1YR659lIQxf5OgJXKy0hZmwxyHs5bXeiZuLwHm wxUdB49XS1MH4fhWLoviaX4= X-Google-Smtp-Source: ABdhPJysve2YkzF+MkHaWRJaB6POmupM12rE+89RBkNdGHHYvKAttXVjD8boBXQzJiuf8bE1HIFtgw== X-Received: by 2002:a17:90a:d308:: with SMTP id p8mr7425145pju.65.1627721150232; Sat, 31 Jul 2021 01:45:50 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id h6sm688355pfv.155.2021.07.31.01.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 01:45:49 -0700 (PDT) From: Bin Meng To: Simon Glass , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH 6/7] x86: cmd: hob: Fix display of resource type for system memory Date: Sat, 31 Jul 2021 16:45:28 +0800 Message-Id: <20210731084529.7524-7-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210731084529.7524-1-bmeng.cn@gmail.com> References: <20210731084529.7524-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The resource type for system memory is currently displayed as "unknown", which is wrong. Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng --- cmd/x86/hob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c index 71e7fcbd65..04d092dbe7 100644 --- a/cmd/x86/hob.c +++ b/cmd/x86/hob.c @@ -78,7 +78,7 @@ static void show_hob_details(const struct hob_header *hdr) const struct hob_res_desc *res = ptr; const char *typename; - typename = res->type > 0 && res->type <= RES_MAX_MEM_TYPE ? + typename = res->type >= RES_SYS_MEM && res->type <= RES_MAX_MEM_TYPE ? res_type[res->type] : "unknown"; printf(" base = %08llx, len = %08llx, end = %08llx, type = %d (%s)\n\n", -- 2.25.1