From nobody Tue Feb 10 00:39:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=trmm.net ARC-Seal: i=1; a=rsa-sha256; t=1600084270; cv=none; d=zohomail.com; s=zohoarc; b=NaCi9oDTB1WzDHg55DshHGJD3CqKPda6acqD3vYBqyF5TwlVobyqAyxAJCsRYBy5YXED+Vl8kjG2CI+NAPBBhbgHv1925UYK48p88S4hgRShwMPrlAICMuwPkItMbfarzIssCS/56jWvQ1bR7GtyiYDJMaDDvF1pDmauttH5gB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600084270; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y6v2xnNfKE4EfNGIMHRfzWsqOlOBfQUh3uzyvfSKG8E=; b=mrYY3L+SI0Am5dZDuPzXlwv6/UVnLBmoLt+cfPaMTTWUqjGgJVZ/bL25yXJQc2kUNuaNA3msoe7XwGgALlTUEyAo0DlnSYwnwExlHT0pwpeSWaWgmx31mvZtQ5qCHTUSF+Dn8YOiXmnGjV98EJuOmtno3vIpm/ts+7DnjkoUCgk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1600084270221511.9599831751476; Mon, 14 Sep 2020 04:51:10 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHn0J-0005e1-QI; Mon, 14 Sep 2020 11:50:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHn0I-0005d7-3i for xen-devel@lists.xenproject.org; Mon, 14 Sep 2020 11:50:38 +0000 Received: from mx1a.swcp.com (unknown [216.184.2.64]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bf7b9aec-2a76-43a1-8ce6-0c4df9d21432; Mon, 14 Sep 2020 11:50:32 +0000 (UTC) Received: from ame7.swcp.com (ame7.swcp.com [216.184.2.70]) by mx1a.swcp.com (8.14.4/8.14.4/Debian-4) with ESMTP id 08EBoURs013968; Mon, 14 Sep 2020 05:50:31 -0600 Received: from diamond.fritz.box (62-251-112-184.ip.xs4all.nl [62.251.112.184]) by ame7.swcp.com (8.15.2/8.15.2) with ESMTP id 08EBoFiJ022702; Mon, 14 Sep 2020 05:50:28 -0600 (MDT) (envelope-from hudson@trmm.net) X-Inumbo-ID: bf7b9aec-2a76-43a1-8ce6-0c4df9d21432 Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: neutral (ame7.swcp.com: 62.251.112.184 is neither permitted nor denied by domain of hudson@trmm.net) receiver=ame7.swcp.com; client-ip=62.251.112.184; helo=diamond.fritz.box; envelope-from=hudson@trmm.net; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; X-Authentication-Warning: ame7.swcp.com: Host 62-251-112-184.ip.xs4all.nl [62.251.112.184] claimed to be diamond.fritz.box From: Trammell Hudson To: xen-devel@lists.xenproject.org Cc: roger.pau@citrix.com, jbeulich@suse.com, andrew.cooper3@citrix.com, wl@xen.org Subject: [PATCH v4 2/4] efi/boot.c: add handle_file_info() Date: Mon, 14 Sep 2020 07:50:11 -0400 Message-Id: <20200914115013.814079-3-hudson@trmm.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200914115013.814079-1-hudson@trmm.net> References: <20200914115013.814079-1-hudson@trmm.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.83 X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.6.2 (ame7.swcp.com [216.184.2.128]); Mon, 14 Sep 2020 05:50:29 -0600 (MDT) X-Virus-Scanned: clamav-milter 0.100.2 at ame7 X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ame7.swcp.com X-Spam-Status: No, hits=0.7 tests=NO_RECEIVED,NO_RELAYS,SPF_NEUTRAL version=3.4.2 X-Spam-Level: X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Add a separate function to display the address ranges used by the files and call `efi_arch_handle_module()` on the modules. Signed-off-by: Trammell Hudson Acked-by: Jan Beulich --- xen/common/efi/boot.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 7156139174..57df89cacb 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -539,6 +539,22 @@ static char * __init split_string(char *s) return NULL; } =20 +static void __init handle_file_info(CHAR16 *name, + struct file *file, char *options) +{ + if ( file =3D=3D &cfg ) + return; + + PrintStr(name); + PrintStr(L": "); + DisplayUint(file->addr, 2 * sizeof(file->addr)); + PrintStr(L"-"); + DisplayUint(file->addr + file->size, 2 * sizeof(file->addr)); + PrintStr(newline); + + efi_arch_handle_module(file, name, options); +} + static bool __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name, struct file *file, char *options) { @@ -583,16 +599,7 @@ static bool __init read_file(EFI_FILE_HANDLE dir_handl= e, CHAR16 *name, else { file->size =3D size; - if ( file !=3D &cfg ) - { - PrintStr(name); - PrintStr(L": "); - DisplayUint(file->addr, 2 * sizeof(file->addr)); - PrintStr(L"-"); - DisplayUint(file->addr + size, 2 * sizeof(file->addr)); - PrintStr(newline); - efi_arch_handle_module(file, name, options); - } + handle_file_info(name, file, options); =20 ret =3D FileHandle->Read(FileHandle, &file->size, file->ptr); if ( !EFI_ERROR(ret) && file->size !=3D size ) --=20 2.25.1