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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 CA776C07E99 for ; Mon, 5 Jul 2021 15:56:34 +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 5725361166 for ; Mon, 5 Jul 2021 15:56:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5725361166 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19D5082C1D; Mon, 5 Jul 2021 17:56:22 +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="e7VUeHPc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCFFE82BC9; Mon, 5 Jul 2021 17:56:17 +0200 (CEST) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (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 47B4D82C18 for ; Mon, 5 Jul 2021 17:56:11 +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@google.com Received: by mail-oi1-x229.google.com with SMTP id 10so6452490oiq.9 for ; Mon, 05 Jul 2021 08:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8y+mHSn40sanfnH+QpY2Bsj/4nVOTsbr2ULxccfGnyc=; b=e7VUeHPcbmtd/t5BjGJWqWmuyvyusktS6XaaMj4a3W3+5U5RT64PYzPYu+K5smGHZw SWDWsh6FFhgcPZbFYuMpQip6T/8iQb7HGbl1Xft1Y+1YYSZifb7OsC36NzRHr4JX0tmW gdc0PE5LXNu2XRzEdaqebuViXuyuL6YkbvjrA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8y+mHSn40sanfnH+QpY2Bsj/4nVOTsbr2ULxccfGnyc=; b=fsLy1uEDL5HhzdV2Nih8IiztL128J9quC5+mGPhbO3gas7cwpXlBIElSIuKNMDJd70 ozK2gGNJ/lw+DlIxdpinxe5kVQis6UgbwnjMODR021SBJxa1hhckW+OsGLt9StA72A85 ItHobnthe5j+dKqGnvm6W0AkNsb680nDjQ2i3M0d68jQY6S1HG3DIg8AlRnebpjKXG09 WOT50moeX2Y+8saLCY1z7J1Tm3o1Pg3m1xwhr5isRTy5K6qrEyE7djJi8zOSGS/LpfHo ht02EUAyeVh9dSqmzN6G9JLNVsHGpAcNwndP3lcSIIMoa54bqLvf6oQs52+XIOLff7Rj 3QOQ== X-Gm-Message-State: AOAM531wWxWsSC2b40PDEtP7WG5dP9Y1ZMecKQRWertLXSZvghQBg3EJ ap1je6hp6izg2i3tVtixPsMYfc9rUr0tJ8IvAVbgWQ== X-Google-Smtp-Source: ABdhPJwuVLQ3Ofy/rfKPi0xChcZqRcui0tov0JrgWsLGqtDP+2l/H2UJpHHtuzqsbFRje48G6yxaP7AqnhdB+2dIWFU= X-Received: by 2002:aca:fc07:: with SMTP id a7mr474841oii.150.1625500569673; Mon, 05 Jul 2021 08:56:09 -0700 (PDT) MIME-Version: 1.0 References: <20210515160747.289642-1-xypron.glpk@gmx.de> In-Reply-To: <20210515160747.289642-1-xypron.glpk@gmx.de> From: Simon Glass Date: Mon, 5 Jul 2021 09:55:58 -0600 Message-ID: Subject: Re: [PATCH 1/1] smbios: error handling for invalid addresses To: Heinrich Schuchardt Cc: Bin Meng , Alexander Graf , Wolfgang Wallner , Christian Gmeiner , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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 Hi Heinrich, On Sat, 15 May 2021 at 10:08, Heinrich Schuchardt wrote: > > SMBIOS tables only support 32bit addresses. If we don't have memory here > handle the error gracefully: > > * on x86_64 fail to start U-Boot > * during UEFI booting ignore the missing table > > Signed-off-by: Heinrich Schuchardt > --- > arch/x86/lib/tables.c | 13 +++++++++++-- > lib/efi_loader/efi_smbios.c | 15 ++++++++------- > lib/smbios.c | 4 +++- > 3 files changed, 22 insertions(+), 10 deletions(-) Reviewed-by: Simon Glass nit below > > diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c > index 1779bb3e11..ea834a5035 100644 > --- a/arch/x86/lib/tables.c > +++ b/arch/x86/lib/tables.c > @@ -3,6 +3,8 @@ > * Copyright (C) 2015, Bin Meng > */ > > +#define LOG_CATEGORY LOGC_BOARD > + > #include > #include > #include > @@ -96,13 +98,20 @@ int write_tables(void) > return log_msg_ret("bloblist", -ENOBUFS); > } > rom_table_end = table->write(rom_table_start); > - rom_table_end = ALIGN(rom_table_end, ROM_TABLE_ALIGN); > + if (!rom_table_end) { > + log_err("Can't create configuration table %d\n", i); > + return -EINTR; I think the function comments needs an update for the new error. Regards ,Simon