]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table
authorArd Biesheuvel <ardb@kernel.org>
Fri, 17 Dec 2021 21:34:03 +0000 (22:34 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 22 Jul 2022 17:10:09 +0000 (17:10 +0000)
The ARM_PROCESSOR_TABLE pseudo-ACPI table (which carries a ACPI-table
like header but is published as a EFI config table) is not described in
any relevant spec, and is not known to be relied upon by any OS. Let's
just get rid of it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Tested-by: Sami Mujawar <sami.mujawar@arm.com>
ArmPkg/Drivers/CpuDxe/CpuDxe.c
ArmPkg/Drivers/CpuDxe/CpuDxe.h
ArmPkg/Drivers/CpuDxe/CpuDxe.inf
ArmPkg/Drivers/CpuDxe/CpuMpCore.c [deleted file]
ArmPkg/Include/Guid/ArmMpCoreInfo.h

index 62a6e2d620a6c58c0f129601320d5eec5f36a6fc..e6742f0a25fc2cb01206f5bef5245e255dc8fcc9 100644 (file)
@@ -256,12 +256,6 @@ CpuDxeInitialize (
   SyncCacheConfig (&mCpu);\r
   mIsFlushingGCD = FALSE;\r
 \r
-  // If the platform is a MPCore system then install the Configuration Table describing the\r
-  // secondary core states\r
-  if (ArmIsMpCore ()) {\r
-    PublishArmProcessorTable ();\r
-  }\r
-\r
   //\r
   // Setup a callback for idle events\r
   //\r
index 58ee1444c1b3350d3f3bf7b22f30059438e37e36..ff672390ce5122bf6b7eb43569c513e08ef213f8 100644 (file)
@@ -104,21 +104,6 @@ SyncCacheConfig (
   IN  EFI_CPU_ARCH_PROTOCOL  *CpuProtocol\r
   );\r
 \r
-/**\r
- * Publish ARM Processor Data table in UEFI SYSTEM Table.\r
- * @param  HobStart               Pointer to the beginning of the HOB List from PEI.\r
- *\r
- * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB.\r
- *               If  the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory\r
- *               and a pointer is assigned to it in ARM processor table. Then the ARM processor table is\r
- *               installed in EFI configuration table.\r
-**/\r
-VOID\r
-EFIAPI\r
-PublishArmProcessorTable (\r
-  VOID\r
-  );\r
-\r
 // The ARM Attributes might be defined on 64-bit (case of the long format description table)\r
 UINT64\r
 EfiAttributeToArmAttribute (\r
index e5549fc71df737bc176ee21b99b269fee321dbc0..10792b393fc8ae6df27c4bf985b5416b79c16cbb 100644 (file)
@@ -21,7 +21,6 @@
 [Sources.Common]\r
   CpuDxe.c\r
   CpuDxe.h\r
-  CpuMpCore.c\r
   CpuMmuCommon.c\r
   Exception.c\r
 \r
diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c b/ArmPkg/Drivers/CpuDxe/CpuMpCore.c
deleted file mode 100644 (file)
index 08de464..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2011-2021, Arm Limited. All rights reserved.<BR>\r
-*\r
-*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-*\r
-**/\r
-\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-\r
-#include <Guid/ArmMpCoreInfo.h>\r
-\r
-ARM_PROCESSOR_TABLE  mArmProcessorTableTemplate = {\r
-  {\r
-    EFI_ARM_PROCESSOR_TABLE_SIGNATURE,\r
-    0,\r
-    EFI_ARM_PROCESSOR_TABLE_REVISION,\r
-    EFI_ARM_PROCESSOR_TABLE_OEM_ID,\r
-    EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID,\r
-    EFI_ARM_PROCESSOR_TABLE_OEM_REVISION,\r
-    EFI_ARM_PROCESSOR_TABLE_CREATOR_ID,\r
-    EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION,\r
-    { 0 },\r
-    0\r
-  },   // ARM Processor table header\r
-  0,   // Number of entries in ARM processor Table\r
-  NULL // ARM Processor Table\r
-};\r
-\r
-/** Publish ARM Processor Data table in UEFI SYSTEM Table.\r
- * @param  HobStart               Pointer to the beginning of the HOB List from PEI.\r
- *\r
- * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB.\r
- *               If  the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory\r
- *               and a pointer is assigned to it in ARM processor table. Then the ARM processor table is\r
- *               installed in EFI configuration table.\r
-**/\r
-VOID\r
-EFIAPI\r
-PublishArmProcessorTable (\r
-  VOID\r
-  )\r
-{\r
-  EFI_PEI_HOB_POINTERS  Hob;\r
-\r
-  Hob.Raw = GetHobList ();\r
-\r
-  // Iterate through the HOBs and find if there is ARM PROCESSOR ENTRY HOB\r
-  for ( ; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {\r
-    // Check for Correct HOB type\r
-    if ((GET_HOB_TYPE (Hob)) == EFI_HOB_TYPE_GUID_EXTENSION) {\r
-      // Check for correct GUID type\r
-      if (CompareGuid (&(Hob.Guid->Name), &gArmMpCoreInfoGuid)) {\r
-        ARM_PROCESSOR_TABLE  *ArmProcessorTable;\r
-        EFI_STATUS           Status;\r
-\r
-        // Allocate Runtime memory for ARM processor table\r
-        ArmProcessorTable = (ARM_PROCESSOR_TABLE *)AllocateRuntimePool (sizeof (ARM_PROCESSOR_TABLE));\r
-\r
-        // Check if the memory allocation is successful or not\r
-        ASSERT (NULL != ArmProcessorTable);\r
-\r
-        // Set ARM processor table to default values\r
-        CopyMem (ArmProcessorTable, &mArmProcessorTableTemplate, sizeof (ARM_PROCESSOR_TABLE));\r
-\r
-        // Fill in Length fields of ARM processor table\r
-        ArmProcessorTable->Header.Length  = sizeof (ARM_PROCESSOR_TABLE);\r
-        ArmProcessorTable->Header.DataLen = GET_GUID_HOB_DATA_SIZE (Hob);\r
-\r
-        // Fill in Identifier(ARM processor table GUID)\r
-        ArmProcessorTable->Header.Identifier = gArmMpCoreInfoGuid;\r
-\r
-        // Set Number of ARM core entries in the Table\r
-        ArmProcessorTable->NumberOfEntries = GET_GUID_HOB_DATA_SIZE (Hob)/sizeof (ARM_CORE_INFO);\r
-\r
-        // Allocate runtime memory for ARM processor Table entries\r
-        ArmProcessorTable->ArmCpus = (ARM_CORE_INFO *)AllocateRuntimePool (\r
-                                                        ArmProcessorTable->NumberOfEntries * sizeof (ARM_CORE_INFO)\r
-                                                        );\r
-\r
-        // Check if the memory allocation is successful or not\r
-        ASSERT (NULL != ArmProcessorTable->ArmCpus);\r
-\r
-        // Copy ARM Processor Table data from HOB list to newly allocated memory\r
-        CopyMem (ArmProcessorTable->ArmCpus, GET_GUID_HOB_DATA (Hob), ArmProcessorTable->Header.DataLen);\r
-\r
-        // Install the ARM Processor table into EFI system configuration table\r
-        Status = gBS->InstallConfigurationTable (&gArmMpCoreInfoGuid, ArmProcessorTable);\r
-\r
-        ASSERT_EFI_ERROR (Status);\r
-      }\r
-    }\r
-  }\r
-}\r
index 43f0848e78b899a69efc0c0c4fa1ea0ded52e2c2..3a10fffb6fe47c3ceb4d3c387e486ba759e2557a 100644 (file)
@@ -23,36 +23,9 @@ typedef struct {
   UINT64                  MailboxClearValue;\r
 } ARM_CORE_INFO;\r
 \r
-typedef struct {\r
-  UINT64      Signature;\r
-  UINT32      Length;\r
-  UINT32      Revision;\r
-  UINT64      OemId;\r
-  UINT64      OemTableId;\r
-  UINTN       OemRevision;\r
-  UINTN       CreatorId;\r
-  UINTN       CreatorRevision;\r
-  EFI_GUID    Identifier;\r
-  UINTN       DataLen;\r
-} ARM_PROCESSOR_TABLE_HEADER;\r
-\r
-typedef struct {\r
-  ARM_PROCESSOR_TABLE_HEADER    Header;\r
-  UINTN                         NumberOfEntries;\r
-  ARM_CORE_INFO                 *ArmCpus;\r
-} ARM_PROCESSOR_TABLE;\r
-\r
 #define ARM_MP_CORE_INFO_GUID \\r
   { 0xa4ee0728, 0xe5d7, 0x4ac5,  {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }\r
 \r
-#define EFI_ARM_PROCESSOR_TABLE_SIGNATURE         SIGNATURE_64 ('C', 'P', 'U', 'T', 'A', 'B', 'L', 'E')\r
-#define EFI_ARM_PROCESSOR_TABLE_REVISION          0x00010000// 1.0\r
-#define EFI_ARM_PROCESSOR_TABLE_OEM_ID            SIGNATURE_64('A','R','M',' ', 'L', 't', 'd', ' ')\r
-#define EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID      SIGNATURE_64('V', 'E', 'R', 'S', 'A', 'T', 'I', 'L')\r
-#define EFI_ARM_PROCESSOR_TABLE_OEM_REVISION      0x00000001\r
-#define EFI_ARM_PROCESSOR_TABLE_CREATOR_ID        0xA5A5A5A5\r
-#define EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION  0x01000001\r
-\r
 extern EFI_GUID  gArmMpCoreInfoGuid;\r
 \r
 #endif /* ARM_MP_CORE_INFO_GUID_H_ */\r