From nobody Sun May 19 15:58:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+93011+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+93011+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1661966442; cv=none; d=zohomail.com; s=zohoarc; b=fXplCtZiuTGMc3yCB3whY3oVQKBQOZ6u4ijex70/5PaoUbWFC4snZqbuI1IpcyEMCjRiivNmKIbmjsXLg7emkMHLSGVZgKhcHv0nnsyohy22X6cUjaLRMnEsHpWCIHpszYf4R0FX+wAVp6rfx6govGbWovK2Zc7D+QLmLUf5DJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661966442; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=1xMp/oGpfoMahNxxS3Dc0lNW1EJpy71TvlzFmPuleVA=; b=ZPrMw+rlv8kG+kLNkV7qDB14mpvP3MZfBrACam3frPvF76KJBSCxPoBiSBh8RUS1qsPTKkLOq4OEwNQ8mqgwszsYzVsMnJEdci2h7WXus1TeIlTP4mxoQrsCyg8wIfTPnSBxmQRzHcorUkztUWnDsZ2e0ImUMtiVkVexjVNWRlg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+93011+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1661966442351233.25785049187118; Wed, 31 Aug 2022 10:20:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MaipYY1788612xITHWTOCQa4; Wed, 31 Aug 2022 10:20:41 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.26409.1661956420718975261 for ; Wed, 31 Aug 2022 07:33:41 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 39D3EED1; Wed, 31 Aug 2022 07:33:46 -0700 (PDT) X-Received: from localhost.localdomain (X72Y076X74.nice.arm.com [10.34.129.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A1FFD3F71A; Wed, 31 Aug 2022 07:33:39 -0700 (PDT) From: =?UTF-8?B?VmluY2VudCBTdGVobMOp?= To: devel@edk2.groups.io Cc: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Subject: [edk2-devel] [PATCH] MdeModulePkg/CapsuleApp: support on-disk with undefined BootOrder Date: Wed, 31 Aug 2022 16:33:30 +0200 Message-Id: <0ab665d26ac83c9c566ede2cff2f0cfa03456907.1661955539.git.vincent.stehle@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vincent.stehle@arm.com X-Gm-Message-State: 3wqppDdqFLeQhUfr6EjdRHEpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1661966441; bh=4W1u+0Gu3QJxBBYZUBpyPRr69RhEPXfmA4LAgGh2VVI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=PHQdnjchz5VJ7RY4fJ6vEtor3Q4ahQayT6o1DPxI5XF4mFfjtC+RWSTkUB37/F+jmpZ FQHa7yqV0fjj4V/jVVs3Wd/veof7p92RVN6upbH7wJ3xaUFPFYEqq3WOnPo+EGjUToA8N pvoCe4g6CaQX4R1lIQy1c87eLykyeTxx/CM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1661966443243100003 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4038 When BootOrder is not defined, CapsuleApp.efi will not find a file system to store the capsule for on-disk update because GetUpdateFileSystem() will fail. BootOrder is an EFI Global Variable, which default state is firmware vendor specific. It is possible for BootOrder to not be defined as mentioned in the UEFI Specification in chapter 3.4.3, "Boot Option Variables Default Boot Behavior". Relax the check to allow that case. Signed-off-by: Vincent Stehl=C3=A9 --- Hi, This has passed CI with pull request https://github.com/tianocore/edk2/pull= /3263. Best regards, Vincent. MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModul= ePkg/Application/CapsuleApp/CapsuleOnDisk.c index 5ce5a50f7b..f04de00f65 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c @@ -456,10 +456,7 @@ GetUpdateFileSystem ( // 2. Get EFI system partition form boot options. // BootOptionBuffer =3D EfiBootManagerGetLoadOptions (&BootOptionCount, Loa= dOptionTypeBoot); - if ((BootOptionBuffer =3D=3D NULL) || - ((BootOptionCount =3D=3D 0) && (Map =3D=3D NULL)) - ) - { + if ((BootOptionBuffer !=3D NULL) && (BootOptionCount =3D=3D 0) && (Map = =3D=3D NULL)) { return EFI_NOT_FOUND; } =20 --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93011): https://edk2.groups.io/g/devel/message/93011 Mute This Topic: https://groups.io/mt/93376313/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-