From nobody Tue Feb 10 00:25:00 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=1601467249; cv=none; d=zohomail.com; s=zohoarc; b=nNBYXeOG0cstiQcmnhq9rrlnSvrP70kU/BiIx1DSia+bKGYEag4a31YqzsC3CfTlFaE+UCmFNYUnSD7sjfL76GERV2n34AsCkLYVIv03A8h5v2jc3QuGEperjnEtXqnB03m8fIEtnNSe2XoCHTj19+nr+3Wlb0Ig7J4pi+vrAwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601467249; 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=+NseZPbp2nGcHoZXp5Zeoihv1T7WphNog6hmUeRhFTI=; b=EBhd65DS2M5SmfXakXLnJGo3AVxvF1yBW5bMs0SB5TjOmdEMCFP8f7cOmRJc+7XS2xrT2RDO+7HpbS61oEF4Tjghx3rl+8eAseM+vrdDH1ZVmiGpAmyzadAbiuJ6er9Je8BmwXeBptE6TSl6sIzuhdLGfWGUsI2hSqvcSCPCwXo= 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 1601467249560105.04775863944099; Wed, 30 Sep 2020 05:00:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.627.2089 (Exim 4.92) (envelope-from ) id 1kNamd-0001fO-Lv; Wed, 30 Sep 2020 12:00:31 +0000 Received: by outflank-mailman (output) from mailman id 627.2089; Wed, 30 Sep 2020 12:00:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNamd-0001fG-IQ; Wed, 30 Sep 2020 12:00:31 +0000 Received: by outflank-mailman (input) for mailman id 627; Wed, 30 Sep 2020 12:00:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNamc-0001eL-4W for xen-devel@lists.xenproject.org; Wed, 30 Sep 2020 12:00:30 +0000 Received: from mx1a.swcp.com (unknown [216.184.2.64]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4aa224d5-133f-4b1e-b179-648e60b1d2d6; Wed, 30 Sep 2020 12:00:29 +0000 (UTC) Received: from ame8.swcp.com (ame8.swcp.com [216.184.2.163]) by mx1a.swcp.com (8.14.4/8.14.4/Debian-4) with ESMTP id 08UC0RMK005372; Wed, 30 Sep 2020 06:00:27 -0600 Received: from diamond.fritz.box (62-251-112-184.ip.xs4all.nl [62.251.112.184]) by ame8.swcp.com (8.15.2/8.15.2) with ESMTP id 08UC0BdD003035; Wed, 30 Sep 2020 06:00:23 -0600 (MDT) (envelope-from hudson@trmm.net) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNamc-0001eL-4W for xen-devel@lists.xenproject.org; Wed, 30 Sep 2020 12:00:30 +0000 Received: from mx1a.swcp.com (unknown [216.184.2.64]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4aa224d5-133f-4b1e-b179-648e60b1d2d6; Wed, 30 Sep 2020 12:00:29 +0000 (UTC) Received: from ame8.swcp.com (ame8.swcp.com [216.184.2.163]) by mx1a.swcp.com (8.14.4/8.14.4/Debian-4) with ESMTP id 08UC0RMK005372; Wed, 30 Sep 2020 06:00:27 -0600 Received: from diamond.fritz.box (62-251-112-184.ip.xs4all.nl [62.251.112.184]) by ame8.swcp.com (8.15.2/8.15.2) with ESMTP id 08UC0BdD003035; Wed, 30 Sep 2020 06:00:23 -0600 (MDT) (envelope-from hudson@trmm.net) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4aa224d5-133f-4b1e-b179-648e60b1d2d6 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 (ame8.swcp.com: 62.251.112.184 is neither permitted nor denied by domain of hudson@trmm.net) receiver=ame8.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: ame8.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 v8 2/5] efi/boot.c: add handle_file_info() Date: Wed, 30 Sep 2020 08:00:08 -0400 Message-Id: <20200930120011.1622924-3-hudson@trmm.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200930120011.1622924-1-hudson@trmm.net> References: <20200930120011.1622924-1-hudson@trmm.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.6.2 (ame8.swcp.com [216.184.2.128]); Wed, 30 Sep 2020 06:00:26 -0600 (MDT) X-Virus-Scanned: clamav-milter 0.99.2 at ame8 X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ame8.swcp.com X-Spam-Status: No, hits=0.7 tests=NO_RECEIVED,NO_RELAYS,SPF_NEUTRAL version=3.4.1 X-Spam-Level: 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 c2ce0c7294..93cfeba7e1 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -540,6 +540,22 @@ static char * __init split_string(char *s) return NULL; } =20 +static void __init handle_file_info(CHAR16 *name, + const struct file *file, const char *o= ptions) +{ + 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, const char *options) { @@ -584,16 +600,7 @@ static bool __init read_file(EFI_FILE_HANDLE dir_handl= e, CHAR16 *name, { file->need_to_free =3D true; 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->str); if ( !EFI_ERROR(ret) && file->size !=3D size ) --=20 2.25.1