From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3784FAC074E for ; Mon, 8 Jan 2024 01:06:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=PAN0ajuQXlcFHphR9Fk+JDxWMIy8Axn+H7MbIsoC3Xk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1704675974; v=1; b=V5APy18c7Z1BPKLLBLrFJ9db6us2WbNFTsSiLIlAB+b6PjITVwtnmgtmPPrQEQc0tYK/gTqc 3TyBE7Ioahs9kbMkS+dM+OdXDaF6pl3SDsdloAx3wfCnAOLrpsKSqfx5Fpo6IjPs1PuGMpiiGMS +guT+jDuVRKw6iIWTYN+w8dI= X-Received: by 127.0.0.2 with SMTP id 4LQ6YY7687511xfr8I41YnW8; Sun, 07 Jan 2024 17:06:14 -0800 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web10.29563.1704675973522183118 for ; Sun, 07 Jan 2024 17:06:13 -0800 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id AD732A32E10B for ; Mon, 8 Jan 2024 09:06:10 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 2682BA32E02D for ; Mon, 8 Jan 2024 09:06:10 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id 5A37EA32E078 for ; Mon, 8 Jan 2024 09:06:06 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Mon, 08 Jan 2024 09:06:01 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , Cc: "'Bob Feng'" , "'Yuwei Chen'" , "'Abner Chang'" , "'Eric Xing'" , "'Abdul Lateef Attar'" References: <20240102062711.180-1-igniculus.fu@amd.com> In-Reply-To: <20240102062711.180-1-igniculus.fu@amd.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBCYXNlVG9vbHMvR2VuRmRzOiBBcHBseSBPRU1fQ0FQU1VMRV9GTEFHUyBkdXJpbmcgQ2Fwc3VsZSBnZW5lcmF0aW9uLg==?= Date: Mon, 8 Jan 2024 09:06:03 +0800 Message-ID: <029301da41ce$da14de00$8e3e9a00$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQHhAwxopQAt+Xm/FmHsW5HYxAgQTbDBl5jQ Precedence: Bulk 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,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: be3DbbolaXKoqIp4vFqtZNvGx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=V5APy18c; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Igniculus.Fu > via groups.io > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA1=D4=C22=C8=D5 14:27 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Bob Feng ; Liming Gao > ; Yuwei Chen ; Abner > Chang ; Eric Xing ; Abdul > Lateef Attar > =D6=F7=CC=E2: [edk2-devel] [PATCH] BaseTools/GenFds: Apply OEM_CAPSULE_FL= AGS > during Capsule generation. >=20 > From: Igniculus Fu >=20 > Bugzilla ticket #4633 >=20 > FdfParser.py has defined a key named OEM_CAPSULE_FLAGS to set the > lower 16 bits of EFI_CAPSULE_HEADER.Flags. However, this key is totally > "forgotten" in Capsule.py, making it impossible to set lower 16 bits of > this field, and leading to an always FALSE when comparing to > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemRebootAfterCapsuleProcessFla > g > in MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c: > ProcessTheseCapsules(). >=20 > This patch ORs the value of OEM_CAPSULE_FLAGS with previously calculated > CAPSULE_FLAGS value, making the lower 16 bits of value being correctly set. >=20 > Signed-off-by: Igniculus Fu > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Cc: Abner Chang > Cc: Eric Xing > Cc: Abdul Lateef Attar >=20 > --- > BaseTools/Source/Python/GenFds/Capsule.py | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/BaseTools/Source/Python/GenFds/Capsule.py > b/BaseTools/Source/Python/GenFds/Capsule.py > index f4bfc74e55..d274d8f03e 100644 > --- a/BaseTools/Source/Python/GenFds/Capsule.py > +++ b/BaseTools/Source/Python/GenFds/Capsule.py > @@ -1,6 +1,7 @@ > ## @file > # generate capsule > # > +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
> # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -78,6 +79,8 @@ class Capsule (CapsuleClassObject): > Flags |=3D 0x00010000 > elif flag =3D=3D 'InitiateReset': > Flags |=3D 0x00040000 > + if 'OEM_CAPSULE_FLAGS' in self.TokensDict: > + Flags |=3D int(self.TokensDict['OEM_CAPSULE_FLAGS'],16) > Header.write(pack('=3DI', Flags)) > # > # typedef struct { > -- > 2.38.1.windows.1 >=20 >=20 >=20 >=20 >=20 -=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 (#113336): https://edk2.groups.io/g/devel/message/113336 Mute This Topic: https://groups.io/mt/103589200/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-