From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.11342.1673002943055851289 for ; Fri, 06 Jan 2023 03:02:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TwjMyhcH; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673002942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3KRstuZ+SAEJodsqpZ5WWaOXNktTT9Q6jPGDSKlFhrs=; b=TwjMyhcH3OhRhnLX6V93rijuukijg9NIHOdLk8xQKh1g42l6s8+BcDQfBmfNQ2IDHTAm9u Qp6hmXLob0Opr+3tiDEqXxiV8EcOY26b90M4kJxx4aY4XecXSnJdejx2847BirSvFFzXmj HsFf2c1civETZZ6ILTwDnpbgKlm2/UE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-433-RHvOfqDzP-Sn9-9TvpDyfg-1; Fri, 06 Jan 2023 06:02:18 -0500 X-MC-Unique: RHvOfqDzP-Sn9-9TvpDyfg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F890811E9C; Fri, 6 Jan 2023 11:02:15 +0000 (UTC) Received: from [10.39.192.26] (unknown [10.39.192.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3A00140EBF5; Fri, 6 Jan 2023 11:02:11 +0000 (UTC) Message-ID: <5da2a432-e609-4c3a-1b65-048da876bf0b@redhat.com> Date: Fri, 6 Jan 2023 12:02:10 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v4 3/3] MdeModulePkg: Add new Application/MpServicesTest application To: devel@edk2.groups.io, ardb@kernel.org, Rebecca Cran Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Jian J Wang , Liming Gao , Tiger Liu References: <20230104153727.345236-1-rebecca@quicinc.com> <20230104153727.345236-4-rebecca@quicinc.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/6/23 10:40, Ard Biesheuvel wrote: > On Wed, 4 Jan 2023 at 16:37, Rebecca Cran wrote: >> >> The MpServicesTest application exercises the EFI_MP_SERVICES_PROTOCOL. >> >> usage: >> MpServicesTest -A [-O] >> MpServicesTest -T >> MpServicesTest -S >> MpServicesTest -P >> MpServicesTest -U >> MpServicesTest -W >> MpServicesTest -E >> MpServicesTest -D >> 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 > > Acked-by: Ard Biesheuvel > Tested-by: Ard Biesheuvel > > 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