[edk2-devel] [PATCH v4 3/3] MdeModulePkg: Add new Application/MpServicesTest application
Laszlo Ersek
lersek at redhat.com
Fri Jan 6 11:02:10 UTC 2023
On 1/6/23 10:40, Ard Biesheuvel wrote:
> On Wed, 4 Jan 2023 at 16:37, Rebecca Cran <rebecca at quicinc.com> wrote:
>>
>> The MpServicesTest application exercises the EFI_MP_SERVICES_PROTOCOL.
>>
>> usage:
>> MpServicesTest -A [-O]
>> MpServicesTest -T <Timeout>
>> MpServicesTest -S <Processor #>
>> MpServicesTest -P
>> MpServicesTest -U
>> MpServicesTest -W
>> MpServicesTest -E <Processor #>
>> MpServicesTest -D <Processor #>
>> MpServicesTest -h
>>
>> Parameter:
>> -A: Run all APs.
>> -O: Run APs sequentially (use with -A).
>> -T: Specify timeout in milliseconds. Default is to wait forever.
>> -S: Specify the single AP to run.
>> -P: Print processor information.
>> -U: Set the specified AP to the Unhealthy status (use with -E/-D).
>> -W: Run WhoAmI and print index of BSP.
>> -E: Enable the specified AP.
>> -D: Disable the specified AP.
>> -h: Print this help page.
>>
>> Signed-off-by: Rebecca Cran <rebecca at quicinc.com>
>
> Acked-by: Ard Biesheuvel <ardb at kernel.org>
> Tested-by: Ard Biesheuvel <ardb at kernel.org>
>
> However, I imagine this may violate some rules regarding dependencies
> between packages, so I defer to the maintainers to suggest a way
> forward here.
The application does not in fact need ShellLib. Squash this patch:
> diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
> index 6992b3ae8db6..24c9b3d5b4b3 100644
> --- a/MdeModulePkg/MdeModulePkg.dsc
> +++ b/MdeModulePkg/MdeModulePkg.dsc
> @@ -166,7 +166,6 @@ [LibraryClasses.common.UEFI_APPLICATION]
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
> FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> - ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
>
> [LibraryClasses.common.MM_STANDALONE]
> HobLib|MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.inf
> diff --git a/MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf b/MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf
> index 07ee4afec845..fb19e487c129 100644
> --- a/MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf
> +++ b/MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf
> @@ -31,10 +31,9 @@ [Packages]
>
> [LibraryClasses]
> BaseLib
> - ShellLib
> UefiApplicationEntryPoint
> UefiLib
>
> [Protocols]
> - gEfiMpServiceProtocolGuid ## CONSUMES
> -
> + gEfiMpServiceProtocolGuid ## CONSUMES
> + gEfiShellParametersProtocolGuid ## CONSUMES
The ShellLib dependency was incorrectly used for bringing in
"gEfiShellParametersProtocolGuid". But "gEfiShellParametersProtocolGuid"
is a standard protocol GUID, it is declared in "MdePkg/MdePkg.dec". So
you just need to spell it out in the [Protocols] section.
And then (IIUC) no invalid cross-Pkg dependency remains.
(The INF file was not right in the first place: the ShellLib class comes
from "ShellPkg/ShellPkg.dec", but that DEC file is not listed in the INF
file's [Packages] section.)
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98117): https://edk2.groups.io/g/devel/message/98117
Mute This Topic: https://groups.io/mt/96090579/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list