[edk2-devel] [PATCH 2/3] ShellPkg/UefiShellDebug1CommandsLib: remove gEfiMpsTableGuid ref from DMEM

Laszlo Ersek posted 3 patches 2 years, 3 months ago
[edk2-devel] [PATCH 2/3] ShellPkg/UefiShellDebug1CommandsLib: remove gEfiMpsTableGuid ref from DMEM
Posted by Laszlo Ersek 2 years, 3 months ago
We're removing <MdePkg/Include/Guid/Mps.h>. First, remove the
gEfiMpsTableGuid system config table reference from the UEFI Shell's DMEM
debug command.

Cc: Zhichao Gao <zhichao.gao@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1754
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 1 -
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf | 1 -
 ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c                         | 9 ---------
 3 files changed, 11 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
index 4041f0cd483e..155efc1a82f1 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
@@ -112,7 +112,6 @@
                                                   "SAL System Table              %016LX\r\n"
                                                   "ACPI Table                    %016LX\r\n"
                                                   "ACPI 2.0 Table                %016LX\r\n"
-                                                  "MPS Table                     %016LX\r\n"
                                                   "SMBIOS Table                  %016LX\r\n"
                                                   "DTB Table                     %016LX\r\n"
                                                   "Memory Attribute Table        %016LX\r\n"
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
index 3741dac5d94c..2074cb7d96da 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
@@ -127,7 +127,6 @@ [Guids]
   gEfiGlobalVariableGuid          ## SOMETIMES_CONSUMES ## GUID
   gEfiSmbiosTableGuid             ## SOMETIMES_CONSUMES ## SystemTable
   gEfiSmbios3TableGuid            ## SOMETIMES_CONSUMES ## SystemTable
-  gEfiMpsTableGuid                ## SOMETIMES_CONSUMES ## SystemTable
   gEfiAcpi10TableGuid             ## SOMETIMES_CONSUMES ## SystemTable
   gEfiAcpi20TableGuid             ## SOMETIMES_CONSUMES ## SystemTable
   gShellDebug1HiiGuid             ## SOMETIMES_CONSUMES ## HII
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
index a609971f345e..39a59c195512 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
@@ -12,7 +12,6 @@
 #include <Protocol/PciRootBridgeIo.h>
 #include <Protocol/HiiDatabase.h>
 #include <Guid/Acpi.h>
-#include <Guid/Mps.h>
 #include <Guid/SmBios.h>
 #include <Guid/MemoryAttributesTable.h>
 #include <Guid/RtPropertiesTable.h>
@@ -113,7 +112,6 @@ ShellCommandRunDmem (
   UINT64        Acpi20TableAddress;
   UINT64        SalTableAddress;
   UINT64        SmbiosTableAddress;
-  UINT64        MpsTableAddress;
   UINT64        DtbTableAddress;
   UINT64        MemoryAttributesTableAddress;
   UINT64        RtPropertiesTableAddress;
@@ -190,7 +188,6 @@ ShellCommandRunDmem (
           AcpiTableAddress               = 0;
           SalTableAddress                = 0;
           SmbiosTableAddress             = 0;
-          MpsTableAddress                = 0;
           DtbTableAddress                = 0;
           MemoryAttributesTableAddress   = 0;
           RtPropertiesTableAddress       = 0;
@@ -224,11 +221,6 @@ ShellCommandRunDmem (
               continue;
             }
 
-            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) {
-              MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
-              continue;
-            }
-
             if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) {
               MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
               continue;
@@ -292,7 +284,6 @@ ShellCommandRunDmem (
             SalTableAddress,
             AcpiTableAddress,
             Acpi20TableAddress,
-            MpsTableAddress,
             SmbiosTableAddress,
             DtbTableAddress,
             MemoryAttributesTableAddress,



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110974): https://edk2.groups.io/g/devel/message/110974
Mute This Topic: https://groups.io/mt/102483865/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 2/3] ShellPkg/UefiShellDebug1CommandsLib: remove gEfiMpsTableGuid ref from DMEM
Posted by Gao, Zhichao 2 years, 2 months ago
I would leave the decision to the right owner of LegacyBiosMpTable.h in MdePkg. Once pass review on MdePkg, I am fine with this patch.

Thanks,
Zhichao

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, November 9, 2023 8:06 PM
> To: devel@edk2.groups.io
> Cc: Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [PATCH 2/3] ShellPkg/UefiShellDebug1CommandsLib: remove
> gEfiMpsTableGuid ref from DMEM
> 
> We're removing <MdePkg/Include/Guid/Mps.h>. First, remove the
> gEfiMpsTableGuid system config table reference from the UEFI Shell's DMEM
> debug command.
> 
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1754
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands
> Lib.uni | 1 -
> ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands
> Lib.inf | 1 -
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c                         | 9 ----
> -----
>  3 files changed, 11 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> index 4041f0cd483e..155efc1a82f1 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> d
> +++ sLib.uni
> @@ -112,7 +112,6 @@
>                                                    "SAL System Table              %016LX\r\n"
>                                                    "ACPI Table                    %016LX\r\n"
>                                                    "ACPI 2.0 Table                %016LX\r\n"
> -                                                  "MPS Table                     %016LX\r\n"
>                                                    "SMBIOS Table                  %016LX\r\n"
>                                                    "DTB Table                     %016LX\r\n"
>                                                    "Memory Attribute Table        %016LX\r\n"
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> index 3741dac5d94c..2074cb7d96da 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.inf
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> d
> +++ sLib.inf
> @@ -127,7 +127,6 @@ [Guids]
>    gEfiGlobalVariableGuid          ## SOMETIMES_CONSUMES ## GUID
>    gEfiSmbiosTableGuid             ## SOMETIMES_CONSUMES ## SystemTable
>    gEfiSmbios3TableGuid            ## SOMETIMES_CONSUMES ## SystemTable
> -  gEfiMpsTableGuid                ## SOMETIMES_CONSUMES ## SystemTable
>    gEfiAcpi10TableGuid             ## SOMETIMES_CONSUMES ## SystemTable
>    gEfiAcpi20TableGuid             ## SOMETIMES_CONSUMES ## SystemTable
>    gShellDebug1HiiGuid             ## SOMETIMES_CONSUMES ## HII
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> index a609971f345e..39a59c195512 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
> @@ -12,7 +12,6 @@
>  #include <Protocol/PciRootBridgeIo.h>
>  #include <Protocol/HiiDatabase.h>
>  #include <Guid/Acpi.h>
> -#include <Guid/Mps.h>
>  #include <Guid/SmBios.h>
>  #include <Guid/MemoryAttributesTable.h>  #include
> <Guid/RtPropertiesTable.h> @@ -113,7 +112,6 @@
> ShellCommandRunDmem (
>    UINT64        Acpi20TableAddress;
>    UINT64        SalTableAddress;
>    UINT64        SmbiosTableAddress;
> -  UINT64        MpsTableAddress;
>    UINT64        DtbTableAddress;
>    UINT64        MemoryAttributesTableAddress;
>    UINT64        RtPropertiesTableAddress;
> @@ -190,7 +188,6 @@ ShellCommandRunDmem (
>            AcpiTableAddress               = 0;
>            SalTableAddress                = 0;
>            SmbiosTableAddress             = 0;
> -          MpsTableAddress                = 0;
>            DtbTableAddress                = 0;
>            MemoryAttributesTableAddress   = 0;
>            RtPropertiesTableAddress       = 0;
> @@ -224,11 +221,6 @@ ShellCommandRunDmem (
>                continue;
>              }
> 
> -            if (CompareGuid (&gST-
> >ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) {
> -              MpsTableAddress = (UINT64)(UINTN)gST-
> >ConfigurationTable[TableWalker].VendorTable;
> -              continue;
> -            }
> -
>              if (CompareGuid (&gST-
> >ConfigurationTable[TableWalker].VendorGuid,
> &gEfiMemoryAttributesTableGuid)) {
>                MemoryAttributesTableAddress = (UINT64)(UINTN)gST-
> >ConfigurationTable[TableWalker].VendorTable;
>                continue;
> @@ -292,7 +284,6 @@ ShellCommandRunDmem (
>              SalTableAddress,
>              AcpiTableAddress,
>              Acpi20TableAddress,
> -            MpsTableAddress,
>              SmbiosTableAddress,
>              DtbTableAddress,
>              MemoryAttributesTableAddress,



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111541): https://edk2.groups.io/g/devel/message/111541
Mute This Topic: https://groups.io/mt/102483865/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-