Re: [edk2-devel] [PATCH V3] Maintainers.txt: Add reviewer for serial and disk
Reviewed-by: Star Zeng -Original Message- From: devel@edk2.groups.io On Behalf Of Gao, Zhichao Sent: 2020年8月3日 14:05 To: devel@edk2.groups.io Cc: Gao, Zhichao ; Wang, Jian J ; Wu, Hao A ; Gao, Liming ; Ni, Ray ; Bi, Dandan ; Zeng, Star Subject: [edk2-devel] [PATCH V3] Maintainers.txt: Add reviewer for serial and disk From: "Gao, Zhichao" Signed-off-by: Zhichao Gao Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Cc: Ray Ni Cc: Dandan Bi Cc: Star Zeng --- V2: Forget to remove the *SerailPort*.h from the common device section in V1. Fix it in V2. V3: Add the missing ':' in V2 for Disk mdoules. Add one more module reviewer for SMBIOS. Maintainers.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..fe7f04831f 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -286,16 +286,27 @@ F: MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c R: Dandan Bi R: Liming Gao +MdeModulePkg: Serial modules +F: MdeModulePkg/*Serial*/ +F: MdeModulePkg/Include/*SerialPort*.h +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + +MdeModulePkg: Disk modules +F: MdeModulePkg/Universal/Disk/ +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + MdeModulePkg: Device and Peripheral modules F: MdeModulePkg/*PciHostBridge*/ -F: MdeModulePkg/*Serial*/ F: MdeModulePkg/Bus/ F: MdeModulePkg/Include/*Ata*.h F: MdeModulePkg/Include/*IoMmu*.h F: MdeModulePkg/Include/*NonDiscoverableDevice*.h F: MdeModulePkg/Include/*NvmExpress*.h F: MdeModulePkg/Include/*SdMmc*.h -F: MdeModulePkg/Include/*SerialPort*.h F: MdeModulePkg/Include/*Ufs*.h F: MdeModulePkg/Include/*Usb*.h F: MdeModulePkg/Include/Guid/RecoveryDevice.h @@ -304,7 +315,6 @@ F: MdeModulePkg/Include/Library/PciHostBridgeLib.h F: MdeModulePkg/Include/Ppi/StorageSecurityCommand.h F: MdeModulePkg/Include/Protocol/Ps2Policy.h F: MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/ -F: MdeModulePkg/Universal/Disk/ F: MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/ R: Hao A Wu R: Ray Ni @@ -365,6 +375,7 @@ MdeModulePkg: SMBIOS modules F: MdeModulePkg/Universal/Smbios*/ R: Dandan Bi R: Star Zeng +R: Zhichao Gao MdeModulePkg: UEFI Variable modules F: MdeModulePkg/*Var*/ -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63659): https://edk2.groups.io/g/devel/message/63659 Mute This Topic: https://groups.io/mt/75960401/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Fixing inconsistent win32 HOME path mapping
Reviewed-by: Nate DeSimone On 7/29/20, 6:10 PM, "Bjorge, Erik C" wrote: In Python 3.8.x the method of mapping the users home path was changed to look at USERPROFILE and then HOMEDRIVE\HOMEPATH. This change removed the check of HOME generated by git BASH based on HOMEDRIVE/HOMEPATH. For users with a USERPROFILE environment variable that does not match the HOMEDRIVE\HOMEPATH environment variables this can lead to inconsistent decoding of files such as .gitconfig between BASH and EdkRepo. This change attempts to enforce a consistent decode order. HOME, HOMEDRIVE\HOMEPATH and USERPROFILE. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Erik Bjorge --- edkrepo/commands/sync_command.py| 46 ++--- edkrepo/common/common_repo_functions.py | 6 +-- edkrepo/common/pathfix.py | 54 - edkrepo/common/ui_functions.py | 6 ++- edkrepo/config/config_factory.py| 3 +- 5 files changed, 85 insertions(+), 30 deletions(-) diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py index 2cb4630..ea3eed3 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -31,14 +31,14 @@ from edkrepo.common.humble import NO_SYNC_DETACHED_HEAD, SYNC_COMMITS_ON_MASTER, from edkrepo.common.humble import MIRROR_BEHIND_PRIMARY_REPO, SYNC_NEEDS_REBASE, INCLUDED_FILE_NAME from edkrepo.common.humble import SYNC_BRANCH_CHANGE_ON_LOCAL, SYNC_INCOMPATIBLE_COMBO from edkrepo.common.humble import SYNC_REBASE_CALC_FAIL -from edkrepo.common.pathfix import get_actual_path +from edkrepo.common.pathfix import get_actual_path, expanduser from edkrepo.common.common_repo_functions import clone_repos, sparse_checkout_enabled from edkrepo.common.common_repo_functions import reset_sparse_checkout, sparse_checkout, verify_single_manifest from edkrepo.common.common_repo_functions import checkout_repos, check_dirty_repos from edkrepo.common.common_repo_functions import update_editor_config from edkrepo.common.common_repo_functions import update_repo_commit_template, get_latest_sha from edkrepo.common.common_repo_functions import has_primary_repo_remote, fetch_from_primary_repo, in_sync_with_primary -from edkrepo.common.common_repo_functions import update_hooks, combinations_in_manifest +from edkrepo.common.common_repo_functions import update_hooks, combinations_in_manifest from edkrepo.common.common_repo_functions import write_included_config, remove_included_config from edkrepo.common.workspace_maintenance.workspace_maintenance import generate_name_for_obsolete_backup from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import pull_workspace_manifest_repo @@ -48,7 +48,7 @@ from edkrepo.common.ui_functions import init_color_console from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest, get_edkrepo_global_data_directory from edkrepo.config.config_factory import get_workspace_manifest_file from edkrepo_manifest_parser.edk_manifest import CiIndexXml, ManifestXml -from project_utils.submodule import deinit_submodules, maintain_submodules +from project_utils.submodule import deinit_submodules, maintain_submodules class SyncCommand(EdkrepoCommand): @@ -85,7 +85,7 @@ class SyncCommand(EdkrepoCommand): current_combo = initial_manifest.general_config.current_combo initial_sources = initial_manifest.get_repo_sources(current_combo) initial_hooks = initial_manifest.repo_hooks -initial_combo = current_combo +initial_combo = current_combo source_global_manifest_repo = find_source_manifest_repo(initial_manifest, config['cfg_file'], config['user_cfg_file'], args.source_manifest_repo) pull_workspace_manifest_repo(initial_manifest, config['cfg_file'], config['user_cfg_file'], args.source_manifest_repo, False) @@ -102,7 +102,7 @@ class SyncCommand(EdkrepoCommand): if not args.update_local_manifest: self.__check_for_new_manifest(args, config, initial_manifest, workspace_path, global_manifest_directory) check_dirty_repos(initial_manifest, workspace_path) - + # Determine if sparse checkout needs to be disabled for this operation sparse_settings = initial_manifest.sparse_settings sparse_enabled = sparse_checkout_enabled(workspace_path, initial_sources) @@ -116,7 +116,7 @@ class SyncCommand(EdkrepoCommand): reset_sparse_checkout(workspace_path, initial_sources) # Get the latest manifest if requested -if args.update_local_manifest: # NOTE: hyphens in a
[edk2-devel] [PATCH V3] Maintainers.txt: Add reviewer for serial and disk
From: "Gao, Zhichao" Signed-off-by: Zhichao Gao Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Cc: Ray Ni Cc: Dandan Bi Cc: Star Zeng --- V2: Forget to remove the *SerailPort*.h from the common device section in V1. Fix it in V2. V3: Add the missing ':' in V2 for Disk mdoules. Add one more module reviewer for SMBIOS. Maintainers.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..fe7f04831f 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -286,16 +286,27 @@ F: MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c R: Dandan Bi R: Liming Gao +MdeModulePkg: Serial modules +F: MdeModulePkg/*Serial*/ +F: MdeModulePkg/Include/*SerialPort*.h +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + +MdeModulePkg: Disk modules +F: MdeModulePkg/Universal/Disk/ +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + MdeModulePkg: Device and Peripheral modules F: MdeModulePkg/*PciHostBridge*/ -F: MdeModulePkg/*Serial*/ F: MdeModulePkg/Bus/ F: MdeModulePkg/Include/*Ata*.h F: MdeModulePkg/Include/*IoMmu*.h F: MdeModulePkg/Include/*NonDiscoverableDevice*.h F: MdeModulePkg/Include/*NvmExpress*.h F: MdeModulePkg/Include/*SdMmc*.h -F: MdeModulePkg/Include/*SerialPort*.h F: MdeModulePkg/Include/*Ufs*.h F: MdeModulePkg/Include/*Usb*.h F: MdeModulePkg/Include/Guid/RecoveryDevice.h @@ -304,7 +315,6 @@ F: MdeModulePkg/Include/Library/PciHostBridgeLib.h F: MdeModulePkg/Include/Ppi/StorageSecurityCommand.h F: MdeModulePkg/Include/Protocol/Ps2Policy.h F: MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/ -F: MdeModulePkg/Universal/Disk/ F: MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/ R: Hao A Wu R: Ray Ni @@ -365,6 +375,7 @@ MdeModulePkg: SMBIOS modules F: MdeModulePkg/Universal/Smbios*/ R: Dandan Bi R: Star Zeng +R: Zhichao Gao MdeModulePkg: UEFI Variable modules F: MdeModulePkg/*Var*/ -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63657): https://edk2.groups.io/g/devel/message/63657 Mute This Topic: https://groups.io/mt/75960401/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch] MdeModulePkg/EbcDxe: Fix spelling mistake
> -Original Message- > From: Kinney, Michael D > Sent: Saturday, August 1, 2020 6:35 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A > Subject: [Patch] MdeModulePkg/EbcDxe: Fix spelling mistake > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2360 > > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Michael D Kinney > --- > MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c > b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c > index fb85b30578..5597a7e154 100644 > --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c > +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCommand.c > @@ -218,7 +218,7 @@ EFI_DEBUGGER_COMMAND_SET > mDebuggerCommandSet[] = { > L"TRACE - show/clear trace instruction branch\n", > L"The trace command will show or clear the latest instruction > branch.\n\n", > L"TRACE [c]\n" > -L" (No Argument) - Show current instrcution branch\n" > +L" (No Argument) - Show current instruction branch\n" Reviewed-by: Hao A Wu Best Regards, Hao Wu > L" c - Clear current instruction branch\n", > L"", > {SCAN_NULL, CHAR_NULL}, > -- > 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63656): https://edk2.groups.io/g/devel/message/63656 Mute This Topic: https://groups.io/mt/75917297/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as reviewer for Crypto and Capsule
Reviewed-by: Jian J Wang Regards, Jian > -Original Message- > From: devel@edk2.groups.io On Behalf Of Guomin > Jiang > Sent: Wednesday, July 29, 2020 3:01 PM > To: devel@edk2.groups.io > Cc: Andrew Fish ; Laszlo Ersek ; Leif > Lindholm ; Kinney, Michael D > Subject: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as > reviewer for Crypto and Capsule > > Add myself as reviewer for CryptoPkg/ and *Capsule* and FmpDevicePkg/. > > Signed-off-by: Guomin Jiang > Cc: Andrew Fish > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Michael D Kinney > --- > Maintainers.txt | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Maintainers.txt b/Maintainers.txt > index 5504bb3d17cc..8c27094e433e 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -164,6 +164,7 @@ W: > https://github.com/tianocore/tianocore.github.io/wiki/CryptoPkg > M: Jiewen Yao > M: Jian J Wang > R: Xiaoyu Lu > +R: Guomin Jiang > > DynamicTablesPkg > F: DynamicTablesPkg/ > @@ -197,6 +198,7 @@ F: FmpDevicePkg/ > W: https://github.com/tianocore/tianocore.github.io/wiki/FmpDevicePkg > M: Liming Gao > M: Michael D Kinney > +R: Guomin Jiang > > IntelFsp2Pkg > F: IntelFsp2Pkg/ > @@ -321,6 +323,7 @@ F: MdeModulePkg/Library/FmpAuthenticationLibNull/ > F: MdeModulePkg/Universal/Esrt*/ > R: Hao A Wu > R: Liming Gao > +R: Guomin Jiang > > MdeModulePkg: HII and UI modules > F: MdeModulePkg/*FileExplorer*/ > -- > 2.25.1.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63655): https://edk2.groups.io/g/devel/message/63655 Mute This Topic: https://groups.io/mt/75860380/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2] Maintainers.txt: Add reviewer for serial and disk
> -Original Message- > From: devel@edk2.groups.io On Behalf Of Gao, > Zhichao > Sent: Monday, August 3, 2020 1:48 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A > ; Gao, Liming ; Ni, Ray > > Subject: [edk2-devel] [PATCH V2] Maintainers.txt: Add reviewer for serial and > disk > > Signed-off-by: Zhichao Gao > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Liming Gao > Cc: Ray Ni > --- > V2: > Forget to remove the *SerailPort*.h from the common device section in V1. > Fix it in V2. > > Maintainers.txt | 16 +--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..921940998d > 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -286,16 +286,27 @@ F: > MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c > R: Dandan Bi > R: Liming Gao > > +MdeModulePkg: Serial modules > +F: MdeModulePkg/*Serial*/ > +F: MdeModulePkg/Include/*SerialPort*.h > +R: Hao A Wu > +R: Ray Ni > +R: Zhichao Gao > + > +MdeModulePkg Disk modules To keep aligned with other items, please update the above line to: MdeModulePkg: Disk modules With the change, Reviewed-by: Hao A Wu Best Regards, Hao Wu > +F: MdeModulePkg/Universal/Disk/ > +R: Hao A Wu > +R: Ray Ni > +R: Zhichao Gao > + > MdeModulePkg: Device and Peripheral modules > F: MdeModulePkg/*PciHostBridge*/ > -F: MdeModulePkg/*Serial*/ > F: MdeModulePkg/Bus/ > F: MdeModulePkg/Include/*Ata*.h > F: MdeModulePkg/Include/*IoMmu*.h > F: MdeModulePkg/Include/*NonDiscoverableDevice*.h > F: MdeModulePkg/Include/*NvmExpress*.h > F: MdeModulePkg/Include/*SdMmc*.h > -F: MdeModulePkg/Include/*SerialPort*.h > F: MdeModulePkg/Include/*Ufs*.h > F: MdeModulePkg/Include/*Usb*.h > F: MdeModulePkg/Include/Guid/RecoveryDevice.h > @@ -304,7 +315,6 @@ F: > MdeModulePkg/Include/Library/PciHostBridgeLib.h > F: MdeModulePkg/Include/Ppi/StorageSecurityCommand.h > F: MdeModulePkg/Include/Protocol/Ps2Policy.h > F: MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/ > -F: MdeModulePkg/Universal/Disk/ > F: MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/ > R: Hao A Wu > R: Ray Ni > -- > 2.21.0.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63654): https://edk2.groups.io/g/devel/message/63654 Mute This Topic: https://groups.io/mt/75960259/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2] Maintainers.txt: Add reviewer for serial and disk
Signed-off-by: Zhichao Gao Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Cc: Ray Ni --- V2: Forget to remove the *SerailPort*.h from the common device section in V1. Fix it in V2. Maintainers.txt | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..921940998d 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -286,16 +286,27 @@ F: MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c R: Dandan Bi R: Liming Gao +MdeModulePkg: Serial modules +F: MdeModulePkg/*Serial*/ +F: MdeModulePkg/Include/*SerialPort*.h +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + +MdeModulePkg Disk modules +F: MdeModulePkg/Universal/Disk/ +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + MdeModulePkg: Device and Peripheral modules F: MdeModulePkg/*PciHostBridge*/ -F: MdeModulePkg/*Serial*/ F: MdeModulePkg/Bus/ F: MdeModulePkg/Include/*Ata*.h F: MdeModulePkg/Include/*IoMmu*.h F: MdeModulePkg/Include/*NonDiscoverableDevice*.h F: MdeModulePkg/Include/*NvmExpress*.h F: MdeModulePkg/Include/*SdMmc*.h -F: MdeModulePkg/Include/*SerialPort*.h F: MdeModulePkg/Include/*Ufs*.h F: MdeModulePkg/Include/*Usb*.h F: MdeModulePkg/Include/Guid/RecoveryDevice.h @@ -304,7 +315,6 @@ F: MdeModulePkg/Include/Library/PciHostBridgeLib.h F: MdeModulePkg/Include/Ppi/StorageSecurityCommand.h F: MdeModulePkg/Include/Protocol/Ps2Policy.h F: MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/ -F: MdeModulePkg/Universal/Disk/ F: MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/ R: Hao A Wu R: Ray Ni -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63653): https://edk2.groups.io/g/devel/message/63653 Mute This Topic: https://groups.io/mt/75960259/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH] Maintainers.txt: Add reviewer for serial and disk
Signed-off-by: Zhichao Gao Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Cc: Ray Ni --- Maintainers.txt | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..98da585004 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -286,9 +286,21 @@ F: MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c R: Dandan Bi R: Liming Gao +MdeModulePkg: Serial modules +F: MdeModulePkg/*Serial*/ +F: MdeModulePkg/Include/*SerialPort*.h +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + +MdeModulePkg Disk modules +F: MdeModulePkg/Universal/Disk/ +R: Hao A Wu +R: Ray Ni +R: Zhichao Gao + MdeModulePkg: Device and Peripheral modules F: MdeModulePkg/*PciHostBridge*/ -F: MdeModulePkg/*Serial*/ F: MdeModulePkg/Bus/ F: MdeModulePkg/Include/*Ata*.h F: MdeModulePkg/Include/*IoMmu*.h @@ -304,7 +316,6 @@ F: MdeModulePkg/Include/Library/PciHostBridgeLib.h F: MdeModulePkg/Include/Ppi/StorageSecurityCommand.h F: MdeModulePkg/Include/Protocol/Ps2Policy.h F: MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/ -F: MdeModulePkg/Universal/Disk/ F: MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/ R: Hao A Wu R: Ray Ni -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63652): https://edk2.groups.io/g/devel/message/63652 Mute This Topic: https://groups.io/mt/75960243/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v5 1/1] ShellPkg/DynamicCommand: add HttpDynamicCommand
Maciej, Jiaxin and Siyuan: As you are network exporters, could you give the comments for this change? Thanks Liming -Original Message- From: Vladimir Olovyannikov Sent: 2020年7月28日 0:49 To: devel@edk2.groups.io Cc: Laszlo Ersek ; Vladimir Olovyannikov ; Samer El-Haj-Mahmoud ; Gao, Zhichao ; Maciej Rabeda ; Wu, Jiaxin ; Fu, Siyuan ; Ni, Ray ; Gao, Liming ; Nd Subject: [PATCH v5 1/1] ShellPkg/DynamicCommand: add HttpDynamicCommand Introduce an http client utilizing EDK2 HTTP protocol, to allow fast image downloading from http/https servers. HTTP download speed is usually faster than tftp. The client is based on the same approach as tftp dynamic command, and uses the same UEFI Shell command line parameters. This makes it easy integrating http into existing UEFI Shell scripts. Note that to enable HTTP download, feature Pcd gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections must be set to TRUE. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2860 Signed-off-by: Vladimir Olovyannikov CC: Samer El-Haj-Mahmoud CC: Laszlo Ersek Cc: Zhichao Gao Cc: Maciej Rabeda Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Ray Ni Cc: Liming Gao Cc: Nd --- CryptoPkg/Library/OpensslLib/openssl |2 +- .../DynamicCommand/HttpDynamicCommand/Http.c | 1715 + .../DynamicCommand/HttpDynamicCommand/Http.h | 89 + .../HttpDynamicCommand/Http.uni | 117 ++ .../HttpDynamicCommand/HttpApp.c | 53 + .../HttpDynamicCommand/HttpApp.inf| 58 + .../HttpDynamicCommand/HttpDynamicCommand.c | 134 ++ .../HttpDynamicCommand/HttpDynamicCommand.inf | 63 + ShellPkg/Include/Guid/ShellLibHiiGuid.h |5 + ShellPkg/ShellPkg.dec |1 + ShellPkg/ShellPkg.dsc |5 + 11 files changed, 2241 insertions(+), 1 deletion(-) create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.h create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.c create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf diff --git a/CryptoPkg/Library/OpensslLib/openssl b/CryptoPkg/Library/OpensslLib/openssl index e2e09d9fba11..c3656cc594da 16 --- a/CryptoPkg/Library/OpensslLib/openssl +++ b/CryptoPkg/Library/OpensslLib/openssl @@ -1 +1 @@ -Subproject commit e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72 +Subproject commit c3656cc594daac8167721dde7220f0e59ae146fc diff --git a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c new file mode 100644 index ..0565b07c3570 --- /dev/null +++ b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c @@ -0,0 +1,1715 @@ +/** @file + The implementation for the 'http' Shell command. + + Copyright (c) 2015, ARM Ltd. All rights reserved. + Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP + Copyright (c) 2020, Broadcom. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include "Http.h" + +#define IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH 32 +EFI_HII_HANDLE mHttpHiiHandle; + +/* + Constant strings and definitions related to the message + indicating the amount of progress in the dowloading of a HTTP file. +*/ + +// Number of steps in the progression slider +#define HTTP_PROGRESS_SLIDER_STEPS \ + ((sizeof (HTTP_PROGR_FRAME) / sizeof (CHAR16)) - 3) + +// Size in number of characters plus one (final zero) of the message to +// indicate the progress of an HTTP download. The format is "[(progress slider: +// 40 characters)] (nb of KBytes downloaded so far: 7 characters) Kb". There +// are thus the number of characters in HTTP_PROGR_FRAME[] plus 11 characters +// (2 // spaces, "Kb" and seven characters for the number of KBytes). +#define HTTP_PROGRESS_MESSAGE_SIZE \ + ((sizeof (HTTP_PROGR_FRAME) / sizeof (CHAR16)) + 12) + +// +// Buffer size. Note that larger buffer does not mean better speed! +// +#define DEFAULT_BUF_SIZE SIZE_32KB +#define MAX_BUF_SIZE SIZE_4MB + +#define MIN_PARAM_COUNT 2 +#define MAX_PARAM_COUNT 4 + +#define TIMER_MAX_TIMEOUT_S 10 + +// File name to use when URI ends with "/" +#define DEFAULT_HTML_FILE L"index.html" +#define DEFAULT_HTTP_PROTOL"http" + +// String to delete the HTTP progress message to be able to update it : +// (HTTP_PROGRESS_MESSAGE_SIZE-1) '\b' +#define HTTP_PROGRESS_DEL \ + L"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\ +\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" + +#define HTTP_KB L"\b\b\b\b\b\b\b\b\b\b" +//
Re: [edk2-devel] [PATCH v13 05/46] MdeModulePkg/DxeIplPeim: Support GHCB pages when creating page tables
> -Original Message- > From: devel@edk2.groups.io On Behalf Of > Lendacky, Thomas > Sent: Friday, July 31, 2020 2:43 AM > To: devel@edk2.groups.io > Cc: Brijesh Singh ; Ard Biesheuvel > ; Dong, Eric ; Justen, > Jordan L ; Laszlo Ersek ; > Gao, Liming ; Kinney, Michael D > ; Ni, Ray ; Wang, Jian J > ; Wu, Hao A ; Bi, Dandan > > Subject: [edk2-devel] [PATCH v13 05/46] MdeModulePkg/DxeIplPeim: > Support GHCB pages when creating page tables > > From: Tom Lendacky > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 > > GHCB pages must be mapped as shared pages, so modify the process of > creating identity mapped pagetable entries so that GHCB entries are created > without the encryption bit set. The GHCB range consists of two pages per > CPU, the first being the GHCB and the second being a per-CPU variable page. > Only the GHCB page is mapped as shared. > > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > Signed-off-by: Tom Lendacky > --- > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 2 + > .../Core/DxeIplPeim/X64/VirtualMemory.h | 12 +++- > .../Core/DxeIplPeim/Ia32/DxeLoadFunc.c| 4 +- > .../Core/DxeIplPeim/X64/DxeLoadFunc.c | 11 +++- > .../Core/DxeIplPeim/X64/VirtualMemory.c | 57 +++ > 5 files changed, 70 insertions(+), 16 deletions(-) > > diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > index 3f1702854660..19b8a4c8aefa 100644 > --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > @@ -115,6 +115,8 @@ [Pcd.IA32,Pcd.X64] >gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask > ## CONSUMES >gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## > CONSUMES >gEfiMdeModulePkgTokenSpaceGuid.PcdUse5LevelPageTable ## > SOMETIMES_CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase## > CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize## > CONSUMES > > [Pcd.IA32,Pcd.X64,Pcd.ARM,Pcd.AARCH64] >gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack ## > SOMETIMES_CONSUMES > diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h > b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h > index 2d0493f109e8..6b7c38a441d6 100644 > --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h > +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h > @@ -201,6 +201,8 @@ EnableExecuteDisableBit ( >@param[in, out] PageEntry2M Pointer to 2M page entry. >@param[in] StackBase Stack base address. >@param[in] StackSize Stack size. > + @param[in] GhcbBase GHCB page area base address. > + @param[in] GhcbSize GHCB page area size. > > **/ > VOID > @@ -208,7 +210,9 @@ Split2MPageTo4K ( >IN EFI_PHYSICAL_ADDRESS PhysicalAddress, >IN OUT UINT64 *PageEntry2M, >IN EFI_PHYSICAL_ADDRESS StackBase, > - IN UINTN StackSize > + IN UINTN StackSize, > + IN EFI_PHYSICAL_ADDRESS GhcbBase, > + IN UINTN GhcbSize >); > > /** > @@ -217,6 +221,8 @@ Split2MPageTo4K ( > >@param[in] StackBase Stack base address. >@param[in] StackSize Stack size. > + @param[in] GhcbBase GHCB page area base address. > + @param[in] GhcbSize GHCB page area size. > >@return The address of 4 level page map. > > @@ -224,7 +230,9 @@ Split2MPageTo4K ( > UINTN > CreateIdentityMappingPageTables ( >IN EFI_PHYSICAL_ADDRESS StackBase, > - IN UINTN StackSize > + IN UINTN StackSize, > + IN EFI_PHYSICAL_ADDRESS GhcbBase, > + IN UINTN GhcbkSize >); > > > diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c > b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c > index 6e8ca824d469..284b34818ca7 100644 > --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c > +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c > @@ -123,7 +123,7 @@ Create4GPageTablesIa32Pae ( > // > // Need to split this 2M page that covers stack range. > // > -Split2MPageTo4K (PhysicalAddress, (UINT64 *) PageDirectoryEntry, > StackBase, StackSize); > +Split2MPageTo4K (PhysicalAddress, (UINT64 *) > + PageDirectoryEntry, StackBase, StackSize, 0, 0); >} else { > // > // Fill in the Page Directory entries @@ -282,7 +282,7 @@ > HandOffToDxeCore ( > // > // Create page table and save PageMapLevel4 to CR3 > // > -PageTables = CreateIdentityMappingPageTables (BaseOfStack, > STACK_SIZE); > +PageTables = CreateIdentityMappingPageTables (BaseOfStack, > + STACK_SIZE, 0, 0); > > // > // End of PEI phase signal > diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoa
Re: [edk2-devel] [PATCH v13 01/46] MdeModulePkg: Create PCDs to be used in support of SEV-ES
Really sorry for the late response. Two minor inline comments below. With them addressed, Reviewed-by: Hao A Wu > -Original Message- > From: devel@edk2.groups.io On Behalf Of > Lendacky, Thomas > Sent: Friday, July 31, 2020 2:43 AM > To: devel@edk2.groups.io > Cc: Brijesh Singh ; Ard Biesheuvel > ; Dong, Eric ; Justen, > Jordan L ; Laszlo Ersek ; > Gao, Liming ; Kinney, Michael D > ; Ni, Ray ; Wang, Jian J > ; Wu, Hao A > Subject: [edk2-devel] [PATCH v13 01/46] MdeModulePkg: Create PCDs to be > used in support of SEV-ES > > From: Tom Lendacky > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 > > Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under > OVMF: > - PcdGhcbBase: UINT64 value that is the base address of the GHCB >allocation. > - PcdGhcbSize: UINT64 value that is the size, in bytes, of the >GHCB allocation (size is dependent on the number of >APs). > > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Tom Lendacky > --- > MdeModulePkg/MdeModulePkg.dec | 9 + > MdeModulePkg/MdeModulePkg.uni | 8 > 2 files changed, 17 insertions(+) > > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec index d7572eedd18c..882f3fb28506 > 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -2063,6 +2063,15 @@ [PcdsDynamic, PcdsDynamicEx] ># @Prompt If there is any test key used by the platform. > > gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00 > 030003 > > + ## This dynamic PCD holds the base address of the GHCB pool allocation. Could you help to use the full name 'Guest-Hypervisor Communication Block' for GHCB in the above description for PcdGhcbBase? For PcdGhcbSize, similar comment applies. > + # @Prompt GHCB Pool Base Address > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030007 > + > + ## This dynamic PCD holds the total size of the GHCB pool allocation. > + # The amount of memory allocated for GHCBs is dependent on the > number of APs. > + # @Prompt GHCB Pool Size > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize|0|UINT64|0x00030008 > + > [PcdsDynamicEx] >## This dynamic PCD enables the default variable setting. ># Its value is the default store ID value. The default value is zero as > Standard default. > diff --git a/MdeModulePkg/MdeModulePkg.uni > b/MdeModulePkg/MdeModulePkg.uni index 5235dee561ad..1d2a50e23623 > 100644 > --- a/MdeModulePkg/MdeModulePkg.uni > +++ b/MdeModulePkg/MdeModulePkg.uni > @@ -1303,3 +1303,11 @@ > #string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_P > ROMPT #language en-US "TCG Platform Firmware Profile revision" > > #string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_ > HELP #language en-US "Indicates which TCG Platform Firmware Profile > revision the EDKII firmware follows." > + > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_PROMPT > #language en-US "GHCB Pool Base Address" Similarly, could you help to use the full name for GHCB for the above description for PcdGhcbBase in UNI file? Same applies for PcdGhcbSize as well. Best Regards, Hao Wu > + > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_HELP > #language en-US "Used with SEV-ES support to identify an address range that > is not to be encrypted." > + > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_PROMPT > #language en-US "GHCB Pool Base Size" > + > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_HELP > #language en-US "Used with SEV-ES support to identify the size of the > address range that is not to be encrypted." > -- > 2.27.0 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63649): https://edk2.groups.io/g/devel/message/63649 Mute This Topic: https://groups.io/mt/75892664/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch 6/6] ShellPkg: Fix spelling mistake for occurred
Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael D > Kinney > Sent: Saturday, August 1, 2020 9:05 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Zhichao > Subject: [edk2-devel] [Patch 6/6] ShellPkg: Fix spelling mistake for occurred > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2361 > > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Michael D Kinney > --- > ShellPkg/Include/Library/ShellLib.h | 4 +- > .../UefiShellBcfgCommandLib.c | 4 +- > .../Edit/FileBuffer.c | 4 +- > .../Edit/MainTextEditor.c | 34 ++--- > .../Edit/MainTextEditor.h | 6 +-- > .../HexEdit/BufferImage.c | 8 ++-- > .../HexEdit/BufferImage.h | 6 +-- > .../HexEdit/Clipboard.c | 4 +- > .../HexEdit/Clipboard.h | 4 +- > .../HexEdit/DiskImage.c | 6 +-- > .../HexEdit/DiskImage.h | 6 +-- > .../HexEdit/FileImage.c | 4 +- > .../HexEdit/FileImage.h | 4 +- > .../HexEdit/MainHexEditor.c | 48 +-- > .../HexEdit/MainHexEditor.h | 8 ++-- > .../HexEdit/MemImage.c| 6 +-- > .../HexEdit/MemImage.h| 6 +-- > .../UefiShellDebug1CommandsLib/HexEdit/Misc.c | 8 ++-- > .../UefiShellDebug1CommandsLib/HexEdit/Misc.h | 4 +- > .../UefiShellDriver1CommandsLib/Drivers.c | 2 +- > .../Library/UefiShellLevel2CommandsLib/Rm.c | 2 +- > .../UefiShellLevel2CommandsLib.h | 2 +- > ShellPkg/Library/UefiShellLib/UefiShellLib.c | 6 +-- > 23 files changed, 93 insertions(+), 93 deletions(-) > > diff --git a/ShellPkg/Include/Library/ShellLib.h > b/ShellPkg/Include/Library/ShellLib.h > index 1dc41f2cc1..ed9b8f9105 100644 > --- a/ShellPkg/Include/Library/ShellLib.h > +++ b/ShellPkg/Include/Library/ShellLib.h > @@ -1034,7 +1034,7 @@ ShellIsFileInPath( >@param[in] String String representation of a number. > >@return The unsigned integer result of the conversion. > - @retval (UINTN)(-1) An error occured. > + @retval (UINTN)(-1) An error occurred. > **/ > UINTN > EFIAPI > @@ -1051,7 +1051,7 @@ ShellStrToUintn( >@param[in] String String representation of a number. > >@return The unsigned integer result of the conversion. > - @retval (UINTN)(-1) An error occured. > + @retval (UINTN)(-1) An error occurred. > **/ > UINTN > EFIAPI > diff --git > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > index f8bcaebe46..52d90e3c97 100644 > --- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > +++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > @@ -84,7 +84,7 @@ typedef struct { >@param[in] TargetThe target of the operation. > >@retval EFI_SUCCESS The data was sucessfully updated. > - @retval other A error occured. > + @retval other A error occurred. > **/ > EFI_STATUS > UpdateOptionalData( > @@ -170,7 +170,7 @@ UpdateOptionalData( >@param[in] BootIndex The boot option index to CRC. > >@retval EFI_SUCCESS The CRC was sucessfully returned. > - @retval other A error occured. > + @retval other A error occurred. > **/ > EFI_STATUS > GetBootOptionCrc( > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c > index c9814e400c..5659ec9810 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c > @@ -221,7 +221,7 @@ InternalEditorMiscLineRetreat ( > >0 : advance > <0 : retreat > > - @retval NULL An error occured. > + @retval NULL An error occurred. >@return The line after advance/retreat. > **/ > EFI_EDITOR_LINE * > @@ -2609,7 +2609,7 @@ RightCurrentScreen ( > >0 : advance > <0: retreat > > - @retval NULL An error occured. > + @retval NULL An error occurred. >@return The line after advance/retreat. > **/ > EFI_EDITOR_LINE * > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c > index df530f1119..a9423e0d10 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c > @@ -40,7 +40,7 @@ EFI_EDITOR_GLOBAL_EDITOR MainEditor; >Load a file from disk to editor > >@retval EFI_SUCCESS The operation was suc
Re: [edk2-devel] [Patch] MdeModulePkg/BdsDxe: Fix spelling mistake
Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: Kinney, Michael D > Sent: Saturday, August 1, 2020 9:11 AM > To: devel@edk2.groups.io > Cc: Gao, Zhichao ; Ni, Ray > Subject: [Patch] MdeModulePkg/BdsDxe: Fix spelling mistake > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2355 > > Cc: Zhichao Gao > Cc: Ray Ni > Signed-off-by: Michael D Kinney > --- > MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > index d387dbe7ac..83b773a2fa 100644 > --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > @@ -785,7 +785,7 @@ BdsEntry ( > >FilePath = FileDevicePath (NULL, EFI_REMOVABLE_MEDIA_FILE_NAME); >if (FilePath == NULL) { > -DEBUG ((DEBUG_ERROR, "Fail to allocate memory for defualt boot file path. > Unable to boot.\n")); > +DEBUG ((DEBUG_ERROR, "Fail to allocate memory for default boot file path. > Unable to boot.\n")); > CpuDeadLoop (); >} >Status = EfiBootManagerInitializeLoadOption ( > -- > 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63647): https://edk2.groups.io/g/devel/message/63647 Mute This Topic: https://groups.io/mt/75919320/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v13 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction
Reviewed-by: Liming Gao -Original Message- From: Tom Lendacky Sent: 2020年7月31日 2:43 To: devel@edk2.groups.io Cc: Brijesh Singh ; Ard Biesheuvel ; Dong, Eric ; Justen, Jordan L ; Laszlo Ersek ; Gao, Liming ; Kinney, Michael D ; Ni, Ray Subject: [PATCH v13 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a CPUID instruction requires the current value of the XCR0 register. In order to retrieve that value, the XGETBV instruction needs to be executed. Provide the necessary support to execute the XGETBV instruction. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Tom Lendacky --- MdePkg/Library/BaseLib/BaseLib.inf | 2 ++ MdePkg/Include/Library/BaseLib.h| 17 + MdePkg/Library/BaseLib/Ia32/XGetBv.nasm | 31 ++ MdePkg/Library/BaseLib/X64/XGetBv.nasm | 34 + 4 files changed, 84 insertions(+) create mode 100644 MdePkg/Library/BaseLib/Ia32/XGetBv.nasm create mode 100644 MdePkg/Library/BaseLib/X64/XGetBv.nasm diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf index c740a819cacf..3b93b5db8d24 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -183,6 +183,7 @@ [Sources.Ia32] Ia32/EnableCache.nasm| GCC Ia32/DisableCache.nasm| GCC Ia32/RdRand.nasm + Ia32/XGetBv.nasm Ia32/DivS64x64Remainder.c Ia32/InternalSwitchStack.c | MSFT @@ -315,6 +316,7 @@ [Sources.X64] X64/EnableDisableInterrupts.nasm X64/DisablePaging64.nasm X64/RdRand.nasm + X64/XGetBv.nasm ChkStkGcc.c | GCC [Sources.EBC] diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 8e7b87cbda4e..7edf0051a0a0 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -7831,6 +7831,23 @@ AsmLfence ( VOID ); +/** + Executes a XGETBV instruction + + Executes a XGETBV instruction. This function is only available on + IA-32 and x64. + + @param[in] IndexExtended control register index + + @return The current value of the extended control register +**/ +UINT64 +EFIAPI +AsmXGetBv ( + IN UINT32 Index + ); + + /** Patch the immediate operand of an IA32 or X64 instruction such that the byte, word, dword or qword operand is encoded at the end of the instruction's diff --git a/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm b/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm new file mode 100644 index ..9f7b03bbff35 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm @@ -0,0 +1,31 @@ +;-- + +; +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights +reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module +Name: +; +; XGetBv.Asm +; +; Abstract: +; +; AsmXgetBv function +; +; Notes: +; +;-- + + +SECTION .text + +;-- + +; UINT64 +; EFIAPI +; AsmXGetBv ( +; IN UINT32 Index +; ); +;-- + +global ASM_PFX(AsmXGetBv) +ASM_PFX(AsmXGetBv): +mov ecx, [esp + 4] +xgetbv +ret diff --git a/MdePkg/Library/BaseLib/X64/XGetBv.nasm b/MdePkg/Library/BaseLib/X64/XGetBv.nasm new file mode 100644 index ..09f3be8ae0a8 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/XGetBv.nasm @@ -0,0 +1,34 @@ +;-- + +; +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights +reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module +Name: +; +; XGetBv.Asm +; +; Abstract: +; +; AsmXgetBv function +; +; Notes: +; +;-- + + +DEFAULT REL +SECTION .text + +;-- + +; UINT64 +; EFIAPI +; AsmXGetBv ( +; IN UINT32 Index +; ); +;-- + +global ASM_PFX(AsmXGetBv) +ASM_PFX(AsmXGetBv): +xgetbv +shl rdx, 32 +or rax, rdx +ret + -- 2.27.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63646): https://edk2.groups.io/g/devel/message/63646 Mute This Topic: https://groups.io/mt/75892690/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v13 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction
Reviewed-by: Liming Gao -Original Message- From: devel@edk2.groups.io On Behalf Of Lendacky, Thomas Sent: 2020年7月31日 2:43 To: devel@edk2.groups.io Cc: Brijesh Singh ; Ard Biesheuvel ; Dong, Eric ; Justen, Jordan L ; Laszlo Ersek ; Gao, Liming ; Kinney, Michael D ; Ni, Ray Subject: [edk2-devel] [PATCH v13 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 VMGEXIT is a new instruction used for Hypervisor/Guest communication when running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to occur, resulting in a #VMEXIT with an exit code value of 0x403. Since SEV-ES is only supported in X64, provide the necessary X64 support to execute the VMGEXIT instruction, which is coded as "rep vmmcall". For IA32, since "vmmcall" is not supported in NASM 32-bit mode and VMGEXIT should never be called, provide a stub implementation that is identical to CpuBreakpoint(). Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Tom Lendacky --- MdePkg/Library/BaseLib/BaseLib.inf | 2 ++ MdePkg/Include/Library/BaseLib.h | 14 + MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 38 MdePkg/Library/BaseLib/X64/VmgExit.nasm | 32 4 files changed, 86 insertions(+) create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf index 3b93b5db8d24..3b85c56c3c03 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -184,6 +184,7 @@ [Sources.Ia32] Ia32/DisableCache.nasm| GCC Ia32/RdRand.nasm Ia32/XGetBv.nasm + Ia32/VmgExit.nasm Ia32/DivS64x64Remainder.c Ia32/InternalSwitchStack.c | MSFT @@ -317,6 +318,7 @@ [Sources.X64] X64/DisablePaging64.nasm X64/RdRand.nasm X64/XGetBv.nasm + X64/VmgExit.nasm ChkStkGcc.c | GCC [Sources.EBC] diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 7edf0051a0a0..04fb329eaabb 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -7848,6 +7848,20 @@ AsmXGetBv ( ); +/** + Executes a VMGEXIT instruction (VMMCALL with a REP prefix) + + Executes a VMGEXIT instruction. This function is only available on + IA-32 and x64. + +**/ +VOID +EFIAPI +AsmVmgExit ( + VOID + ); + + /** Patch the immediate operand of an IA32 or X64 instruction such that the byte, word, dword or qword operand is encoded at the end of the instruction's diff --git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm new file mode 100644 index ..69f7fbf3506a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm @@ -0,0 +1,38 @@ +;-- + +; +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights +reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module +Name: +; +; VmgExit.Asm +; +; Abstract: +; +; AsmVmgExit function +; +; Notes: +; +;-- + + +SECTION .text + +;-- + +; VOID +; EFIAPI +; AsmVmgExit ( +; VOID +; ); +;-- + +global ASM_PFX(AsmVmgExit) +ASM_PFX(AsmVmgExit): +; +; NASM doesn't support the vmmcall instruction in 32-bit mode and NASM +versions ; before 2.12 cannot translate the 64-bit "rep vmmcall" +instruction into elf32 ; format. Given that VMGEXIT does not make sense +on IA32, provide a stub ; implementation that is identical to +CpuBreakpoint(). In practice, AsmVmgExit() ; should never be called on IA32. +; +int 3 +ret + diff --git a/MdePkg/Library/BaseLib/X64/VmgExit.nasm b/MdePkg/Library/BaseLib/X64/VmgExit.nasm new file mode 100644 index ..26f034593c67 --- /dev/null +++ b/MdePkg/Library/BaseLib/X64/VmgExit.nasm @@ -0,0 +1,32 @@ +;-- + +; +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights +reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module +Name: +; +; VmgExit.Asm +; +; Abstract: +; +; AsmVmgExit function +; +; Notes: +; +;-- + + +DEFAULT REL +SECTION .text + +;-- + +; VOID +; EFIAPI +; AsmVmgExit ( +; VOID +; ); +;-- + +global ASM_PFX(AsmVmgExit) +ASM_PFX(AsmVmgExit): +rep vmmcall +ret + -- 2.27.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this gro
Re: [edk2-devel] [Patch 1/6] EmulatorPkg: Fix spelling mistake for occurred
Reviewed-by: Liming Gao -Original Message- From: devel@edk2.groups.io On Behalf Of Michael D Kinney Sent: 2020年8月1日 9:05 To: devel@edk2.groups.io Cc: Justen, Jordan L ; Andrew Fish ; Ni, Ray Subject: [edk2-devel] [Patch 1/6] EmulatorPkg: Fix spelling mistake for occurred REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2361 Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Signed-off-by: Michael D Kinney --- EmulatorPkg/EmuGopDxe/GopScreen.c | 2 +- EmulatorPkg/TimerDxe/Timer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c b/EmulatorPkg/EmuGopDxe/GopScreen.c index fbac649f8b..cbbb0db07f 100644 --- a/EmulatorPkg/EmuGopDxe/GopScreen.c +++ b/EmulatorPkg/EmuGopDxe/GopScreen.c @@ -177,7 +177,7 @@ EmuGopSetMode ( @retval EFI_SUCCESS The Blt operation completed. @retval EFI_INVALID_PARAMETER BltOperation is not valid. - @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer. + @retval EFI_DEVICE_ERROR A hardware error occurred writting to the video buffer. **/ EFI_STATUS diff --git a/EmulatorPkg/TimerDxe/Timer.c b/EmulatorPkg/TimerDxe/Timer.c index dfd92acc8c..8e2b5b 100644 --- a/EmulatorPkg/TimerDxe/Timer.c +++ b/EmulatorPkg/TimerDxe/Timer.c @@ -301,7 +301,7 @@ Returns: EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver. - EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver. + EFI_DEVICE_ERROR - A device error occurred attempting to initialize the driver. **/ { -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63644): https://edk2.groups.io/g/devel/message/63644 Mute This Topic: https://groups.io/mt/75919236/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch] BaseTools/GenSec: Fix spelling mistake
Reviewed-by: Liming Gao -Original Message- From: devel@edk2.groups.io On Behalf Of Michael D Kinney Sent: 2020年8月1日 9:25 To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming Subject: [edk2-devel] [Patch] BaseTools/GenSec: Fix spelling mistake REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2345 Cc: Bob Feng Cc: Liming Gao Signed-off-by: Michael D Kinney --- BaseTools/Source/C/GenSec/GenSec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c index a0d6293ee1..d54a4f9e0a 100644 --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -177,7 +177,7 @@ Returns: fprintf (stdout, " -l GuidHeaderLength, --HeaderLength GuidHeaderLength\n\ GuidHeaderLength is the size of header of guided data\n"); fprintf (stdout, " -r GuidAttr, --attributes GuidAttr\n\ -GuidAttr is guid section atttributes, which may be\n\ +GuidAttr is guid section attributes, which may be\n\ PROCESSING_REQUIRED, AUTH_STATUS_VALID and NONE. \n\ if -r option is not given, default PROCESSING_REQUIRED\n"); fprintf (stdout, " -n String, --name String\n\ -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63643): https://edk2.groups.io/g/devel/message/63643 Mute This Topic: https://groups.io/mt/75919491/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch 3/6] MdePkg: Fix spelling mistake for occurred
Reviewed-by: Liming Gao -Original Message- From: devel@edk2.groups.io On Behalf Of Michael D Kinney Sent: 2020年8月1日 9:05 To: devel@edk2.groups.io Cc: Gao, Liming ; Liu, Zhiguang Subject: [edk2-devel] [Patch 3/6] MdePkg: Fix spelling mistake for occurred REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2361 Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Michael D Kinney --- MdePkg/Include/Protocol/UgaDraw.h | 2 +- MdePkg/Library/BaseLib/FilePaths.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Protocol/UgaDraw.h b/MdePkg/Include/Protocol/UgaDraw.h index 3d423be052..47286bb684 100644 --- a/MdePkg/Include/Protocol/UgaDraw.h +++ b/MdePkg/Include/Protocol/UgaDraw.h @@ -127,7 +127,7 @@ typedef enum { @retval EFI_SUCCESS - The Blt operation completed. @retval EFI_INVALID_PARAMETER - BltOperation is not valid. -@retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer. +@retval EFI_DEVICE_ERROR - A hardware error occurred writting to the video buffer. **/ typedef diff --git a/MdePkg/Library/BaseLib/FilePaths.c b/MdePkg/Library/BaseLib/FilePaths.c index 40e8d773ce..c2c561ac64 100644 --- a/MdePkg/Library/BaseLib/FilePaths.c +++ b/MdePkg/Library/BaseLib/FilePaths.c @@ -57,7 +57,7 @@ PathRemoveLastItem( @param[in] Path The pointer to the string containing the path. - @return Returns Path, otherwise returns NULL to indicate that an error has occured. + @return Returns Path, otherwise returns NULL to indicate that an error has occurred. **/ CHAR16* EFIAPI -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63642): https://edk2.groups.io/g/devel/message/63642 Mute This Topic: https://groups.io/mt/75919238/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [Patch] BaseTools: Improve the method of checking queue empty
From: "Feng, Bob C" Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2807 The Queue.empty() method is not reliable in the multiple process runtime environment. This patch uses a new method to check if all modules are processed and workers need to be stopped. That is to add a None item at the bottom of the queue. Worker check if it gets that None item to know if all the module is processed. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Lucy Yan --- .../Source/Python/AutoGen/AutoGenWorker.py| 26 ++- BaseTools/Source/Python/build/build.py| 3 ++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py index 563d91b421..017f676399 100755 --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py @@ -22,10 +22,11 @@ except: from Queue import Empty import traceback import sys from AutoGen.DataPipe import MemoryDataPipe import logging +import time def clearQ(q): try: while True: q.get_nowait() @@ -109,11 +110,15 @@ class AutoGenManager(threading.Thread): badnews = self.feedback_q.get() if badnews is None: break if badnews == "Done": fin_num += 1 +elif badnews == "QueueEmpty": +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), badnews)) +self.TerminateWorkers() else: +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), badnews)) self.Status = False self.TerminateWorkers() if fin_num == len(self.autogen_workers): self.clearQueue() for w in self.autogen_workers: @@ -225,16 +230,25 @@ class AutoGenWorkerInProcess(mp.Process): FfsCmd = {} GlobalData.FfsCmd = FfsCmd PlatformMetaFile = self.GetPlatformMetaFile(self.data_pipe.Get("P_Info").get("ActivePlatform"), self.data_pipe.Get("P_Info").get("WorkspaceDir")) while True: -if self.module_queue.empty(): -break if self.error_event.is_set(): break module_count += 1 - module_file,module_root,module_path,module_basename,module_originalpath,module_arch,IsLib = self.module_queue.get_nowait() +try: + module_file,module_root,module_path,module_basename,module_originalpath,module_arch,IsLib = self.module_queue.get_nowait() +except Empty: +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), "Fake Empty.")) +time.sleep(0.01) +continue +if module_file is None: +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), "Worker get the last item in the queue.")) +self.feedback_q.put("QueueEmpty") +time.sleep(0.01) +continue + modulefullpath = os.path.join(module_root,module_file) taskname = " : ".join((modulefullpath,module_arch)) module_metafile = PathClass(module_file,module_root) if module_path: module_metafile.Path = module_path @@ -278,15 +292,15 @@ class AutoGenWorkerInProcess(mp.Process): self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, "MakeCache", True)) continue else: self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, "MakeCache", False)) -except Empty: -pass -except: +except Exception as e: +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), str(e))) self.feedback_q.put(taskname) finally: +EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % (os.getpid(), "Done")) self.feedback_q.put("Done") self.cache_q.put("CacheDone") def printStatus(self): print("Processs ID: %d Run %d modules in AutoGen " % (os.getpid(),len(AutoGen.Cache( diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 1ab1e60a64..59ceacfed0 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1215,11 +1215,11 @@ class Build(): if Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']: # for target which must generate AutoGen code and makefile mqueue = mp.Queue() for m in AutoGenObject.GetAllModuleInfo: mqueue.put(m) - +
Re: [edk2-devel] [Patch 0/6] Fix spelling mistake for occurred
Reviewed-by: Guomin Jiang for the patch series Thanks for your contribution. > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > D Kinney > Sent: Saturday, August 1, 2020 9:05 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Zhichao ; > Justen, Jordan L ; Andrew Fish > ; Wang, Jian J ; Wu, Hao A > ; Gao, Liming ; Liu, Zhiguang > ; Laszlo Ersek ; Ard > Biesheuvel ; Zhang, Qi1 ; > Kumar, Rahul1 > Subject: [edk2-devel] [Patch 0/6] Fix spelling mistake for occurred > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2361 > > Cc: Ray Ni > Cc: Zhichao Gao > Cc: Jordan Justen > Cc: Andrew Fish > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Qi Zhang > Cc: Rahul Kumar > Signed-off-by: Michael D Kinney > > Michael D Kinney (6): > EmulatorPkg: Fix spelling mistake for occurred > MdeModulePkg: Fix spelling mistake for occurred > MdePkg: Fix spelling mistake for occurred > OvmfPkg: Fix spelling mistake for occurred > SecurityPkg: Fix spelling mistake for occurred > ShellPkg: Fix spelling mistake for occurred > > EmulatorPkg/EmuGopDxe/GopScreen.c | 2 +- > EmulatorPkg/TimerDxe/Timer.c | 2 +- > MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c | 4 +- > MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 2 +- > .../Include/Protocol/GenericMemoryTest.h | 4 +- > .../Acpi/S3SaveStateDxe/S3SaveState.c | 2 +- > .../Acpi/SmmS3SaveState/SmmS3SaveState.c | 2 +- > .../Console/ConSplitterDxe/ConSplitter.h | 4 +- > .../ConSplitterDxe/ConSplitterGraphics.c | 4 +- > .../Universal/DebugPortDxe/DebugPort.c| 2 +- > .../Universal/DebugPortDxe/DebugPort.h| 2 +- > .../FvSimpleFileSystem.c | 2 +- > .../Universal/LoadFileOnFv2/LoadFileOnFv2.c | 2 +- > .../GenericMemoryTestDxe/LightMemoryTest.c| 4 +- > .../GenericMemoryTestDxe/LightMemoryTest.h| 4 +- > MdePkg/Include/Protocol/UgaDraw.h | 2 +- > MdePkg/Library/BaseLib/FilePaths.c| 2 +- > OvmfPkg/Bhyve/BhyveRfbDxe/GopScreen.c | 2 +- > OvmfPkg/Include/Protocol/Legacy8259.h | 2 +- > OvmfPkg/SioBusDxe/SioService.c| 2 +- > .../DxeImageVerificationLib.c | 2 +- > ShellPkg/Include/Library/ShellLib.h | 4 +- > .../UefiShellBcfgCommandLib.c | 4 +- > .../Edit/FileBuffer.c | 4 +- > .../Edit/MainTextEditor.c | 34 ++--- > .../Edit/MainTextEditor.h | 6 +-- > .../HexEdit/BufferImage.c | 8 ++-- > .../HexEdit/BufferImage.h | 6 +-- > .../HexEdit/Clipboard.c | 4 +- > .../HexEdit/Clipboard.h | 4 +- > .../HexEdit/DiskImage.c | 6 +-- > .../HexEdit/DiskImage.h | 6 +-- > .../HexEdit/FileImage.c | 4 +- > .../HexEdit/FileImage.h | 4 +- > .../HexEdit/MainHexEditor.c | 48 +-- > .../HexEdit/MainHexEditor.h | 8 ++-- > .../HexEdit/MemImage.c| 6 +-- > .../HexEdit/MemImage.h| 6 +-- > .../UefiShellDebug1CommandsLib/HexEdit/Misc.c | 8 ++-- > .../UefiShellDebug1CommandsLib/HexEdit/Misc.h | 4 +- > .../UefiShellDriver1CommandsLib/Drivers.c | 2 +- > .../Library/UefiShellLevel2CommandsLib/Rm.c | 2 +- > .../UefiShellLevel2CommandsLib.h | 2 +- > ShellPkg/Library/UefiShellLib/UefiShellLib.c | 6 +-- > 44 files changed, 120 insertions(+), 120 deletions(-) > > -- > 2.21.0.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63640): https://edk2.groups.io/g/devel/message/63640 Mute This Topic: https://groups.io/mt/75919234/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch] MdeModulePkg/CapsuleApp: Fix spelling mistake
Reviewed-by: Guomin Jiang Thanks for your contribution > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > D Kinney > Sent: Saturday, August 1, 2020 8:34 AM > To: devel@edk2.groups.io > Cc: Wu, Hao A ; Gao, Liming > Subject: [edk2-devel] [Patch] MdeModulePkg/CapsuleApp: Fix spelling > mistake > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2356 > > Cc: Hao A Wu > Cc: Liming Gao > Signed-off-by: Michael D Kinney > --- > MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c > b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c > index b161d1a981..dba50b3202 100644 > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c > @@ -795,7 +795,7 @@ ProcessCapsuleOnDisk ( > >Status = GetUpdateFileSystem (Map, &BootNext, &Fs, &UpdateBootNext); >if (EFI_ERROR (Status)) { > -Print (L"CapsuleApp: cannot find a valid file system on boot devies. > Status > = %r\n", Status); > +Print (L"CapsuleApp: cannot find a valid file system on boot devices. > Status = %r\n", Status); > return Status; >} > > -- > 2.21.0.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63639): https://edk2.groups.io/g/devel/message/63639 Mute This Topic: https://groups.io/mt/75918896/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v13 45/46] UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS use
On 8/1/20 12:31 PM, Laszlo Ersek wrote: On 07/31/20 23:38, Laszlo Ersek wrote: On 07/31/20 16:47, Tom Lendacky wrote: On 7/31/20 9:44 AM, Tom Lendacky wrote: On 7/31/20 8:36 AM, Tom Lendacky wrote: On 7/31/20 7:43 AM, Laszlo Ersek wrote: Hi Tom, Hi Laszlo, Hi Laszlo, Can you try this incremental patch to see if it fixes the issue you're seeing? If it does, I'll merge it into patch #45 and send out a v14. Looking at the formatting, I'm not sure if Thunderbird messed up the diff. I'll send you another copy directly to you using git send-email just in case. I got the separate copy; I'll report back sometime next week. The update works fine; IA32 OVMF boots OK with it. Thanks for testing so quickly, Laszlo! I agree with squashing the update into patch #45, but before sending v14, maybe we should get some feedback for the MdeModulePkg patches too, at long last. :/ Yup, I'll hold off on sending v14. Thanks, Tom Thanks! Laszlo diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c index 7165bcf3124a..2c00d72ddefe 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -365,9 +365,9 @@ RelocateApLoop ( MwaitSupport, CpuMpData->ApTargetCState, CpuMpData->PmCodeSegment, - CpuMpData->Pm16CodeSegment, StackStart - ProcessorNumber * AP_SAFE_STACK_SIZE, (UINTN) &mNumberToFinish, + CpuMpData->Pm16CodeSegment, CpuMpData->SevEsAPBuffer, CpuMpData->WakeupBuffer ); diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm index 309d53bf3b37..7e81d24aa60f 100644 --- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm +++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm @@ -226,7 +226,10 @@ SwitchToRealProcStart: SwitchToRealProcEnd: ;- -; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, TopOfApStack, CountTofinish); +; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, TopOfApStack, CountTofinish, Pm16CodeSegment, SevEsAPJumpTable, WakeupBuffer); +; +; The last three parameters (Pm16CodeSegment, SevEsAPJumpTable and WakeupBuffer) are +; specific to SEV-ES support and are not applicable on IA32. ;- global ASM_PFX(AsmRelocateApLoop) ASM_PFX(AsmRelocateApLoop): diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h index 267aa5201c50..02652eaae126 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -350,9 +350,9 @@ VOID IN BOOLEAN MwaitSupport, IN UINTN ApTargetCState, IN UINTN PmCodeSegment, - IN UINTN Pm16CodeSegment, IN UINTN TopOfApStack, IN UINTN NumberToFinish, + IN UINTN Pm16CodeSegment, IN UINTN SevEsAPJumpTable, IN UINTN WakeupBuffer ); diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm index 3b8ec477b8b3..5d30f35b201c 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm @@ -491,13 +491,13 @@ PM16Mode: SwitchToRealProcEnd: ;- -; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, Pm16CodeSegment, TopOfApStack, CountTofinish, SevEsAPJumpTable, WakeupBuffer); +; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, TopOfApStack, CountTofinish, Pm16CodeSegment, SevEsAPJumpTable, WakeupBuffer); ;- global ASM_PFX(AsmRelocateApLoop) ASM_PFX(AsmRelocateApLoop): AsmRelocateApLoopStart: BITS 64 - cmp qword [rsp + 56], 0 + cmp qword [rsp + 56], 0 ; SevEsAPJumpTable je NoSevEs ; @@ -539,16 +539,17 @@ BITS 64 NoSevEs: cli ; Disable interrupt before switching to 32-bit mode - mov rax, [rsp + 48] ; CountTofinish + mov rax, [rsp + 40] ; CountTofinish lock dec dword [rax] ; (*CountTofinish)-- + mov r10, [rsp + 48] ; Pm16CodeSegment mov rax, [rsp + 56] ; SevEsAPJumpTable mov rbx, [rsp + 64] ; WakeupBuffer - mov rsp, [rsp + 40] ; TopOfApStack + mov rsp, r9 ; TopOfApStack push rax ; Save SevEsAPJumpTable push rbx ; Save WakeupBuffer - push r9 ; Save Pm16C
Re: [edk2-devel] [PATCH 9/9] SecurityPkg/HashLib: add API HashFinal
If you want to add one API for a library class, we need add implementation for all library instances. Here the DXE version should also be updated to add such capability. > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Zhang, Qi1 ; Yao, Jiewen ; > Wang, Jian J > Subject: [PATCH 9/9] SecurityPkg/HashLib: add API HashFinal > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Qi Zhang > Signed-off-by: Qi Zhang > --- > SecurityPkg/Include/Library/HashLib.h | 15 ++ > .../HashLibBaseCryptoRouterPei.c | 48 +++ > 2 files changed, 63 insertions(+) > > diff --git a/SecurityPkg/Include/Library/HashLib.h > b/SecurityPkg/Include/Library/HashLib.h > index 6ad960ad70..e2d9a62a1d 100644 > --- a/SecurityPkg/Include/Library/HashLib.h > +++ b/SecurityPkg/Include/Library/HashLib.h > @@ -47,6 +47,21 @@ HashUpdate ( >IN UINTN DataToHashLen > >); > > > > +/** > > + Hash sequence complete and extend to PCR. > > + > > + @param HashHandleHash handle. > > + @param DigestListDigest list. > > + > > + @retval EFI_SUCCESS Hash sequence complete and DigestList is returned. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +HashFinal ( > > + IN HASH_HANDLE HashHandle, > > + OUT TPML_DIGEST_VALUES *DigestList > > + ); > > + > > /** > >Hash sequence complete and extend to PCR. > > > > diff --git > a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > index 42cb562f67..5b9719630d 100644 > --- > a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > +++ > b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > @@ -208,6 +208,54 @@ HashUpdate ( >return EFI_SUCCESS; > > } > > > > +/** > > + Hash sequence complete and extend to PCR. > > + > > + @param HashHandleHash handle. > > + @param DigestListDigest list. > > + > > + @retval EFI_SUCCESS Hash sequence complete and DigestList is returned. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +HashFinal ( > > + IN HASH_HANDLE HashHandle, > > + OUT TPML_DIGEST_VALUES *DigestList > > + ) > > +{ > > + TPML_DIGEST_VALUES Digest; > > + HASH_INTERFACE_HOB *HashInterfaceHob; > > + HASH_HANDLE*HashCtx; > > + UINTN Index; > > + UINT32 HashMask; > > + > > + HashInterfaceHob = InternalGetHashInterfaceHob (&gEfiCallerIdGuid); > > + if (HashInterfaceHob == NULL) { > > +return EFI_UNSUPPORTED; > > + } > > + > > + if (HashInterfaceHob->HashInterfaceCount == 0) { > > +return EFI_UNSUPPORTED; > > + } > > + > > + CheckSupportedHashMaskMismatch (HashInterfaceHob); > > + > > + HashCtx = (HASH_HANDLE *)HashHandle; > > + ZeroMem (DigestList, sizeof(*DigestList)); > > + > > + for (Index = 0; Index < HashInterfaceHob->HashInterfaceCount; Index++) { > > +HashMask = Tpm2GetHashMaskFromAlgo (&HashInterfaceHob- > >HashInterface[Index].HashGuid); > > +if ((HashMask & PcdGet32 (PcdTpm2HashMask)) != 0) { > > + HashInterfaceHob->HashInterface[Index].HashFinal (HashCtx[Index], > &Digest); > > + Tpm2SetHashToDigestList (DigestList, &Digest); > > +} > > + } > > + > > + FreePool (HashCtx); > > + > > + return EFI_SUCCESS; > > +} > > + > > /** > >Hash sequence complete and extend to PCR. > > > > -- > 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63637): https://edk2.groups.io/g/devel/message/63637 Mute This Topic: https://groups.io/mt/75903688/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 7/9] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add FspBin measurement.
Please remove FSP_MEASURE_FSPUPD check here. It should be checked in FspMeasurementLib. Thank you Yao Jiewen > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Chiu, Chasel ; > Desimone, Nathaniel L ; Zeng, Star > ; Zhang, Qi1 > Subject: [PATCH 7/9] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add FspBin > measurement. > > From: Jiewen Yao > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jiewen Yao > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../FspmWrapperPeim/FspmWrapperPeim.c | 115 +- > .../FspmWrapperPeim/FspmWrapperPeim.inf | 20 ++- > .../FspsWrapperPeim/FspsWrapperPeim.c | 96 ++- > .../FspsWrapperPeim/FspsWrapperPeim.inf | 27 ++-- > 4 files changed, 239 insertions(+), 19 deletions(-) > > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index 265b77ed60..1533971d7f 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -3,7 +3,7 @@ >register TemporaryRamDonePpi to call TempRamExit API, and register > MemoryDiscoveredPpi > >notify to call FspSiliconInit API. > > > > - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved. > > + Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved. > >SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -25,11 +25,14 @@ > #include > > #include > > #include > > +#include > > > > #include > > #include > > #include > > #include > > +#include > > +#include > > #include > > #include > > #include > > @@ -147,7 +150,21 @@ FspmWrapperInit ( >VOID > >) > > { > > - EFI_STATUS Status; > > + EFI_STATUSStatus; > > + EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI > *MeasurementExcludedFvPpi; > > + EFI_PEI_PPI_DESCRIPTOR > *MeasurementExcludedPpiList; > > + > > + MeasurementExcludedFvPpi = AllocatePool > (sizeof(*MeasurementExcludedFvPpi)); > > + ASSERT(MeasurementExcludedFvPpi != NULL); > > + MeasurementExcludedFvPpi->Count = 1; > > + MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32 (PcdFspmBaseAddress); > > + MeasurementExcludedFvPpi->Fv[0].FvLength = > ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFspmBaseAddress))->FvLength; > > + > > + MeasurementExcludedPpiList = AllocatePool > (sizeof(*MeasurementExcludedPpiList)); > > + ASSERT(MeasurementExcludedPpiList != NULL); > > + MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; > > + MeasurementExcludedPpiList->Guid = > &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid; > > + MeasurementExcludedPpiList->Ppi = MeasurementExcludedFvPpi; > > > >Status = EFI_SUCCESS; > > > > @@ -155,6 +172,9 @@ FspmWrapperInit ( > Status = PeiFspMemoryInit (); > > ASSERT_EFI_ERROR (Status); > >} else { > > +Status = PeiServicesInstallPpi (MeasurementExcludedPpiList); > > +ASSERT_EFI_ERROR (Status); > > + > > PeiServicesInstallFvInfoPpi ( > >NULL, > >(VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress), > > @@ -167,6 +187,92 @@ FspmWrapperInit ( >return Status; > > } > > > > +/** > > + This function is called after TCG installed PPI. > > + > > + @param[in] PeiServicesPointer to PEI Services Table. > > + @param[in] NotifyDesc Pointer to the descriptor for the Notification > event > that > > +caused this function to execute. > > + @param[in] PpiPointer to the PPI data associated with this > function. > > + > > + @retval EFI_STATUSAlways return EFI_SUCCESS > > +**/ > > +EFI_STATUS > > +EFIAPI > > +TcgPpiNotify ( > > + IN EFI_PEI_SERVICES **PeiServices, > > + IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, > > + IN VOID *Ppi > > + ); > > + > > +EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = { > > + (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > > + &gEdkiiTcgPpiGuid, > > + TcgPpiNotify > > +}; > > + > > +/** > > + This function is called after TCG installed PPI. > > + > > + @param[in] PeiServicesPointer to PEI Services Table. > > + @param[in] NotifyDesc Pointer to the descriptor for the Notification > event > that > > +caused this function to execute. > > + @param[in] PpiPointer to the PPI data associated with this > function. > > + > > + @retval EFI_STATUSAlways return EFI_SUCCESS > > +**/ > > +EFI_STATUS > > +EFIAPI > > +TcgPpiNotify ( > > + IN EFI_PEI_SERVICES **PeiServic
Re: [edk2-devel] [PATCH 6/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add BaseFspMeasurementLib.
Please implement MeasureFspFirmwareBlobWithCfg() directly here. MeasureFspFirmwareBlobWithCfg () should be an internal function. MeasureFspFirmwareBlob() may call MeasureFspFirmwareBlobWithCfg() based upon PCD. MeasureFirmwareBlobWithCfg() should not be used because it should not exist. Thank you Yao Jiewen > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Chiu, Chasel ; > Desimone, Nathaniel L ; Zeng, Star > ; Zhang, Qi1 > Subject: [PATCH 6/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add > BaseFspMeasurementLib. > > From: Jiewen Yao > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jiewen Yao > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../BaseFspMeasurementLib.inf | 37 ++ > .../BaseFspMeasurementLib/FspMeasurementLib.c | 70 +++ > 2 files changed, 107 insertions(+) > create mode 100644 > IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurementLi > b.inf > create mode 100644 > IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c > > diff --git > a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurement > Lib.inf > b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurement > Lib.inf > new file mode 100644 > index 00..2539164e40 > --- /dev/null > +++ > b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurement > Lib.inf > @@ -0,0 +1,37 @@ > +## @file > > +# Provides FSP measurement functions. > > +# > > +# This library provides MeasureFspFirmwareBlob() to measure FSP binary. > > +# > > +# Copyright (c) 2020, Intel Corporation. All rights reserved. > > +# SPDX-License-Identifier: BSD-2-Clause-Patent > > +# > > +## > > + > > +[Defines] > > + INF_VERSION= 0x00010005 > > + BASE_NAME = FspMeasurementLib > > + FILE_GUID = 9A62C49D-C45A-4322-9F3C-45958DF0056B > > + MODULE_TYPE= BASE > > + VERSION_STRING = 1.0 > > + LIBRARY_CLASS = FspMeasurementLib > > + > > +# > > +# The following information is for reference only and not required by the > build > tools. > > +# > > +# VALID_ARCHITECTURES = IA32 X64 > > +# > > + > > +[Sources] > > + FspMeasurementLib.c > > + > > +[Packages] > > + MdePkg/MdePkg.dec > > + MdeModulePkg/MdeModulePkg.dec > > + IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec > > + > > +[LibraryClasses] > > + BaseLib > > + BaseMemoryLib > > + DebugLib > > + TpmMeasurementLib > > diff --git > a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c > b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c > new file mode 100644 > index 00..8a33fe97c0 > --- /dev/null > +++ > b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c > @@ -0,0 +1,70 @@ > +/** @file > > + This library is used by FSP modules to measure data to TPM. > > + > > +Copyright (c) 2020, Intel Corporation. All rights reserved. > > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > + > > +/** > > + Mesure a FSP FirmwareBlob. > > + > > + @param[in] PcrIndexPCR Index. > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureFspFirmwareBlob ( > > + IN UINT32 PcrIndex, > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, > > + IN UINT64 FirmwareBlobLength > > + ) > > +{ > > + return MeasureFirmwareBlob (PcrIndex, Description, FirmwareBlobBase, > FirmwareBlobLength); > > +} > > + > > +/** > > + Mesure a FSP FirmwareBlob. > > + > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + @param[in] CfgRegionOffset Configuration region offset in bytes. > > + @param[in] CfgRegionSize Configuration region in bytes. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not
Re: [edk2-devel] [PATCH 4/9] SecurityPkg/PeiTpmMeasurementLib: Add new API.
Please remove MeasureFirmwareBlobWithCfg() API here. > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J ; > Zhang, Qi1 > Subject: [PATCH 4/9] SecurityPkg/PeiTpmMeasurementLib: Add new API. > > From: Jiewen Yao > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../PeiTpmMeasurementLib/EventLogRecord.c | 409 ++ > .../PeiTpmMeasurementLib.inf | 5 + > 2 files changed, 414 insertions(+) > create mode 100644 > SecurityPkg/Library/PeiTpmMeasurementLib/EventLogRecord.c > > diff --git a/SecurityPkg/Library/PeiTpmMeasurementLib/EventLogRecord.c > b/SecurityPkg/Library/PeiTpmMeasurementLib/EventLogRecord.c > new file mode 100644 > index 00..bd3d7000a1 > --- /dev/null > +++ b/SecurityPkg/Library/PeiTpmMeasurementLib/EventLogRecord.c > @@ -0,0 +1,409 @@ > +/** @file > > + This library is used by other modules to measure data to TPM. > > + > > +Copyright (c) 2020, Intel Corporation. All rights reserved. > > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > + > > +#pragma pack (1) > > + > > +#define PLATFORM_FIRMWARE_BLOB_DESC "Fv(---- > )" > > +typedef struct { > > + UINT8 BlobDescriptionSize; > > + UINT8 > BlobDescription[sizeof(PLATFORM_FIRMWARE_BLOB_DESC)]; > > + EFI_PHYSICAL_ADDRESS BlobBase; > > + UINT64BlobLength; > > +} PLATFORM_FIRMWARE_BLOB2_STRUCT; > > + > > +#define HANDOFF_TABLE_POINTER_DESC "1234567890ABCDEF" > > +typedef struct { > > + UINT8 TableDescriptionSize; > > + UINT8 > TableDescription[sizeof(HANDOFF_TABLE_POINTER_DESC)]; > > + UINT64NumberOfTables; > > + EFI_CONFIGURATION_TABLE TableEntry[1]; > > +} HANDOFF_TABLE_POINTERS2_STRUCT; > > + > > +#pragma pack () > > + > > +/** > > + Tpm measure and log data, and extend the measurement result into a specific > PCR. > > + > > + @param[in] PcrIndex PCR Index. > > + @param[in] EventTypeEvent type. > > + @param[in] EventLog Measurement event log. > > + @param[in] LogLen Event log length in bytes. > > + @param[in] HashData The start of the data buffer to be hashed, > extended. > > + @param[in] HashDataLen The length, in bytes, of the buffer > referenced by > HashData > > + @param[in] FlagsBitmap providing additional information. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +TpmMeasureAndLogDataWithFlags ( > > + IN UINT32 PcrIndex, > > + IN UINT32 EventType, > > + IN VOID *EventLog, > > + IN UINT32 LogLen, > > + IN VOID *HashData, > > + IN UINT64 HashDataLen, > > + IN UINT64 Flags > > + ) > > +{ > > + EFI_STATUSStatus; > > + EDKII_TCG_PPI *TcgPpi; > > + TCG_PCR_EVENT_HDR TcgEventHdr; > > + > > + Status = PeiServicesLocatePpi( > > + &gEdkiiTcgPpiGuid, > > + 0, > > + NULL, > > + (VOID**)&TcgPpi > > + ); > > + if (EFI_ERROR(Status)) { > > +return Status; > > + } > > + > > + TcgEventHdr.PCRIndex = PcrIndex; > > + TcgEventHdr.EventType = EventType; > > + TcgEventHdr.EventSize = LogLen; > > + > > + Status = TcgPpi->HashLogExtendEvent ( > > + TcgPpi, > > + Flags, > > + HashData, > > + (UINTN)HashDataLen, > > + &TcgEventHdr, > > + EventLog > > + ); > > + return Status; > > +} > > + > > +/** > > + Get the FvName from the FV header. > > + > > + Causion: The FV is untrusted input. > > + > > + @param[in] FvBaseBase address of FV image. > > + @param[in] FvLength Length of FV image. > > + > > + @return FvName pointer > > + @retval NULL FvName is NOT found > > +**/ > > +VOID * > > +TpmMeasurementGetFvName ( > > + IN EFI_PHYSICAL_ADDRESS FvBase, > > + IN UINT64 FvLength > > + ) > > +{ > > + EFI_FIRMWARE_VOLUME_HEADER *FvHeader; > > + EFI_FIRMWARE_VOLUME_EXT_HEADER *F
Re: [edk2-devel] [PATCH 5/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add header file.
Hi Qi We should hide MeasureFspFirmwareBlobWithCfg() as an internal function. The MeasureFspFirmwareBlob() should decide hash FV with or without CFG based upon PCD. > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:55 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Chiu, Chasel ; > Desimone, Nathaniel L ; Zeng, Star > ; Zhang, Qi1 > Subject: [PATCH 5/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add header file. > > From: Jiewen Yao > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jiewen Yao > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../Include/Library/FspMeasurementLib.h | 65 +++ > 1 file changed, 65 insertions(+) > create mode 100644 > IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > > diff --git a/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > new file mode 100644 > index 00..ca02ecdf1f > --- /dev/null > +++ b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h > @@ -0,0 +1,65 @@ > +/** @file > > + This library is used by FSP modules to measure data to TPM. > > + > > +Copyright (c) 2020, Intel Corporation. All rights reserved. > > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef _FSP_MEASUREMENT_LIB_H_ > > +#define _FSP_MEASUREMENT_LIB_H_ > > + > > +#define FSP_MEASURE_FSP BIT0 > > +#define FSP_MEASURE_FSPT BIT1 > > +#define FSP_MEASURE_FSPM BIT2 > > +#define FSP_MEASURE_FSPS BIT3 > > +#define FSP_MEASURE_FSPUPDBIT31 > > + > > +/** > > + Mesure a FSP FirmwareBlob. > > + > > + @param[in] PcrIndexPCR Index. > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureFspFirmwareBlob ( > > + IN UINT32 PcrIndex, > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, > > + IN UINT64 FirmwareBlobLength > > + ); > > + > > +/** > > + Mesure a FSP FirmwareBlob. > > + > > + @param[in] PcrIndexPCR Index. > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + @param[in] CfgRegionOffset Configuration region offset in bytes. > > + @param[in] CfgRegionSize Configuration region in bytes. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureFspFirmwareBlobWithCfg ( > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, > > + IN UINT64 FirmwareBlobLength, > > + IN UINT32 CfgRegionOffset, > > + IN UINT32 CfgRegionSize > > + ); > > + > > +#endif > > -- > 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63633): https://edk2.groups.io/g/devel/message/63633 Mute This Topic: https://groups.io/mt/75903683/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to TpmMeasurmentLib.
Hi Qi The PEI FV does not have CfgRegion concept. We should remove MeasureFirmwareBlobWithCfg(). > -Original Message- > From: Zhang, Qi1 > Sent: Friday, July 31, 2020 4:54 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J ; > Wu, Hao A ; Zhang, Qi1 > Subject: [PATCH 1/9] MdeModulePkg/TpmMeasurementLib: Add new API to > TpmMeasurmentLib. > > From: Jiewen Yao > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376 > > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Qi Zhang > Signed-off-by: Jiewen Yao > --- > .../Include/Library/TpmMeasurementLib.h | 71 ++- > 1 file changed, 70 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Include/Library/TpmMeasurementLib.h > b/MdeModulePkg/Include/Library/TpmMeasurementLib.h > index ddf6723f03..cd4d175918 100644 > --- a/MdeModulePkg/Include/Library/TpmMeasurementLib.h > +++ b/MdeModulePkg/Include/Library/TpmMeasurementLib.h > @@ -1,7 +1,7 @@ > /** @file > >This library is used by other modules to measure data to TPM. > > > > -Copyright (c) 2012, Intel Corporation. All rights reserved. > > +Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved. > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -35,4 +35,73 @@ TpmMeasureAndLogData ( >IN UINT64 HashDataLen > >); > > > > +/** > > + Mesure a FirmwareBlob. > > + > > + @param[in] PcrIndexPCR Index. > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureFirmwareBlob ( > > + IN UINT32 PcrIndex, > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, > > + IN UINT64 FirmwareBlobLength > > + ); > > + > > +/** > > + Mesure a FirmwareBlob in separation mode of FV binary and configuration. > > + > > + @param[in] Descrption Description for this FirmwareBlob. > > + @param[in] FirmwareBlobBaseBase address of this FirmwareBlob. > > + @param[in] FirmwareBlobLength Size in bytes of this FirmwareBlob. > > + @param[in] CfgRegionOffset Configuration region offset in bytes. > > + @param[in] CfgRegionSize Configuration region in bytes. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureFirmwareBlobWithCfg ( > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, > > + IN UINT64 FirmwareBlobLength, > > + IN UINT32 CfgRegionOffset, > > + IN UINT32 CfgRegionSize > > + ); > > +/** > > + Mesure a HandoffTable. > > + > > + @param[in] PcrIndexPcrIndex of the measurment. > > + @param[in] Descrption Description for this HandoffTable. > > + @param[in] TableGuid GUID of this HandoffTable. > > + @param[in] TableAddressBase address of this HandoffTable. > > + @param[in] TableLength Size in bytes of this HandoffTable. > > + > > + @retval EFI_SUCCESS Operation completed successfully. > > + @retval EFI_UNSUPPORTED TPM device not available. > > + @retval EFI_OUT_OF_RESOURCES Out of memory. > > + @retval EFI_DEVICE_ERROR The operation was unsuccessful. > > +*/ > > +EFI_STATUS > > +EFIAPI > > +MeasureHandoffTable ( > > + IN UINT32 PcrIndex, > > + IN CHAR8 *Description OPTIONAL, > > + IN EFI_GUID *TableGuid, > > + IN VOID *TableAddress, > > + IN UINTN TableLength > > + ); > > + > > #endif > > -- > 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63632): https://edk2.groups.io/g/devel/message/63632 Mute This Topic: https://groups.io/mt/75903678/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-