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.web09.2658.1606902119537193725 for ; Wed, 02 Dec 2020 01:42:00 -0800 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, 02 Dec 2020 17:41:49 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Ard Biesheuvel'" , "'Masahisa Kojima'" , "'edk2-devel-groups-io'" Cc: , , , "'Sami Mujawar'" , , "'Laszlo Ersek'" References: <26f3dd80-0cda-c592-2482-000beada4c91@arm.com> In-Reply-To: <26f3dd80-0cda-c592-2482-000beada4c91@arm.com> Subject: =?UTF-8?B?5Zue5aSNOiBWYXJpYWJsZVBvbGljeSBzdXBwb3J0IGluIFN0YW5kYWxvbmVNTQ==?= Date: Wed, 2 Dec 2020 17:41:53 +0800 Message-ID: <001f01d6c88f$5e394b60$1aabe220$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHsls0As8379aUODXdex35Nn2TS3QIhU7HmqablhZA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn I just quick check. VarCheckPolicyLib doesn't consume DxeServicesLib. = But, VarCheckPolicyLib library doesn't StandaloneMM type.=20 So, I think StandaloneMM version VarCheckPolicyLib is required.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Ard Biesheuvel > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2020=E5=B9=B412=E6=9C=882=E6=97=A5 17:02 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Masahisa Kojima = ; > edk2-devel-groups-io > =E6=8A=84=E9=80=81: Bret.Barkelew@microsoft.com; = jian.j.wang@intel.com; > hao.a.wu@intel.com; gaoliming@byosoft.com.cn; Sami Mujawar > ; jiewen.yao@intel.com; Laszlo Ersek > > =E4=B8=BB=E9=A2=98: Re: VariablePolicy support in StandaloneMM >=20 > (+ Laszlo) >=20 > On 12/2/20 9:57 AM, Masahisa Kojima wrote: > > Hello All, > > > > VariablePolicy was introduced in November. > > When Developerbox(aarch64 platform) boots with UEFI secure boot > enabled, > > the following error appears. > > Note that this platform supports UEFI secure boot using the = standalone > > MM framework. > > > > --- StandaloneMM log --- > > VariableLockRequestToLock - Failed to lock variable CapsuleMax! Not = Ready > > > > ASSERT_EFI_ERROR (Status =3D Not Ready) > > ASSERT [VariableStandaloneMm] > > > /home/ubuntu/src/uefi/edk2/MdeModulePkg/Universal/Variable/RuntimeDx > e/VariableLockRequestToLock.c(64): > > !EFI_ERROR (Status) > > MmEntryPoint Done > > --- > > > > In my check, this is simply because > > > = MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c::InitVariableP= oli > cyLib() > > is not called. > > > > InitVariablePolicyLib() is called from the following two files. > > --- > > MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c: > Status > > =3D InitVariablePolicyLib( VariableServiceGetVariable ); > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c: Status > =3D > > InitVariablePolicyLib (VariableServiceGetVariable); > > --- > > VariableDxe.c is not for MM_STANDALONE, so I tried to use > > "VarCheckPolicyLib" as VarCheckLib, > > but "VarCheckPolicyLib" requires > > DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf and > > DxeServicesLib.inf is not for MM_STANDALONE, I am stuck here. > > > > Could you please take a look at this error? > > >=20 > Thanks for the report. >=20 > Bret, could you please suggest a fix here?