From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.1773.1615950038289360231 for ; Tue, 16 Mar 2021 20:00:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 17 Mar 2021 11:00:35 +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" To: , , "'Ni, Ray'" Cc: "'Dong, Eric'" , "'Desimone, Nathaniel L'" , "'Agyeman, Prince'" , "'Gao, Zhichao'" References: <20210310082014.700-1-zhiguang.liu@intel.com> <007c01d7193b$9a33a640$ce9af2c0$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbUGF0Y2ggZWRrMi1wbGF0Zm9ybXMgVjJdIEludGVsL0JvYXJkTW9kdWxlUGtnOiBzb3J0IGxvYWQgb3B0aW9uIGluIHRoZSBmaXJzdCBib290?= Date: Wed, 17 Mar 2021 11:00:36 +0800 Message-ID: <00c501d71ad9$b43497d0$1c9dc770$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIPR0ZUBp40k1jf0D+G/eFoXLuHzwGFsEgWAYPu6eYCCBMXlqnulDdA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Zhiguang: This is the common platform usage. I suggest to apply the same solution.= My solution is to define this PCD PcdBootState in MdeModulePkg.dec, and ad= d MdeModule.dsc.inc file that defines this PCD as DynamicHii PCD, platform = DSC includes MdeModule.dsc.inc file, platform modules consume this PCD (set= /get).=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Zhiguang Liu > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B43=E6=9C=8816=E6=97=A5= 9:57 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com= .cn; Ni, Ray > > =E6=8A=84=E9=80=81: Dong, Eric ; Desimone, Nathanie= l L > ; Agyeman, Prince > ; Gao, Zhichao > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] =E5=9B=9E=E5=A4=8D: [Patch edk2-pla= tforms V2] > Intel/BoardModulePkg: sort load option in the first boot >=20 > Hi Liming, >=20 > Thanks for the comments. This patch is merged before this comment, but I= can > still send another patch to modify if needed. >=20 > However, I think the implement in this patch is more simple. > The implement in QuarkPlatformPkg need changes in inf, dec and dsc files= , > and is not as intuitive as just getting and setting a variable. > It may be simpler if the implements can reuse a same DynamicHiiPcd, do y= ou > think it is possible? > If I misunderstand anything, please correct me. >=20 > Thanks > Zhiguang >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of > > gaoliming > > Sent: Monday, March 15, 2021 9:36 AM > > To: Ni, Ray ; Liu, Zhiguang = ; > > devel@edk2.groups.io > > Cc: Dong, Eric ; Desimone, Nathaniel L > > ; Agyeman, Prince > > ; Gao, Zhichao > > Subject: [edk2-devel] =E5=9B=9E=E5=A4=8D: [Patch edk2-platforms V2] > > Intel/BoardModulePkg: sort load option in the first boot > > > > Zhiguang: > > I see QuarkPlatformPkg uses PCD > > gQuarkPlatformTokenSpaceGuid.PcdBootState > > to decide whether current boot is the first boot or not. > > This PCD is configured as DynamicHiiPcd, and be set in > > Platform\Intel\QuarkPlatformPkg\Library\PlatformBootManagerLib\Platfor > > mBootM > > anager.c > > > > Can you use the same solution in Intel BoardModulePkg? > > > > Thanks > > Liming > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Ni, Ray > > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B43=E6=9C=8810=E6= =97=A5 17:56 > > > =E6=94=B6=E4=BB=B6=E4=BA=BA: Liu, Zhiguang ;= devel@edk2.groups.io > > > =E6=8A=84=E9=80=81: Dong, Eric ; Liming Gao > > > ; Desimone, Nathaniel L > > > ; Agyeman, Prince > > > ; Gao, Zhichao > > > =E4=B8=BB=E9=A2=98: RE: [Patch edk2-platforms V2] Intel/BoardModuleP= kg: sort load > > > option in the first boot > > > > > > 1. DataSIze should be set to sizeof (BOOLEAN) before calling > > > GetVariable() > > > > > > > + Status =3D gRT->GetVariable ( > > > > + L"IsFirstBoot", > > > > > > 2. Can you please define a macro in this C file for IsFirstBoot stri= ng? > > > e.g.: #define IS_FIRST_BOOT_VAR_NAME L"IsFirstBoot" > > > > > > > + if (IsFirstBoot =3D=3D TRUE) { > > > > > > 3. Please remove "=3D=3D TRUE". Just use "If (IsFirstBoot)". > > > > > > > + L"IsFirstBoot", > > > 4. Please use the macro defined as above. > > > > > > > > > > > + &gEfiCallerIdGuid, > > > > > > > > + EFI_VARIABLE_NON_VOLATILE | > > > > EFI_VARIABLE_RUNTIME_ACCESS | > > EFI_VARIABLE_BOOTSERVICE_ACCESS, > > > > > > 5. Please remove "EFI_VARIABLE_RUNTIME_ACCESS". > > > > > > > + 1, > > > 6. Please use sizeof (BOOLEAN) instead of "1". > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20