Date   

回复: [PATCH] Maintainers.txt: Update maintainer/reviewer roles in MdeModulePkg

gaoliming
 

Reviewed-by: Liming Gao <gaoliming@...>

-----邮件原件-----
发件人: Hao A Wu <hao.a.wu@...>
发送时间: 2021年8月27日 16:02
收件人: devel@edk2.groups.io
抄送: Hao A Wu <hao.a.wu@...>; Jian J Wang
<jian.j.wang@...>; Liming Gao <gaoliming@...>; Guomin
Jiang <guomin.jiang@...>; Ray Ni <ray.ni@...>; Zhichao Gao
<zhichao.gao@...>
主题: [PATCH] Maintainers.txt: Update maintainer/reviewer roles in
MdeModulePkg

Remove Hao A Wu as the MdeModulePkg maintainer.
Add Liming Gao as the MdeModulePkg maintainer.
Remove Hao A Wu as the MdeModulePkg: Firmware Update modules
reviewer.
Remove Hao A Wu as the MdeModulePkg: Serial modules reviewer.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Liming Gao <gaoliming@...>
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Ray Ni <ray.ni@...>
Cc: Zhichao Gao <zhichao.gao@...>
Signed-off-by: Hao A Wu <hao.a.wu@...>
---
Maintainers.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index cd2f555750..5f53ea93ad 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -225,7 +225,7 @@ MdeModulePkg
F: MdeModulePkg/

W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg

M: Jian J Wang <jian.j.wang@...> [jwang36]

-M: Hao A Wu <hao.a.wu@...> [hwu25]

+M: Liming Gao <gaoliming@...> [lgao4]



MdeModulePkg: ACPI modules

F: MdeModulePkg/Include/*Acpi*.h

@@ -332,7 +332,6 @@ F:
MdeModulePkg/Include/Protocol/FirmwareManagementProgress.h
F: MdeModulePkg/Library/DisplayUpdateProgressLib*/

F: MdeModulePkg/Library/FmpAuthenticationLibNull/

F: MdeModulePkg/Universal/Esrt*/

-R: Hao A Wu <hao.a.wu@...> [hwu25]

R: Liming Gao <gaoliming@...> [lgao4]

R: Guomin Jiang <guomin.jiang@...> [guominjia]



@@ -378,7 +377,6 @@ R: Ray Ni <ray.ni@...> [niruiyu]
MdeModulePkg: Serial modules

F: MdeModulePkg/*Serial*/

F: MdeModulePkg/Include/*SerialPort*.h

-R: Hao A Wu <hao.a.wu@...> [hwu25]

R: Ray Ni <ray.ni@...> [niruiyu]

R: Zhichao Gao <zhichao.gao@...> [ZhichaoGao]



--
2.27.0.windows.1


Re: [edk2-platforms] [PATCH V1] TigerlakeOpenBoardPkg: Remove inaccurate comment

Heng Luo
 

Reviewed-by: Heng Luo <heng.luo@...>

-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@...>
Sent: Sunday, August 29, 2021 9:19 AM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@...>; Luo, Heng
<heng.luo@...>
Subject: [edk2-platforms] [PATCH V1] TigerlakeOpenBoardPkg: Remove
inaccurate comment

A comment in OpenBoardPkgPcd.dsc states that FSP dispatch mode is not
supported, which is inaccurate.

Cc: Sai Chaganty <rangasai.v.chaganty@...>
Cc: Heng Luo <heng.luo@...>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@...>
---
.../TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc | 1 -
1 file changed, 1 deletion(-)

diff --git
a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
index a048efcc18..ebbbc7b9f9 100644
---
a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
+++
b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd
+++ .dsc
@@ -30,7 +30,6 @@
#
# 0: FSP Wrapper is running in Dispatch mode.
# 1: FSP Wrapper is running in API mode.
- # Note: Dispatch mode is currently NOT supported for this board.
#
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0

--
2.27.0.windows.1


Re: [edk2-platforms] [PATCH V1] TigerlakeOpenBoardPkg: Remove inaccurate comment

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@...>

-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@...>
Sent: Saturday, August 28, 2021 6:19 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@...>; Luo, Heng <heng.luo@...>
Subject: [edk2-platforms] [PATCH V1] TigerlakeOpenBoardPkg: Remove inaccurate comment

A comment in OpenBoardPkgPcd.dsc states that FSP dispatch mode is not supported, which is inaccurate.

Cc: Sai Chaganty <rangasai.v.chaganty@...>
Cc: Heng Luo <heng.luo@...>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@...>
---
.../TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc | 1 -
1 file changed, 1 deletion(-)

diff --git a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
index a048efcc18..ebbbc7b9f9 100644
--- a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd
+++ .dsc
@@ -30,7 +30,6 @@
#
# 0: FSP Wrapper is running in Dispatch mode.
# 1: FSP Wrapper is running in API mode.
- # Note: Dispatch mode is currently NOT supported for this board.
#
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0

--
2.27.0.windows.1


Re: [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check

Nate DeSimone
 

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron
Sent: Saturday, August 28, 2021 12:42 PM
To: devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@...>; Liming Gao <gaoliming@...>; Desimone, Nathaniel L <nathaniel.l.desimone@...>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check

If CreateFvBootOption() fails, RegisterFvBootOption() will return LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the check when attempting to register hotkeys, to be able to detect if UiApp is not present.

Cc: Eric Dong <eric.dong@...>
Cc: Liming Gao <gaoliming@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
index a07abb214913..1fd0de3961cc 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOpt
+++ ion.c
@@ -440,7 +440,7 @@ RegisterStaticHotkey (
// // [F2]/[F7] //- if (mSetupOptionNumber) {+ if (mSetupOptionNumber != LoadOptionNumberUnassigned) { F2.Key.ScanCode = SCAN_F2; F2.Key.UnicodeChar = CHAR_NULL; F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;--
2.31.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79914): https://edk2.groups.io/g/devel/message/79914
Mute This Topic: https://groups.io/mt/85215635/1767664
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@...] -=-=-=-=-=-=


Event: TianoCore Design Meeting - APAC/NAMO - 09/03/2021 #cal-reminder

devel@edk2.groups.io Calendar <noreply@...>
 

Reminder: TianoCore Design Meeting - APAC/NAMO

When:
09/03/2021
9:30am to 10:30am
(UTC+08:00) Asia/Shanghai

Where:
Microsoft Teams

Organizer: Ray Ni ray.ni@...

View Event

Description:

TOPIC

  1. NA

For more info, see here: https://www.tianocore.org/design-meeting/


Microsoft Teams meeting

Join on your computer or mobile app

Click here to join the meeting

Join with a video conferencing device

teams@...

Video Conference ID: 119 715 416 0

Alternate VTC dialing instructions

Learn More | Meeting options


Re: [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check

Nate DeSimone
 

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron
Sent: Saturday, August 28, 2021 12:42 PM
To: devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@...>; Liming Gao <gaoliming@...>; Desimone, Nathaniel L <nathaniel.l.desimone@...>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check

If CreateFvBootOption() fails, RegisterFvBootOption() will return LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the check when attempting to register hotkeys, to be able to detect if UiApp is not present.

Cc: Eric Dong <eric.dong@...>
Cc: Liming Gao <gaoliming@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
index a07abb214913..1fd0de3961cc 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOpt
+++ ion.c
@@ -440,7 +440,7 @@ RegisterStaticHotkey (
// // [F2]/[F7] //- if (mSetupOptionNumber) {+ if (mSetupOptionNumber != LoadOptionNumberUnassigned) { F2.Key.ScanCode = SCAN_F2; F2.Key.UnicodeChar = CHAR_NULL; F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;--
2.31.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79914): https://edk2.groups.io/g/devel/message/79914
Mute This Topic: https://groups.io/mt/85215635/1767664
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@...] -=-=-=-=-=-=


[edk2-platforms] [PATCH V1] TigerlakeOpenBoardPkg: Remove inaccurate comment

Nate DeSimone
 

A comment in OpenBoardPkgPcd.dsc states that FSP
dispatch mode is not supported, which is inaccurate.

Cc: Sai Chaganty <rangasai.v.chaganty@...>
Cc: Heng Luo <heng.luo@...>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@...>
---
.../TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc | 1 -
1 file changed, 1 deletion(-)

diff --git a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
index a048efcc18..ebbbc7b9f9 100644
--- a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkgPcd.dsc
@@ -30,7 +30,6 @@
#
# 0: FSP Wrapper is running in Dispatch mode.
# 1: FSP Wrapper is running in API mode.
- # Note: Dispatch mode is currently NOT supported for this board.
#
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0

--
2.27.0.windows.1


Re: [edk2-platforms][PATCH v1 1/4] KabylakeOpenBoardPkg/Acpi: BoardAcpiDxe also installs all PcdAcpiTableStorageFile

Benjamin Doron
 

Hi Nate,
Thanks for the feedback on this patchset, I've addressed it in V2.


[edk2-platforms][PATCH v2 4/4] WhiskeylakeOpenBoardPkg/Acpi: BoardAcpiDxe also installs all PcdAcpiTableStorageFile

Benjamin Doron
 

Follow AcpiPlatformDxe (from which this module is derived) and install
all ACPI tables added by board.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c =
| 15 ++++++++++++++-
Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf =
| 2 ++
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/Board=
AcpiDxe.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardA=
cpiDxe.c
index cb5f328a3909..c8c1e0cc2cf2 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe=
.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe=
.c
@@ -270,7 +270,20 @@ InstallAcpiBoard (
//=0D
// Platform ACPI Tables=0D
//=0D
- PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ Status =3D PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((DEBUG_ERROR, "Error: PublishAcpiTablesFromFv[%g] - %r", &gEfiC=
allerIdGuid, Status));=0D
+ }=0D
+ Status =3D PublishAcpiTablesFromFv (PcdGetPtr (PcdAcpiTableStorageFile))=
;=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((=0D
+ DEBUG_ERROR,=0D
+ "Error: PublishAcpiTablesFromFv[%g] - %r",=0D
+ PcdGetPtr (PcdAcpiTableStorageFile),=0D
+ Status=0D
+ ));=0D
+ DEBUG ((DEBUG_INFO, "Does board contain ACPI tables?\n"));=0D
+ }=0D
=0D
//=0D
// This protocol publish must be done after PublishAcpiTablesFromFv.=0D
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/Board=
AcpiDxe.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/Boar=
dAcpiDxe.inf
index af5c8f1c0609..f17fb588ddb8 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe=
.inf
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe=
.inf
@@ -60,6 +60,8 @@
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDisablePassiveTripPoints=0D
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDisableCriticalTripPoints=0D
=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile=0D
+=0D
[Depex]=0D
gEfiAcpiTableProtocolGuid AND=0D
gEfiFirmwareVolume2ProtocolGuid AND=0D
--=20
2.31.1


[edk2-platforms][PATCH v2 3/4] MinPlatformPkg/Acpi: MinDsdt also installs all PcdAcpiTableStorageFile

Benjamin Doron
 

Follow AcpiPlatformDxe (from which this module is derived) and install
all ACPI tables added by board.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Liming Gao <gaoliming@...>
Cc: Eric Dong <eric.dong@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c | 10 ++++++++++
Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.inf | 3 +++
2 files changed, 13 insertions(+)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c b/Platfor=
m/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
index 9bc222453857..ac343afca7d4 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
@@ -227,6 +227,16 @@ InstallMinDsdt (
=0D
Status =3D PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
ASSERT_EFI_ERROR (Status);=0D
+ Status =3D PublishAcpiTablesFromFv (PcdGetPtr (PcdAcpiTableStorageFile))=
;=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((=0D
+ DEBUG_ERROR,=0D
+ "Error: PublishAcpiTablesFromFv[%g] - %r",=0D
+ PcdGetPtr (PcdAcpiTableStorageFile),=0D
+ Status=0D
+ ));=0D
+ DEBUG ((DEBUG_INFO, "Does board contain ACPI tables?\n"));=0D
+ }=0D
=0D
return EFI_SUCCESS;=0D
}=0D
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.inf b/Platf=
orm/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.inf
index 3437bc489cd3..dc32186eb361 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.inf
+++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.inf
@@ -21,6 +21,7 @@
=0D
[Packages]=0D
MdePkg/MdePkg.dec=0D
+ MdeModulePkg/MdeModulePkg.dec=0D
MinPlatformPkg/MinPlatformPkg.dec=0D
=0D
[LibraryClasses]=0D
@@ -41,6 +42,8 @@
gMinPlatformPkgTokenSpaceGuid.PcdPciReservedMemBase=0D
gMinPlatformPkgTokenSpaceGuid.PcdPciReservedMemLimit=0D
=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile=0D
+=0D
[Depex]=0D
gEfiAcpiTableProtocolGuid AND=0D
gEfiFirmwareVolume2ProtocolGuid=0D
--=20
2.31.1


[edk2-platforms][PATCH v2 2/4] CometlakeOpenBoardPkg/Acpi: BoardAcpiDxe also installs all PcdAcpiTableStorageFile

Benjamin Doron
 

Follow AcpiPlatformDxe (from which this module is derived) and install
all ACPI tables added by board.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@...>
Cc: Deepika Kethi Reddy <deepika.kethi.reddy@...>
Cc: Kathappan Esakkithevar <kathappan.esakkithevar@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c | =
15 ++++++++++++++-
Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf | =
2 ++
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAc=
piDxe.c b/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiD=
xe.c
index 7fc71bca644a..ba59c84fd4ba 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c
+++ b/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c
@@ -270,7 +270,20 @@ InstallAcpiBoard (
//=0D
// Platform ACPI Tables=0D
//=0D
- PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ Status =3D PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((DEBUG_ERROR, "Error: PublishAcpiTablesFromFv[%g] - %r", &gEfiC=
allerIdGuid, Status));=0D
+ }=0D
+ Status =3D PublishAcpiTablesFromFv (PcdGetPtr (PcdAcpiTableStorageFile))=
;=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((=0D
+ DEBUG_ERROR,=0D
+ "Error: PublishAcpiTablesFromFv[%g] - %r",=0D
+ PcdGetPtr (PcdAcpiTableStorageFile),=0D
+ Status=0D
+ ));=0D
+ DEBUG ((DEBUG_INFO, "Does board contain ACPI tables?\n"));=0D
+ }=0D
=0D
//=0D
// This protocol publish must be done after PublishAcpiTablesFromFv.=0D
diff --git a/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAc=
piDxe.inf b/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcp=
iDxe.inf
index 09b67376fbc1..e201964a6896 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.i=
nf
+++ b/Platform/Intel/CometlakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.i=
nf
@@ -62,6 +62,8 @@
gMinPlatformPkgTokenSpaceGuid.PcdPciReservedMemBase=0D
gMinPlatformPkgTokenSpaceGuid.PcdPciReservedMemLimit=0D
=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile=0D
+=0D
[Depex]=0D
gEfiAcpiTableProtocolGuid AND=0D
gEfiFirmwareVolume2ProtocolGuid AND=0D
--=20
2.31.1


[edk2-platforms][PATCH v2 1/4] KabylakeOpenBoardPkg/Acpi: BoardAcpiDxe also installs all PcdAcpiTableStorageFile

Benjamin Doron
 

Follow AcpiPlatformDxe (from which this module is derived) and install
all ACPI tables added by board.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c | 1=
5 ++++++++++++++-
Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf | =
2 ++
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcp=
iDxe.c b/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe=
.c
index 0361ffc2fbf9..c6df1714af9a 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.c
@@ -288,7 +288,20 @@ InstallAcpiBoard (
//=0D
// Platform ACPI Tables=0D
//=0D
- PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ Status =3D PublishAcpiTablesFromFv (&gEfiCallerIdGuid);=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((DEBUG_ERROR, "Error: PublishAcpiTablesFromFv[%g] - %r", &gEfiC=
allerIdGuid, Status));=0D
+ }=0D
+ Status =3D PublishAcpiTablesFromFv (PcdGetPtr (PcdAcpiTableStorageFile))=
;=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((=0D
+ DEBUG_ERROR,=0D
+ "Error: PublishAcpiTablesFromFv[%g] - %r",=0D
+ PcdGetPtr (PcdAcpiTableStorageFile),=0D
+ Status=0D
+ ));=0D
+ DEBUG ((DEBUG_INFO, "Does board contain ACPI tables?\n"));=0D
+ }=0D
=0D
//=0D
// This protocol publish must be done after PublishAcpiTablesFromFv.=0D
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcp=
iDxe.inf b/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiD=
xe.inf
index 5d3d4c3a2b33..7b400cf967f3 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf
@@ -67,6 +67,8 @@
gKabylakeOpenBoardPkgTokenSpaceGuid.PcdDisablePassiveTripPoints=0D
gKabylakeOpenBoardPkgTokenSpaceGuid.PcdDisableCriticalTripPoints=0D
=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile=0D
+=0D
[Depex]=0D
gEfiAcpiTableProtocolGuid AND=0D
gEfiFirmwareVolume2ProtocolGuid AND=0D
--=20
2.31.1


[edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check

Benjamin Doron
 

If CreateFvBootOption() fails, RegisterFvBootOption() will return
LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the
check when attempting to register hotkeys, to be able to detect if UiApp
is not present.

Cc: Eric Dong <eric.dong@...>
Cc: Liming Gao <gaoliming@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Benjamin Doron <benjamin.doron00@...>
---
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | =
2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBoo=
tOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBoot=
Option.c
index a07abb214913..1fd0de3961cc 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption=
.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption=
.c
@@ -440,7 +440,7 @@ RegisterStaticHotkey (
//=0D
// [F2]/[F7]=0D
//=0D
- if (mSetupOptionNumber) {=0D
+ if (mSetupOptionNumber !=3D LoadOptionNumberUnassigned) {=0D
F2.Key.ScanCode =3D SCAN_F2;=0D
F2.Key.UnicodeChar =3D CHAR_NULL;=0D
F2.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID;=0D
--=20
2.31.1


[edk2-platforms] [BUG] Some Features/Intel PCDs include all the duplicate modules

Benjamin Doron
 

Hi all,
As I noted in a previous patch, there is a bug in AcpiDebugFeaturePkg where if both the DXE and SMM modules are included, two ACPI tables will be installed with colliding definitions. The default case when enabling the feature is to include both versions.

I have a patch to retrieve the DXE instance's buffer into the SMM module for the SW SMI to use, but this doesn't work yet as gEfiSmmEndOfDxeProtocolGuid executes before gEfiEndOfDxeEventGroupGuid, so the buffer has not yet been allocated. However, it seems as though these modules may be designed to work independently: the DXE version works now that there aren't duplicate ACPI tables. Perhaps the SMM version also worked originally.

There is a similar issue in UserAuthFeaturePkg, where UserAuthenticationDxe and UserAuthentication2Dxe seem to largely perform the same functions (but I may not have looked closely enough), but UserAuthentication2Dxe uses UserPasswordLib rather than UserAuthenticationDxePassword.c. Again, both modules are included by default when the PCD is enabled, and the result is that two forms are installed into UiApp.

Are AcpiDebugDxe/AcpiDebugSmm and UserAuthenticationDxe/UserAuthentication2Dxe supposed to be used separately? If so, should I submit a patch to enable only one version being included by *Pkg/Include/*.fdf?

Regards,
Benjamin


Re: [PATCH] SecurityPkg/Tcg: remove TcgMorLockSmm driver

Qi Zhang
 

I created a new PR and pass CI.

https://github.com/tianocore/edk2/pull/1924

Thanks!
Qi Zhang

-----Original Message-----
From: Yao, Jiewen <jiewen.yao@...>
Sent: Friday, August 27, 2021 9:44 PM
To: Zhang, Qi1 <qi1.zhang@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Kumar, Rahul1
<rahul1.kumar@...>; Ni, Ray <ray.ni@...>
Subject: RE: [PATCH] SecurityPkg/Tcg: remove TcgMorLockSmm driver

Hi
This patch failed in CI - https://github.com/tianocore/edk2/pull/1922

Please take a look and submit patch again.

-----Original Message-----
From: Zhang, Qi1 <qi1.zhang@...>
Sent: Tuesday, August 24, 2021 10:28 AM
To: devel@edk2.groups.io
Cc: Zhang, Qi1 <qi1.zhang@...>; Yao, Jiewen
<jiewen.yao@...>; Wang, Jian J <jian.j.wang@...>; Kumar,
Rahul1 <rahul1.kumar@...>; Ni, Ray <ray.ni@...>
Subject: [PATCH] SecurityPkg/Tcg: remove TcgMorLockSmm driver

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3583

TcgMorLockSmm is only for secure MOR V1.
VariableSmm covers secure MOR V1 and V2.

Signed-off-by: Qi Zhang <qi1.zhang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Qi Zhang <qi1.zhang@...>
Cc: Rahul Kumar <rahul1.kumar@...>
Cc: Ray Ni <ray.ni@...>
---
SecurityPkg/SecurityPkg.dsc | 1 -
.../TcgMorLock.c | 191 ------------------
.../TcgMorLock.h | 131 ------------
.../TcgMorLock.uni | 16 --
.../TcgMorLockExtra.uni | 14 --
.../TcgMorLockSmm.c | 152 --------------
.../TcgMorLockSmm.inf | 65 ------
7 files changed, 570 deletions(-)
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockExtra.uni
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c
delete mode 100644
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf

diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index 64157e20f9..7898fe4282 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -338,7 +338,6 @@


[Components.IA32, Components.X64]



-
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf

SecurityPkg/Tcg/TcgSmm/TcgSmm.inf

SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf

SecurityPkg/Tcg/Tcg2Smm/Tcg2StandaloneMm.inf

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
deleted file mode 100644
index aa230eeefa..0000000000
--- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/** @file

- TCG MOR (Memory Overwrite Request) Lock Control Driver.

-

- This driver initializes MemoryOverwriteRequestControlLock variable.

- This module will add Variable Hook and allow
MemoryOverwriteRequestControlLock variable set only once.

-

-Copyright (c) 2015 - 2018, Intel Corporation. All rights
reserved.<BR>

-SPDX-License-Identifier: BSD-2-Clause-Patent

-

-**/

-

-#include <PiDxe.h>

-#include <Guid/MemoryOverwriteControl.h>

-#include <IndustryStandard/MemoryOverwriteRequestControlLock.h>

-#include <Library/DebugLib.h>

-#include <Library/BaseLib.h>

-#include <Library/BaseMemoryLib.h>

-#include "TcgMorLock.h"

-

-typedef struct {

- CHAR16 *VariableName;

- EFI_GUID *VendorGuid;

-} VARIABLE_TYPE;

-

-VARIABLE_TYPE mMorVariableType[] = {

- {MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME,
&gEfiMemoryOverwriteControlDataGuid},

- {MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME,
&gEfiMemoryOverwriteRequestControlLockGuid},

-};

-

-/**

- Returns if this is MOR related variable.

-

- @param VariableName the name of the vendor's variable, it's a
Null- Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

-

- @retval TRUE The variable is MOR related.

- @retval FALSE The variable is NOT MOR related.

-**/

-BOOLEAN

-IsAnyMorVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid

- )

-{

- UINTN Index;

-

- for (Index = 0; Index <
sizeof(mMorVariableType)/sizeof(mMorVariableType[0]); Index++) {

- if ((StrCmp (VariableName, mMorVariableType[Index].VariableName)
== 0)
&&

- (CompareGuid (VendorGuid, mMorVariableType[Index].VendorGuid)))
{

- return TRUE;

- }

- }

- return FALSE;

-}

-

-/**

- Returns if this is MOR lock variable.

-

- @param VariableName the name of the vendor's variable, it's a
Null- Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

-

- @retval TRUE The variable is MOR lock variable.

- @retval FALSE The variable is NOT MOR lock variable.

-**/

-BOOLEAN

-IsMorLockVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid

- )

-{

- if ((StrCmp (VariableName,
MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME) == 0) &&

- (CompareGuid (VendorGuid,
&gEfiMemoryOverwriteRequestControlLockGuid))) {

- return TRUE;

- }

- return FALSE;

-}

-

-/**

- This service is a checker handler for the UEFI Runtime Service
SetVariable()

-

- @param VariableName the name of the vendor's variable, as a

- Null-Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize The size in bytes of Data-Buffer.

- @param Data Point to the content of the variable.

-

- @retval EFI_SUCCESS The firmware has successfully stored the
variable
and its data as

- defined by the Attributes.

- @retval EFI_INVALID_PARAMETER An invalid combination of attribute
bits was supplied, or the

- DataSize exceeds the maximum allowed.

- @retval EFI_INVALID_PARAMETER VariableName is an empty Unicode
string.

- @retval EFI_OUT_OF_RESOURCES Not enough storage is available to
hold
the variable and its data.

- @retval EFI_DEVICE_ERROR The variable could not be saved due to a
hardware failure.

- @retval EFI_WRITE_PROTECTED The variable in question is read-only.

- @retval EFI_WRITE_PROTECTED The variable in question cannot be
deleted.

- @retval EFI_SECURITY_VIOLATION The variable could not be written
due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS

- set but the AuthInfo does NOT pass the validation check
carried

- out by the firmware.

- @retval EFI_NOT_FOUND The variable trying to be updated or
deleted
was not found.

-

-**/

-EFI_STATUS

-EFIAPI

-SetVariableCheckHandlerMor (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- IN UINT32 Attributes,

- IN UINTN DataSize,

- IN VOID *Data

- )

-{

- UINTN MorLockDataSize;

- BOOLEAN MorLock;

- EFI_STATUS Status;

-

- //

- // do not handle non-MOR variable

- //

- if (!IsAnyMorVariable (VariableName, VendorGuid)) {

- return EFI_SUCCESS;

- }

-

- MorLockDataSize = sizeof(MorLock);

- Status = InternalGetVariable (

- MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME,

- &gEfiMemoryOverwriteRequestControlLockGuid,

- NULL,

- &MorLockDataSize,

- &MorLock

- );

- if (!EFI_ERROR (Status) && MorLock) {

- //

- // If lock, deny access

- //

- return EFI_INVALID_PARAMETER;

- }

-

- //

- // Delete not OK

- //

- if ((DataSize != sizeof(UINT8)) || (Data == NULL) || (Attributes ==
0)) {

- return EFI_INVALID_PARAMETER;

- }

-

- //

- // check format

- //

- if (IsMorLockVariable(VariableName, VendorGuid)) {

- //

- // set to any other value not OK

- //

- if ((*(UINT8 *)Data != 1) && (*(UINT8 *)Data != 0)) {

- return EFI_INVALID_PARAMETER;

- }

- }

- //

- // Or grant access

- //

- return EFI_SUCCESS;

-}

-

-/**

- Entry Point for MOR Lock Control driver.

-

- @param[in] ImageHandle Image handle of this driver.

- @param[in] SystemTable A Pointer to the EFI System Table.

-

- @retval EFI_SUCCESS

- @return Others Some error occurs.

-**/

-EFI_STATUS

-EFIAPI

-MorLockDriverInit (

- VOID

- )

-{

- EFI_STATUS Status;

- UINT8 Data;

-

- Data = 0;

- Status = InternalSetVariable (

- MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME,

- &gEfiMemoryOverwriteRequestControlLockGuid,

- EFI_VARIABLE_NON_VOLATILE |
EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS,

- 1,

- &Data

- );

- return Status;

-}

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h
deleted file mode 100644
index 5a6658c158..0000000000
--- a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/** @file

- TCG MOR (Memory Overwrite Request) Lock Control Driver header file.

-

-Copyright (c) 2015 - 2018, Intel Corporation. All rights
reserved.<BR>

-SPDX-License-Identifier: BSD-2-Clause-Patent

-

-**/

-

-#ifndef _EFI_TCG_MOR_LOCK_H_

-#define _EFI_TCG_MOR_LOCK_H_

-

-/**

- This service is a wrapper for the UEFI Runtime Service GetVariable().

-

- @param VariableName the name of the vendor's variable, it's a
Null- Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize As input, point to the maximum size of return Data-
Buffer.

- As output, point to the actual size of the returned Data-Buffer.

- @param Data Point to return Data-Buffer.

-

- @retval EFI_SUCCESS The function completed successfully.

- @retval EFI_NOT_FOUND The variable was not found.

- @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the
result.
DataSize has

- been updated with the size needed to complete the
request.

- @retval EFI_INVALID_PARAMETER VariableName is NULL.

- @retval EFI_INVALID_PARAMETER VendorGuid is NULL.

- @retval EFI_INVALID_PARAMETER DataSize is NULL.

- @retval EFI_INVALID_PARAMETER The DataSize is not too small and
Data is NULL.

- @retval EFI_DEVICE_ERROR The variable could not be retrieved due
to a
hardware error.

- @retval EFI_SECURITY_VIOLATION The variable could not be retrieved
due to an authentication failure.

-**/

-EFI_STATUS

-EFIAPI

-InternalGetVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- OUT UINT32 *Attributes OPTIONAL,

- IN OUT UINTN *DataSize,

- OUT VOID *Data

- );

-

-/**

- This service is a wrapper for the UEFI Runtime Service
SetVariable()

-

- @param VariableName the name of the vendor's variable, as a

- Null-Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize The size in bytes of Data-Buffer.

- @param Data Point to the content of the variable.

-

- @retval EFI_SUCCESS The firmware has successfully stored the
variable
and its data as

- defined by the Attributes.

- @retval EFI_INVALID_PARAMETER An invalid combination of attribute
bits was supplied, or the

- DataSize exceeds the maximum allowed.

- @retval EFI_INVALID_PARAMETER VariableName is an empty Unicode
string.

- @retval EFI_OUT_OF_RESOURCES Not enough storage is available to
hold
the variable and its data.

- @retval EFI_DEVICE_ERROR The variable could not be saved due to a
hardware failure.

- @retval EFI_WRITE_PROTECTED The variable in question is read-only.

- @retval EFI_WRITE_PROTECTED The variable in question cannot be
deleted.

- @retval EFI_SECURITY_VIOLATION The variable could not be written
due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS

- set but the AuthInfo does NOT pass the validation check
carried

- out by the firmware.

- @retval EFI_NOT_FOUND The variable trying to be updated or
deleted
was not found.

-

-**/

-EFI_STATUS

-EFIAPI

-InternalSetVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- IN UINT32 Attributes,

- IN UINTN DataSize,

- IN VOID *Data

- );

-

-/**

- This service is a checker handler for the UEFI Runtime Service
SetVariable()

-

- @param VariableName the name of the vendor's variable, as a

- Null-Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize The size in bytes of Data-Buffer.

- @param Data Point to the content of the variable.

-

- @retval EFI_SUCCESS The firmware has successfully stored the
variable
and its data as

- defined by the Attributes.

- @retval EFI_INVALID_PARAMETER An invalid combination of attribute
bits was supplied, or the

- DataSize exceeds the maximum allowed.

- @retval EFI_INVALID_PARAMETER VariableName is an empty Unicode
string.

- @retval EFI_OUT_OF_RESOURCES Not enough storage is available to
hold
the variable and its data.

- @retval EFI_DEVICE_ERROR The variable could not be saved due to a
hardware failure.

- @retval EFI_WRITE_PROTECTED The variable in question is read-only.

- @retval EFI_WRITE_PROTECTED The variable in question cannot be
deleted.

- @retval EFI_SECURITY_VIOLATION The variable could not be written
due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS

- set but the AuthInfo does NOT pass the validation check
carried

- out by the firmware.

- @retval EFI_NOT_FOUND The variable trying to be updated or
deleted
was not found.

-

-**/

-EFI_STATUS

-EFIAPI

-SetVariableCheckHandlerMor (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- IN UINT32 Attributes,

- IN UINTN DataSize,

- IN VOID *Data

- );

-

-/**

- Entry Point for MOR Lock Control driver.

-

- @param[in] ImageHandle Image handle of this driver.

- @param[in] SystemTable A Pointer to the EFI System Table.

-

- @retval EFI_SUCCESS

- @return Others Some error occurs.

-**/

-EFI_STATUS

-EFIAPI

-MorLockDriverInit (

- VOID

- );

-

-#endif

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni
deleted file mode 100644
index 711b37d866..0000000000
---
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.uni
+++ /dev/null
@@ -1,16 +0,0 @@
-// /** @file

-// Initializes MemoryOverwriteRequestControlLock variable

-//

-// This module will add Variable Hook and allow
MemoryOverwriteRequestControlLock variable set only once.

-//

-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>

-//

-// SPDX-License-Identifier: BSD-2-Clause-Patent

-//

-// **/

-

-

-#string STR_MODULE_ABSTRACT #language en-US "Initializes
MemoryOverwriteRequestControlLock variable"

-

-#string STR_MODULE_DESCRIPTION #language en-US "This module
will
add Variable Hook and allow MemoryOverwriteRequestControlLock
variable
set only once."

-

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockExtra.u
n
i
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockExtra.
un
i
deleted file mode 100644
index 2679c08c86..0000000000
---
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockExtra.u
n
i
+++ /dev/null
@@ -1,14 +0,0 @@
-// /** @file

-// TcgMorLock Localized Strings and Content

-//

-// Copyright (c) 2015 - 2018, Intel Corporation. All rights
reserved.<BR>

-//

-// SPDX-License-Identifier: BSD-2-Clause-Patent

-//

-// **/

-

-#string STR_PROPERTIES_MODULE_NAME

-#language en-US

-"TCG (Trusted Computing Group) MOR Lock"

-

-

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c
deleted file mode 100644
index 8c92317313..0000000000
---
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/** @file

- TCG MOR (Memory Overwrite Request) Lock Control Driver SMM
wrapper.

-

-Copyright (c) 2015 - 2018, Intel Corporation. All rights
reserved.<BR>

-SPDX-License-Identifier: BSD-2-Clause-Patent

-

-**/

-

-#include <PiSmm.h>

-#include <Library/SmmServicesTableLib.h>

-#include <Library/DebugLib.h>

-#include <Protocol/SmmVarCheck.h>

-#include <Protocol/SmmVariable.h>

-#include "TcgMorLock.h"

-

-EFI_SMM_VARIABLE_PROTOCOL *mSmmVariable;

-

-/**

- This service is a wrapper for the UEFI Runtime Service GetVariable().

-

- @param VariableName the name of the vendor's variable, it's a
Null- Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize As input, point to the maximum size of return Data-
Buffer.

- As output, point to the actual size of the returned Data-Buffer.

- @param Data Point to return Data-Buffer.

-

- @retval EFI_SUCCESS The function completed successfully.

- @retval EFI_NOT_FOUND The variable was not found.

- @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the
result.
DataSize has

- been updated with the size needed to complete the
request.

- @retval EFI_INVALID_PARAMETER VariableName is NULL.

- @retval EFI_INVALID_PARAMETER VendorGuid is NULL.

- @retval EFI_INVALID_PARAMETER DataSize is NULL.

- @retval EFI_INVALID_PARAMETER The DataSize is not too small and
Data is NULL.

- @retval EFI_DEVICE_ERROR The variable could not be retrieved due
to a
hardware error.

- @retval EFI_SECURITY_VIOLATION The variable could not be retrieved
due to an authentication failure.

-**/

-EFI_STATUS

-EFIAPI

-InternalGetVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- OUT UINT32 *Attributes OPTIONAL,

- IN OUT UINTN *DataSize,

- OUT VOID *Data

- )

-{

- return mSmmVariable->SmmGetVariable (

- VariableName,

- VendorGuid,

- Attributes,

- DataSize,

- Data

- );

-}

-

-/**

- This service is a wrapper for the UEFI Runtime Service
SetVariable()

-

- @param VariableName the name of the vendor's variable, as a

- Null-Terminated Unicode String

- @param VendorGuid Unify identifier for vendor.

- @param Attributes Point to memory location to return the attributes of
variable. If the point

- is NULL, the parameter would be ignored.

- @param DataSize The size in bytes of Data-Buffer.

- @param Data Point to the content of the variable.

-

- @retval EFI_SUCCESS The firmware has successfully stored the
variable
and its data as

- defined by the Attributes.

- @retval EFI_INVALID_PARAMETER An invalid combination of attribute
bits was supplied, or the

- DataSize exceeds the maximum allowed.

- @retval EFI_INVALID_PARAMETER VariableName is an empty Unicode
string.

- @retval EFI_OUT_OF_RESOURCES Not enough storage is available to
hold
the variable and its data.

- @retval EFI_DEVICE_ERROR The variable could not be saved due to a
hardware failure.

- @retval EFI_WRITE_PROTECTED The variable in question is read-only.

- @retval EFI_WRITE_PROTECTED The variable in question cannot be
deleted.

- @retval EFI_SECURITY_VIOLATION The variable could not be written
due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS

- set but the AuthInfo does NOT pass the validation check
carried

- out by the firmware.

- @retval EFI_NOT_FOUND The variable trying to be updated or
deleted
was not found.

-

-**/

-EFI_STATUS

-EFIAPI

-InternalSetVariable (

- IN CHAR16 *VariableName,

- IN EFI_GUID *VendorGuid,

- IN UINT32 Attributes,

- IN UINTN DataSize,

- IN VOID *Data

- )

-{

- return mSmmVariable->SmmSetVariable (

- VariableName,

- VendorGuid,

- Attributes,

- DataSize,

- Data

- );

-}

-

-/**

- Entry Point for MOR Lock Control driver.

-

- @param[in] ImageHandle The firmware allocated handle for the EFI
image.

- @param[in] SystemTable A pointer to the EFI System Table.

-

- @retval EFI_SUCCESS EntryPoint runs successfully.

-

-**/

-EFI_STATUS

-EFIAPI

-MorLockDriverEntryPointSmm (

- IN EFI_HANDLE ImageHandle,

- IN EFI_SYSTEM_TABLE *SystemTable

- )

-{

- EFI_STATUS Status;

- EDKII_SMM_VAR_CHECK_PROTOCOL *SmmVarCheck;

-

- //

- // This driver link to Smm Variable driver

- //

- DEBUG ((EFI_D_INFO, "MorLockDriverEntryPointSmm\n"));

-

- Status = gSmst->SmmLocateProtocol (

- &gEfiSmmVariableProtocolGuid,

- NULL,

- (VOID **) &mSmmVariable

- );

- ASSERT_EFI_ERROR (Status);

-

- Status = gSmst->SmmLocateProtocol (

- &gEdkiiSmmVarCheckProtocolGuid,

- NULL,

- (VOID **) &SmmVarCheck

- );

- ASSERT_EFI_ERROR (Status);

-

- Status = MorLockDriverInit ();

- if (EFI_ERROR (Status)) {

- return Status;

- }

-

- Status = SmmVarCheck->SmmRegisterSetVariableCheckHandler
(SetVariableCheckHandlerMor);

- ASSERT_EFI_ERROR (Status);

-

- return Status;

-}

-

diff --git
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.i
nf
b/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.i
nf
deleted file mode 100644
index 875c1e5f3a..0000000000
---
a/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.i
nf
+++ /dev/null
@@ -1,65 +0,0 @@
-## @file

-# Initializes MemoryOverwriteRequestControlLock variable

-#

-# This module will add Variable Hook and allow
MemoryOverwriteRequestControlLock variable set only once.

-#

-# NOTE: This module only handles secure MOR V1 and is deprecated.

-# The secure MOR V2 is handled inside of variable driver.

-#

-# Copyright (c) 2015 - 2018, Intel Corporation. All rights
reserved.<BR>

-# SPDX-License-Identifier: BSD-2-Clause-Patent

-#

-##

-

-[Defines]

- INF_VERSION = 0x00010005

- BASE_NAME = TcgMorLockSmm

- MODULE_UNI_FILE = TcgMorLock.uni

- FILE_GUID = E2EA6F47-E678-47FA-8C1B-02A03E825C6E

- MODULE_TYPE = DXE_SMM_DRIVER

- VERSION_STRING = 1.0

- PI_SPECIFICATION_VERSION = 0x0001000A

- ENTRY_POINT = MorLockDriverEntryPointSmm

-

-#

-# The following information is for reference only and not required by
the build tools.

-#

-# VALID_ARCHITECTURES = IA32 X64 EBC

-#

-

-[Sources]

- TcgMorLock.h

- TcgMorLock.c

- TcgMorLockSmm.c

-

-[Packages]

- MdePkg/MdePkg.dec

- MdeModulePkg/MdeModulePkg.dec

- SecurityPkg/SecurityPkg.dec

-

-[LibraryClasses]

- UefiDriverEntryPoint

- SmmServicesTableLib

- DebugLib

- BaseLib

- BaseMemoryLib

-

-[Guids]

- ## SOMETIMES_CONSUMES ##
Variable:L"MemoryOverwriteRequestControl"

- gEfiMemoryOverwriteControlDataGuid

-

- ## SOMETIMES_CONSUMES ##
Variable:L"MemoryOverwriteRequestControlLock"

- ## PRODUCES ##
Variable:L"MemoryOverwriteRequestControlLock"

- gEfiMemoryOverwriteRequestControlLockGuid

-

-[Protocols]

- gEdkiiSmmVarCheckProtocolGuid ## CONSUMES

- gEfiSmmVariableProtocolGuid ## CONSUMES

-

-[Depex]

- gEfiSmmVariableProtocolGuid AND

- gSmmVariableWriteGuid AND

- ( gEfiTcgProtocolGuid OR gEfiTcg2ProtocolGuid )

-

-[UserExtensions.TianoCore."ExtraFiles"]

- TcgMorLockExtra.uni

--
2.26.2.windows.1


Re: [PATCH v5 0/7] add support for virtio-mmio 1.0

Yao, Jiewen
 

Hi Gerd
Have you run CI and ensure this patch series can pass CI ?

-----Original Message-----
From: Gerd Hoffmann <kraxel@...>
Sent: Friday, August 27, 2021 9:45 PM
To: devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Gerd Hoffmann
<kraxel@...>; Ard Biesheuvel <ardb+tianocore@...>; Justen,
Jordan L <jordan.l.justen@...>
Subject: [PATCH v5 0/7] add support for virtio-mmio 1.0

This little series adds virtio 1.0 support for the virtio-mmio
transport. For the mmio transport the difference between 0.9.5 and 1.0
is rather small (when compared to the pci transport), it is just a bunch
of new registers for the changed virtio queue initialization. So the
patch series is small too ...

v2 changes:
- Added review tags for patches #1 + #2.
- Add a patch to make sure we have a valid QueueNum.
- Add a patch to support all 64 virtio 1.0 feature bits.
v3 changes:
- Add #defines for virtio-mmio version field.
v4 changes:
- split patches into smaller ones.
- enable virtio 1.0 at the end when everything is in place.
v5 changes:
- Added review tags.
- Fixed 32bit arm build failure.

take care,
Gerd

Gerd Hoffmann (7):
OvmfPkg/Virtio10: Add virtio-mmio 1.0 defines
OvmfPkg/VirtioMmioDeviceLib: Add virtio 1.0 detection.
OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetPageSize.
OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAddress
OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Add default QueueNum
OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Adapt feature bit handling
OvmfPkg/VirtioMmioDeviceLib: enable virtio 1.0

OvmfPkg/Include/IndustryStandard/Virtio10.h | 12 ++++
.../VirtioMmioDeviceLib/VirtioMmioDevice.h | 5 ++
.../VirtioMmioDeviceLib/VirtioMmioDevice.c | 17 +++--
.../VirtioMmioDeviceFunctions.c | 71 ++++++++++++++++---
4 files changed, 92 insertions(+), 13 deletions(-)

--
2.31.1


Re: [PATCH 0/2] BaseTools: Switch ARM/AARCH64 CI gcc from Linaro to Arm

Rebecca Cran
 

On 8/27/2021 1:31 PM, Ard Biesheuvel wrote:
On Thu, 26 Aug 2021 at 23:03, Rebecca Cran <rebecca@...> wrote:
I've created a ticket in Bugzilla:
https://bugzilla.tianocore.org/show_bug.cgi?id=3594.


--
Rebecca Cran


On 8/22/21 11:35 PM, Rebecca Cran wrote:
Linaro no longer do gcc releases - Arm creates them now.

Update the gcc_[arm,aarch64]_linux_ext_dep.yaml files in BaseTools/Bin to
switch from Linaro's old release to the latest gcc 10.3-2021.07 release
from Arm.

The private PR https://github.com/tianocore/edk2/pull/1909 failed due to
a problem with GCC5_[ARM,AARCH64]_PREFIX. I don't know if there are more
changes I need to add, or if it's a problem with the CI system.
You are changing the compiler from

arm-linux-gnueabihf-gcc

to

arm-none-linux-gnueabihf-gcc

(and likewise for aarch64) so I am not surprised you are hitting problems.
Ah, I see why that's a problem now. The path is constructed in BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py:

            # make GCC5_ARM_PREFIX to align with tools_def.txt
            prefix = os.path.join(install_path, "bin", "arm-linux-gnueabihf-")
shell_environment.GetEnvironment().set_shell_var("GCC5_ARM_PREFIX", prefix)


That explains why it worked on my machine where GCC5_ARM_PREFIX and GCC5_AARCH64_PREFIX are already set.


--
Rebecca Cran


[PATCH] CryptoPkg/BaseCryptLib: Eliminate extra buffer copy in Pkcs7Verify()

Bob Morgan
 

Create a read-only openSSL BIO wrapper for the existing input
buffer passed to Pkcs7Verify() instead of copying the buffer
into an empty writable BIO which causes memory allocations
within openSSL.

Signed-off-by: Bob Morgan <bobm@...>
---
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c
index d99597d181..8eda98f7b2 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c
@@ -864,15 +864,11 @@ Pkcs7Verify (
// For generic PKCS#7 handling, InData may be NULL if the content is present
// in PKCS#7 structure. So ignore NULL checking here.
//
- DataBio = BIO_new (BIO_s_mem ());
+ DataBio = BIO_new_mem_buf (InData, (int) DataLength);
if (DataBio == NULL) {
goto _Exit;
}

- if (BIO_write (DataBio, InData, (int) DataLength) <= 0) {
- goto _Exit;
- }
-
//
// Allow partial certificate chains, terminated by a non-self-signed but
// still trusted intermediate certificate. Also disable time checks.
--
2.17.1


Re: OVMF: NV Variable Store Layout of Larger Build Targets

Ard Biesheuvel
 

(+ Gerd)

On Sat, 21 Aug 2021 at 03:10, Devon Bautista
<dbautista@...> wrote:

Hello All,

I am currently working with the Linuxboot developers to improve testing kernel + initramfs pairs in firmware using OVMF.

The current maximum image size of an OVMF image is 4MB, which is insufficient for storing even a minimal and compressed kernel and initramfs. To get around this, we've been maintaining our own fork of EDK2 that adds 8MiB and 16MiB OVMF build targets that have enough room in the DXE volume to store a reasonably-sized kernel and initramfs. However, it would be convenient if upstream EDK2 supported these larger OVMF targets.

In discussing this with the previous OVMF maintainer Laszlo Ersek here, it was brought up that:

The trend of the ever-growing DXE-phase warrants a larger firmware volume size
8MiB and 16MiB image sizes seem to be justified because of this QEMU commit

However, as Laszlo mentioned, introducing a larger volume size is compatibility breaking, and so seizing the opportunity to come up with a larger non-volatile variable store layout is necessary.

That said, I would like to use this thread to discuss among hardware vendors an optimal variable store layout for these larger image sizes.

Best,
Devon

For reference, here is a summary of which sections increased when the 4MiB build target was added (taken from commit b24fca05) after the previous 2MiB limit:

Description Compression type Size [KB]
------------------------- ----------------- ----------------------
Non-volatile data storage open-coded binary 128 -> 528 ( +400)
data
Variable store 56 -> 256 ( +200)
Event log 4 -> 4 ( +0)
Working block 4 -> 4 ( +0)
Spare area 64 -> 264 ( +200)

FVMAIN_COMPACT uncompressed 1712 -> 3360 (+1648)
FV FFS file LZMA compressed
PEIFV uncompressed 896 -> 896 ( +0)
individual PEI uncompressed
modules
DXEFV uncompressed 10240 -> 10240 ( +0)
individual DXE uncompressed
modules

SECFV uncompressed 208 -> 208 ( +0)
SEC driver
reset vector code


Re: [PATCH v4 0/7] add support for virtio-mmio 1.0

Ard Biesheuvel
 

On Fri, 27 Aug 2021 at 15:42, Gerd Hoffmann <kraxel@...> wrote:

On Fri, Aug 27, 2021 at 11:35:42AM +0000, Yao, Jiewen wrote:
I am sorry, I mess up https://github.com/tianocore/edk2/pull/1917, please ignore that.

This pull request is re-created at https://github.com/tianocore/edk2/pull/1918.

Please take a look at 1918.
Is there some way to run the CI before posting the patches?

I could probably create a dummy pull request for that and delete it when
the CI is done. That'll probably make gitlab send out a bunch of
annoying notifications though ...
FYI this is actually a supported and recommended way of doing things:
any user can send PRs and the CI will run on them. Only maintainers
can do so and set the 'pull' label, in which case the PR will get
merged if all CI checks pass.