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.3051.1615772184620989647 for ; Sun, 14 Mar 2021 18:36:25 -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 ; Mon, 15 Mar 2021 09:36:21 +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'" , "'Liu, Zhiguang'" , Cc: "'Dong, Eric'" , "'Desimone, Nathaniel L'" , "'Agyeman, Prince'" , "'Gao, Zhichao'" References: <20210310082014.700-1-zhiguang.liu@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbUGF0Y2ggZWRrMi1wbGF0Zm9ybXMgVjJdIEludGVsL0JvYXJkTW9kdWxlUGtnOiBzb3J0IGxvYWQgb3B0aW9uIGluIHRoZSBmaXJzdCBib290?= Date: Mon, 15 Mar 2021 09:36:20 +0800 Message-ID: <007c01d7193b$9a33a640$ce9af2c0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIPR0ZUBp40k1jf0D+G/eFoXLuHzwGFsEgWqge6iVA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Zhiguang: I see QuarkPlatformPkg uses PCD = gQuarkPlatformTokenSpaceGuid.PcdBootState to decide whether current boot is the first boot or not.=20 This PCD is configured as DynamicHiiPcd, and be set in Platform\Intel\QuarkPlatformPkg\Library\PlatformBootManagerLib\PlatformBo= otM anager.c Can you use the same solution in Intel BoardModulePkg? Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Ni, Ray > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA3=D4=C210=C8=D5 17:56 > =CA=D5=BC=FE=C8=CB: Liu, Zhiguang ; = devel@edk2.groups.io > =B3=AD=CB=CD: Dong, Eric ; Liming Gao > ; Desimone, Nathaniel L > ; Agyeman, Prince > ; Gao, Zhichao > =D6=F7=CC=E2: RE: [Patch edk2-platforms V2] Intel/BoardModulePkg: sort = load option > in the first boot >=20 > 1. DataSIze should be set to sizeof (BOOLEAN) before calling = GetVariable() >=20 > > + Status =3D gRT->GetVariable ( > > + L"IsFirstBoot", >=20 > 2. Can you please define a macro in this C file for IsFirstBoot = string? > e.g.: #define IS_FIRST_BOOT_VAR_NAME L"IsFirstBoot" >=20 > > + if (IsFirstBoot =3D=3D TRUE) { >=20 > 3. Please remove "=3D=3D TRUE". Just use "If (IsFirstBoot)". >=20 > > + L"IsFirstBoot", > 4. Please use the macro defined as above. >=20 > > > > + &gEfiCallerIdGuid, > > > > + EFI_VARIABLE_NON_VOLATILE | > > EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, >=20 > 5. Please remove "EFI_VARIABLE_RUNTIME_ACCESS". >=20 > > + 1, > 6. Please use sizeof (BOOLEAN) instead of "1".