From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web10.4009.1670376405735744994 for ; Tue, 06 Dec 2022 17:26:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=Sr2dAYpf; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 8D569CD1F78A for ; Wed, 7 Dec 2022 09:26:43 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1670376403; bh=t5ZHU+bnlEozttbSw6+MSSfDmORkNSw9F+mz5d20IHo=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=Sr2dAYpfNmHGkqvcP4rczjjThf2DWffOiZjwfBKcDOky9laH2S0FmU71QqctEVKVX ICHgmMF9e7JG3M7gRGP/C2MfnNeHVauMpMqtln/xvs4MGc+ADDFEykRQmuBujKeXqn qn9cqNAnvvCetIlpXlhAyNAp9x7PXYPYc/cmkw2Q= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 89820CD1F7D7 for ; Wed, 7 Dec 2022 09:26:43 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 5B50FCD1F7CB for ; Wed, 7 Dec 2022 09:26:43 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id E7A66CD1F7DB for ; Wed, 7 Dec 2022 09:26:40 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 07 Dec 2022 09:26:38 +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: , Cc: "'Michael D Kinney'" , "'Ard Biesheuvel'" , "'Gerd Hoffman'" , "'Jiewen Yao'" References: <20221108211557.3306520-1-dionnaglaze@google.com> <20221108211557.3306520-5-dionnaglaze@google.com> In-Reply-To: <20221108211557.3306520-5-dionnaglaze@google.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYyIDQvNF0gTWRlUGtnOiBTaWduYWwgQWZ0ZXJSZWFkeVRvQm9vdCBhZnRlciBSZWFkeVRvQm9vdA==?= Date: Wed, 7 Dec 2022 09:26:39 +0800 Message-ID: <039e01d909da$f4f29780$ded7c680$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFQKysgEVSPWNVSGV6PRRg454Bf7QJohamer2Aa4wA= Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Dionna: I add my comments below.=20 > -----=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 Dionna Glaze > via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B411=E6=9C=889=E6=97=A5 = 5:16 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E6=8A=84=E9=80=81: Dionna Glaze ; Michael D Kinn= ey > ; Ard Biesheuvel ; Gerd > Hoffman ; Jiewen Yao > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH v2 4/4] MdePkg: Signal AfterReady= ToBoot after > ReadyToBoot >=20 > The Uefi v2.9 specification adds this event group in section 3.1.7, > with its GUID defined in the Related Definitions section of > EFI_BOOT_SERVICES.CreateEventEx() in chapter 7. >=20 > Cc: "Michael D Kinney" > Cc: Ard Biesheuvel > Cc: Gerd Hoffman > Cc: Jiewen Yao >=20 > Signed-off-by: Dionna Glaze > --- > MdePkg/Include/Library/UefiLib.h | 2 ++ > MdePkg/Library/UefiLib/UefiLib.inf | 1 + > MdePkg/Library/UefiLib/UefiNotTiano.c | 18 ++++++++++++++++++ > 3 files changed, 21 insertions(+) >=20 > diff --git a/MdePkg/Include/Library/UefiLib.h > b/MdePkg/Include/Library/UefiLib.h > index be7da7fdf7..2c3342351e 100644 > --- a/MdePkg/Include/Library/UefiLib.h > +++ b/MdePkg/Include/Library/UefiLib.h > @@ -890,6 +890,8 @@ UnicodeStringDisplayLength ( > /** > Create, Signal, and Close the Ready to Boot event using > EfiSignalEventReadyToBoot(). >=20 > + If successful, then create, signal and close the After Ready to Boot e= vent. > + > This function abstracts the signaling of the Ready to Boot Event. The > Framework moved > from a proprietary to UEFI 2.0 based mechanism. This library abstracts > the caller > from how this event is created to prevent to code form having to chang= e > with the > diff --git a/MdePkg/Library/UefiLib/UefiLib.inf > b/MdePkg/Library/UefiLib/UefiLib.inf > index 01ed92092d..5c4064eafa 100644 > --- a/MdePkg/Library/UefiLib/UefiLib.inf > +++ b/MdePkg/Library/UefiLib/UefiLib.inf > @@ -60,6 +60,7 @@ > gEfiGlobalVariableGuid ## > SOMETIMES_CONSUMES ## Variable > gEfiAcpi20TableGuid ## > SOMETIMES_CONSUMES ## SystemTable > gEfiAcpi10TableGuid ## > SOMETIMES_CONSUMES ## SystemTable > + gEfiEventAfterReadyToBootGuid ## > SOMETIMES_CONSUMES ## Event >=20 > [Protocols] > gEfiDriverBindingProtocolGuid ## > SOMETIMES_PRODUCES > diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c > b/MdePkg/Library/UefiLib/UefiNotTiano.c > index d84e91fd01..04fe42f9f7 100644 > --- a/MdePkg/Library/UefiLib/UefiNotTiano.c > +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c > @@ -208,6 +208,8 @@ EfiCreateEventReadyToBootEx ( > /** > Create, Signal, and Close the Ready to Boot event using > EfiSignalEventReadyToBoot(). >=20 > + If successful, then create, signal and close the After Ready to Boot e= vent. > + > This function abstracts the signaling of the Ready to Boot Event. The > Framework moved > from a proprietary to UEFI 2.0 based mechanism. This library abstracts > the caller > from how this event is created to prevent to code form having to chang= e > with the > @@ -222,11 +224,27 @@ EfiSignalEventReadyToBoot ( > { > EFI_STATUS Status; > EFI_EVENT ReadyToBootEvent; > + EFI_EVENT AfterReadyToBootEvent; >=20 > Status =3D EfiCreateEventReadyToBoot (&ReadyToBootEvent); > if (!EFI_ERROR (Status)) { > gBS->SignalEvent (ReadyToBootEvent); > gBS->CloseEvent (ReadyToBootEvent); > + return; > + } > + Return should not be here. This means ReadyToBoot event creates successfull= y and return. But, the behavior should be ReadyToBoot and AfterReadyToBoot event both tri= g. Thanks Liming > + /* Then immediately signal the after ready to boot event group */ > + Status =3D gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + EfiEventEmptyFunction, > + NULL, > + &gEfiEventAfterReadyToBootGuid, > + AfterReadyToBootEvent > + ); > + if (!EFI_ERROR(Status)) { > + gBS->SignalEvent (AfterReadyToBootEvent); > + gBS->CloseEvent (AfterReadyToBootEvent); > } > } >=20 > -- > 2.38.1.431.g37b22c650d-goog >=20 >=20 >=20 >=20 >=20