From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: Sam Kaynor <Sam.Kaynor@arm.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Ni, Ray" <ray.ni@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>
Subject: Re: [edk2-devel] [PATCH v5 3/3] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c
Date: Wed, 10 Apr 2024 05:10:48 +0000 [thread overview]
Message-ID: <PH7PR11MB637729F4711601373C6D1D6CF6062@PH7PR11MB6377.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240409185311.2868024-4-Sam.Kaynor@arm.com>
You cannot change across packages. You need to separate the MdePkg change into one single patch and get reviewed by the reviewer/maintainer of MdePkg.
Thanks,
Zhichao
> -----Original Message-----
> From: Sam Kaynor <Sam.Kaynor@arm.com>
> Sent: Wednesday, April 10, 2024 2:53 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>
> Subject: [PATCH v5 3/3] ShellPkg: UefiShellDebug1CommandsLib:
> Conformance Profiles in Dmem.c
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352
>
> Implemented dumping of the UEFI Conformance Profiles Table using
> Dmem.c Additionally added the base support for the table with new header
> file ConformanceProfiles.h (Cc'd maintainers of MdePkg for this)
>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com>
> Tested-by: Stuart Yoder <stuart.yoder@arm.com>
> Reviewed-by: Stuart Yoder <stuart.yoder@arm.com>
> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
>
> Notes:
> v5:
> - corrected style error (spaces before '(')
> v3:
> - fixed build errors
> - properly using Address variable
> - removed unecessary comment in header file
>
> MdePkg/MdePkg.dec | 5 ++
>
> ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands
> Lib.inf | 3 +
> MdePkg/Include/Guid/ConformanceProfiles.h | 56
> ++++++++++++++++
> ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 69
> ++++++++++++++++++++
>
> ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands
> Lib.uni | 5 ++
> 5 files changed, 138 insertions(+)
>
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> bf94549cbfbd..2c053a7459f3 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -746,6 +746,11 @@ [Guids]
> ## Include/Guid/DeviceAuthentication.h
> gEfiDeviceSignatureDatabaseGuid = { 0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a,
> 0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad }}
>
> + ## Include/Guid/ConformanceProfiles.h
> + gEfiConfProfilesTableGuid = { 0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 0x9b,
> 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
> + gEfiConfProfilesUefiSpecGuid = { 0x523c91af, 0xa195, 0x4382, { 0x81,
> 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
> + gEfiConfProfilesEbbrSpecGuid = { 0xcce33c35, 0x74ac, 0x4087, { 0xbc,
> 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
> +
> #
> # GUID defined in PI1.0
> #
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> index 3741dac5d94c..172ac2862ba1 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> d
> +++ sLib.inf
> @@ -139,3 +139,6 @@ [Guids]
> gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ##
> SystemTable
> gEfiJsonCapsuleDataTableGuid ## SOMETIMES_CONSUMES ##
> SystemTable
> gEfiJsonCapsuleResultTableGuid ## SOMETIMES_CONSUMES ##
> SystemTable
> + gEfiConfProfilesTableGuid ## SOMETIMES_CONSUMES ## SystemTable
> + gEfiConfProfilesUefiSpecGuid ## SOMETIMES_CONSUMES ## GUID
> + gEfiConfProfilesEbbrSpecGuid ## SOMETIMES_CONSUMES ## GUID
> diff --git a/MdePkg/Include/Guid/ConformanceProfiles.h
> b/MdePkg/Include/Guid/ConformanceProfiles.h
> new file mode 100644
> index 000000000000..c6211d63d79c
> --- /dev/null
> +++ b/MdePkg/Include/Guid/ConformanceProfiles.h
> @@ -0,0 +1,56 @@
> +/** @file
> + Legal information
> +
> +**/
> +
> +#ifndef __CONFORMANCE_PROFILES_TABLE_GUID_H__
> +#define __CONFORMANCE_PROFILES_TABLE_GUID_H__
> +
> +
> +//
> +// This table allows the platform to advertise its UEFI specification
> +conformance // in the form of pre-defined profiles. Each profile is
> +identified by a GUID, with // known profiles listed in the section below.
> +// The absence of this table shall indicate that the platform
> +implementation is // conformant with the UEFI specification requirements,
> as defined in Section 2.6.
> +// This is equivalent to publishing this configuration table with the
> +// EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID conformance profile.
> +//
> +#define EFI_CONFORMANCE_PROFILES_TABLE_GUID \
> + { \
> + 0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5,
> +0x0c, 0x0b } \
> + }
> +
> +#pragma pack(1)
> +
> +typedef struct {
> + ///
> + /// Version of the table must be 0x1
> + ///
> + UINT16 Version;
> + ///
> + /// The number of profiles GUIDs present in ConformanceProfiles
> + ///
> + UINT16 NumberOfProfiles;
> + ///
> + /// An array of conformance profile GUIDs that are supported by this
> system.
> + /// EFI_GUID ConformanceProfiles[];
> + ///
> +} EFI_CONFORMANCE_PROFILES_TABLE;
> +
> +#define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 0x1
> +
> +//
> +// GUID defined in spec.
> +//
> +#define EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID \
> + { 0x523c91af, 0xa195, 0x4382, \
> + { 0x81, 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }} #define
> +EFI_CONFORMANCE_PROFILE_EBBR_2_1_GUID \
> + { 0xcce33c35, 0x74ac, 0x4087, \
> + { 0xbc, 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
> +
> +extern EFI_GUID gEfiConfProfilesTableGuid; extern EFI_GUID
> +gEfiConfProfilesUefiSpecGuid;
> +
> +#endif
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> index a4f404c1cdbd..53ee2b01f918 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> @@ -19,6 +19,7 @@
> #include <Guid/SystemResourceTable.h>
> #include <Guid/DebugImageInfoTable.h>
> #include <Guid/ImageAuthentication.h>
> +#include <Guid/ConformanceProfiles.h>
>
> /**
> Make a printable character.
> @@ -269,7 +270,67 @@ DisplayImageExecutionEntries (
> return (ShellStatus);
> }
>
> +/**
> + Display the ConformanceProfileTable entries
>
> + @param[in] Address The pointer to the ConformanceProfileTable.
> +**/
> +SHELL_STATUS
> +DisplayConformanceProfiles (
> + IN UINT64 Address
> + )
> +{
> + SHELL_STATUS ShellStatus;
> + EFI_STATUS Status;
> + EFI_GUID *EntryGuid;
> + CHAR16 *GuidName;
> + EFI_CONFORMANCE_PROFILES_TABLE *ConfProfTable;
> +
> + ShellStatus = SHELL_SUCCESS;
> +
> + if (Address != 0) {
> + ConfProfTable = (EFI_CONFORMANCE_PROFILES_TABLE *)Address;
> +
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> + (STR_DMEM_CONF_PRO_TABLE), gShellDebug1HiiHandle);
> +
> + EntryGuid = (EFI_GUID *) (ConfProfTable + 1);
> +
> + for (int Profile = 0; Profile < ConfProfTable->NumberOfProfiles; Profile++,
> EntryGuid++) {
> + GuidName = L"Unknown_Profile";
> +
> + if (CompareGuid (EntryGuid, &gEfiConfProfilesEbbrSpecGuid)) {
> + GuidName = L"EBBR_2.1";
> + }
> +
> + Status = ShellPrintHiiEx (
> + -1,
> + -1,
> + NULL,
> + STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
> + gShellDebug1HiiHandle,
> + GuidName,
> + EntryGuid
> + );
> + }
> + if (EFI_ERROR (Status)) {
> + ShellStatus = SHELL_ABORTED;
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_DMEM_ERR_GET_FAIL), gShellDebug1HiiHandle,
> L"ComformanceProfilesTable");
> + }
> + } else {
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_DMEM_CONF_PRO_TABLE), gShellDebug1HiiHandle);
> + ShellPrintHiiEx (
> + -1,
> + -1,
> + NULL,
> + STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
> + gShellDebug1HiiHandle,
> + L"EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID",
> + &gEfiConfProfilesUefiSpecGuid
> + );
> + }
> +
> + return (ShellStatus);
> +}
>
> STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
> { L"-mmio", TypeFlag },
> @@ -461,6 +522,11 @@ ShellCommandRunDmem (
> HiiDatabaseExportBufferAddress = (UINT64) (UINTN)gST-
> >ConfigurationTable[TableWalker].VendorTable;
> continue;
> }
> +
> + if (CompareGuid (&gST-
> >ConfigurationTable[TableWalker].VendorGuid, &gEfiConfProfilesTableGuid))
> {
> + ConformanceProfileTableAddress = (UINT64) (UINTN)gST-
> >ConfigurationTable[TableWalker].VendorTable;
> + continue;
> + }
> }
>
> ShellPrintHiiEx (
> @@ -504,6 +570,9 @@ ShellCommandRunDmem (
> if (ShellStatus == SHELL_SUCCESS) {
> ShellStatus = DisplayImageExecutionEntries
> (ImageExecutionTableAddress);
> }
> + if (ShellStatus == SHELL_SUCCESS) {
> + ShellStatus = DisplayConformanceProfiles
> (ConformanceProfileTableAddress);
> + }
> }
>
> } else {
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> index 3b730164ddce..6ef923e4fd5e 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> d
> +++ sLib.uni
> @@ -147,6 +147,11 @@
> #string STR_DMEM_IMG_EXE_TABLE #language en-US "\r\nImage
> Execution Table\r\n"
> "----------------------------------------\r\n"
> #string STR_DMEM_IMG_EXE_ENTRY #language en-US "%20s: %s\r\n"
> +#string STR_DMEM_CONF_PRO_TABLE #language en-US
> "\r\nConformance Profile Table\r\n"
> + "----------------------------------------\r\n"
> + "Version 0x1\r\n"
> + "Profile GUIDs:\r\n"
> +#string STR_DMEM_CONF_PRO_ROW #language en-US " %s %g\r\n"
> #string STR_DMEM_ERR_NOT_FOUND #language en-US "\r\n%H%s%N:
> Table address not found.\r\n"
> #string STR_DMEM_ERR_GET_FAIL #language en-US "\r\n%H%s%N:
> Unable to get table information.\r\n"
>
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117564): https://edk2.groups.io/g/devel/message/117564
Mute This Topic: https://groups.io/mt/105428090/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2024-04-10 5:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 18:53 [edk2-devel] [PATCH v5 0/3] Adding support for verbose UEFI Table dumping to Dmem.c Sam Kaynor
2024-04-09 18:53 ` [edk2-devel] [PATCH v5 1/3] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c Sam Kaynor
2024-04-09 18:53 ` [edk2-devel] [PATCH v5 2/3] ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table " Sam Kaynor
2024-04-09 18:53 ` [edk2-devel] [PATCH v5 3/3] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles " Sam Kaynor
2024-04-10 5:10 ` Gao, Zhichao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH7PR11MB637729F4711601373C6D1D6CF6062@PH7PR11MB6377.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox