* [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE @ 2021-12-17 21:34 Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 1/2] ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE Ard Biesheuvel ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Ard Biesheuvel @ 2021-12-17 21:34 UTC (permalink / raw) To: devel; +Cc: Ard Biesheuvel, Rebecca Cran, Leif Lindholm, Sami Mujawar Remove the obsolete ARM_PROCESSOR_TABLE definition, and all the pieces that are related to it. Cc: Rebecca Cran <rebecca@nuviainc.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Ard Biesheuvel (2): ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 1 - ArmPkg/Drivers/CpuDxe/CpuDxe.h | 15 --- ArmPkg/Include/Guid/ArmMpCoreInfo.h | 27 ------ ArmPkg/Include/Library/MpInitLib.h | 2 +- ArmPkg/Drivers/CpuDxe/CpuDxe.c | 6 -- ArmPkg/Drivers/CpuDxe/CpuMpCore.c | 98 -------------------- ArmPkg/Drivers/CpuDxe/CpuMpInit.c | 10 +- ArmPkg/Library/MpInitLib/DxeMpLib.c | 6 +- 8 files changed, 8 insertions(+), 157 deletions(-) delete mode 100644 ArmPkg/Drivers/CpuDxe/CpuMpCore.c -- 2.30.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE 2021-12-17 21:34 [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Ard Biesheuvel @ 2021-12-17 21:34 ` Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table Ard Biesheuvel 2021-12-22 22:39 ` [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Rebecca Cran 2 siblings, 0 replies; 6+ messages in thread From: Ard Biesheuvel @ 2021-12-17 21:34 UTC (permalink / raw) To: devel; +Cc: Ard Biesheuvel, Rebecca Cran, Leif Lindholm, Sami Mujawar Pass ARM_CORE_INFO[] directly into the MpInitLib init function so we don't need to rely on an obsolete and unrelated data structure. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- ArmPkg/Include/Library/MpInitLib.h | 2 +- ArmPkg/Drivers/CpuDxe/CpuMpInit.c | 10 ++++------ ArmPkg/Library/MpInitLib/DxeMpLib.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ArmPkg/Include/Library/MpInitLib.h b/ArmPkg/Include/Library/MpInitLib.h index 582bb788fd59..7a29fe3e367e 100644 --- a/ArmPkg/Include/Library/MpInitLib.h +++ b/ArmPkg/Include/Library/MpInitLib.h @@ -356,7 +356,7 @@ MpInitLibWhoAmI ( VOID MpInitLibInitialize ( IN UINTN NumberOfProcessors, - IN ARM_PROCESSOR_TABLE *CpuInfo + IN CONST ARM_CORE_INFO *CoreInfo ); #endif /* MP_INITLIB_H_ */ diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpInit.c b/ArmPkg/Drivers/CpuDxe/CpuMpInit.c index 876a29e09b1b..4f5b4268aee5 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuMpInit.c +++ b/ArmPkg/Drivers/CpuDxe/CpuMpInit.c @@ -570,10 +570,9 @@ InitializeMpSupport ( EFI_HOB_GENERIC_HEADER *Hob; VOID *HobData; UINTN HobDataSize; - ARM_PROCESSOR_TABLE CpuInfo; + CONST ARM_CORE_INFO *CoreInfo; MaxCpus = 1; - ZeroMem (&CpuInfo, sizeof (ARM_PROCESSOR_TABLE)); DEBUG ((DEBUG_INFO, "Starting MP services")); @@ -581,9 +580,8 @@ InitializeMpSupport ( if (Hob != NULL) { HobData = GET_GUID_HOB_DATA (Hob); HobDataSize = GET_GUID_HOB_DATA_SIZE (Hob); - CpuInfo.ArmCpus = (ARM_CORE_INFO *)HobData; - CpuInfo.NumberOfEntries = HobDataSize / sizeof (ARM_CORE_INFO); - MaxCpus = CpuInfo.NumberOfEntries; + CoreInfo = (ARM_CORE_INFO *)HobData; + MaxCpus = HobDataSize / sizeof (ARM_CORE_INFO); } if (MaxCpus == 1) { @@ -592,7 +590,7 @@ InitializeMpSupport ( return; } - MpInitLibInitialize (MaxCpus, &CpuInfo); + MpInitLibInitialize (MaxCpus, CoreInfo); // // Now install the MP services protocol. diff --git a/ArmPkg/Library/MpInitLib/DxeMpLib.c b/ArmPkg/Library/MpInitLib/DxeMpLib.c index b00893a5ea7a..5ecd5a2b3366 100644 --- a/ArmPkg/Library/MpInitLib/DxeMpLib.c +++ b/ArmPkg/Library/MpInitLib/DxeMpLib.c @@ -1380,7 +1380,7 @@ FillInProcessorInformation ( VOID MpInitLibInitialize ( IN UINTN NumberOfProcessors, - IN ARM_PROCESSOR_TABLE *CpuInfo + IN CONST ARM_CORE_INFO *CoreInfo ) { EFI_STATUS Status; @@ -1407,7 +1407,7 @@ MpInitLibInitialize ( gProcessorIDs = AllocatePool ((mCpuMpData.NumberOfProcessors + 1) * sizeof (UINT64)); ASSERT (gProcessorIDs != NULL); - FillInProcessorInformation (TRUE, CpuInfo->ArmCpus[0].Mpidr, 0); + FillInProcessorInformation (TRUE, CoreInfo[0].Mpidr, 0); gProcessorIDs[0] = mCpuMpData.CpuData[0].Info.ProcessorId; Status = gBS->CreateEvent ( @@ -1431,7 +1431,7 @@ MpInitLibInitialize ( continue; } - FillInProcessorInformation (FALSE, CpuInfo->ArmCpus[Index].Mpidr, Index); + FillInProcessorInformation (FALSE, CoreInfo[Index].Mpidr, Index); gProcessorIDs[Index] = mCpuMpData.CpuData[Index].Info.ProcessorId; -- 2.30.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table 2021-12-17 21:34 [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 1/2] ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE Ard Biesheuvel @ 2021-12-17 21:34 ` Ard Biesheuvel 2022-07-22 15:20 ` Sami Mujawar 2021-12-22 22:39 ` [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Rebecca Cran 2 siblings, 1 reply; 6+ messages in thread From: Ard Biesheuvel @ 2021-12-17 21:34 UTC (permalink / raw) To: devel; +Cc: Ard Biesheuvel, Rebecca Cran, Leif Lindholm, Sami Mujawar 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> --- ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 1 - ArmPkg/Drivers/CpuDxe/CpuDxe.h | 15 --- ArmPkg/Include/Guid/ArmMpCoreInfo.h | 27 ------ ArmPkg/Drivers/CpuDxe/CpuDxe.c | 6 -- ArmPkg/Drivers/CpuDxe/CpuMpCore.c | 98 -------------------- 5 files changed, 147 deletions(-) diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf index f4cdb8ab5613..4eda960ede36 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf @@ -21,7 +21,6 @@ [Defines] [Sources.Common] CpuDxe.c CpuDxe.h - CpuMpCore.c CpuMmuCommon.c Exception.c diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h index 3f04b89d7ad0..7858c12aea55 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h @@ -104,21 +104,6 @@ SyncCacheConfig ( IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol ); -/** - * Publish ARM Processor Data table in UEFI SYSTEM Table. - * @param HobStart Pointer to the beginning of the HOB List from PEI. - * - * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB. - * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory - * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is - * installed in EFI configuration table. -**/ -VOID -EFIAPI -PublishArmProcessorTable ( - VOID - ); - // The ARM Attributes might be defined on 64-bit (case of the long format description table) UINT64 EfiAttributeToArmAttribute ( diff --git a/ArmPkg/Include/Guid/ArmMpCoreInfo.h b/ArmPkg/Include/Guid/ArmMpCoreInfo.h index 43f0848e78b8..3a10fffb6fe4 100644 --- a/ArmPkg/Include/Guid/ArmMpCoreInfo.h +++ b/ArmPkg/Include/Guid/ArmMpCoreInfo.h @@ -23,36 +23,9 @@ typedef struct { UINT64 MailboxClearValue; } ARM_CORE_INFO; -typedef struct { - UINT64 Signature; - UINT32 Length; - UINT32 Revision; - UINT64 OemId; - UINT64 OemTableId; - UINTN OemRevision; - UINTN CreatorId; - UINTN CreatorRevision; - EFI_GUID Identifier; - UINTN DataLen; -} ARM_PROCESSOR_TABLE_HEADER; - -typedef struct { - ARM_PROCESSOR_TABLE_HEADER Header; - UINTN NumberOfEntries; - ARM_CORE_INFO *ArmCpus; -} ARM_PROCESSOR_TABLE; - #define ARM_MP_CORE_INFO_GUID \ { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} } -#define EFI_ARM_PROCESSOR_TABLE_SIGNATURE SIGNATURE_64 ('C', 'P', 'U', 'T', 'A', 'B', 'L', 'E') -#define EFI_ARM_PROCESSOR_TABLE_REVISION 0x00010000// 1.0 -#define EFI_ARM_PROCESSOR_TABLE_OEM_ID SIGNATURE_64('A','R','M',' ', 'L', 't', 'd', ' ') -#define EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID SIGNATURE_64('V', 'E', 'R', 'S', 'A', 'T', 'I', 'L') -#define EFI_ARM_PROCESSOR_TABLE_OEM_REVISION 0x00000001 -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_ID 0xA5A5A5A5 -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION 0x01000001 - extern EFI_GUID gArmMpCoreInfoGuid; #endif /* ARM_MP_CORE_INFO_GUID_H_ */ diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index 6c076982a1bd..1ee7c9237a3a 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -256,12 +256,6 @@ CpuDxeInitialize ( SyncCacheConfig (&mCpu); mIsFlushingGCD = FALSE; - // If the platform is a MPCore system then install the Configuration Table describing the - // secondary core states - if (ArmIsMpCore ()) { - PublishArmProcessorTable (); - } - // // Setup a callback for idle events // diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c b/ArmPkg/Drivers/CpuDxe/CpuMpCore.c deleted file mode 100644 index 08de46464515..000000000000 --- a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c +++ /dev/null @@ -1,98 +0,0 @@ -/** @file -* -* Copyright (c) 2011-2021, Arm Limited. All rights reserved.<BR> -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* -**/ - -#include <Library/UefiBootServicesTableLib.h> -#include <Library/BaseMemoryLib.h> -#include <Library/HobLib.h> -#include <Library/DebugLib.h> -#include <Library/MemoryAllocationLib.h> - -#include <Guid/ArmMpCoreInfo.h> - -ARM_PROCESSOR_TABLE mArmProcessorTableTemplate = { - { - EFI_ARM_PROCESSOR_TABLE_SIGNATURE, - 0, - EFI_ARM_PROCESSOR_TABLE_REVISION, - EFI_ARM_PROCESSOR_TABLE_OEM_ID, - EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID, - EFI_ARM_PROCESSOR_TABLE_OEM_REVISION, - EFI_ARM_PROCESSOR_TABLE_CREATOR_ID, - EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION, - { 0 }, - 0 - }, // ARM Processor table header - 0, // Number of entries in ARM processor Table - NULL // ARM Processor Table -}; - -/** Publish ARM Processor Data table in UEFI SYSTEM Table. - * @param HobStart Pointer to the beginning of the HOB List from PEI. - * - * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB. - * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory - * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is - * installed in EFI configuration table. -**/ -VOID -EFIAPI -PublishArmProcessorTable ( - VOID - ) -{ - EFI_PEI_HOB_POINTERS Hob; - - Hob.Raw = GetHobList (); - - // Iterate through the HOBs and find if there is ARM PROCESSOR ENTRY HOB - for ( ; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) { - // Check for Correct HOB type - if ((GET_HOB_TYPE (Hob)) == EFI_HOB_TYPE_GUID_EXTENSION) { - // Check for correct GUID type - if (CompareGuid (&(Hob.Guid->Name), &gArmMpCoreInfoGuid)) { - ARM_PROCESSOR_TABLE *ArmProcessorTable; - EFI_STATUS Status; - - // Allocate Runtime memory for ARM processor table - ArmProcessorTable = (ARM_PROCESSOR_TABLE *)AllocateRuntimePool (sizeof (ARM_PROCESSOR_TABLE)); - - // Check if the memory allocation is successful or not - ASSERT (NULL != ArmProcessorTable); - - // Set ARM processor table to default values - CopyMem (ArmProcessorTable, &mArmProcessorTableTemplate, sizeof (ARM_PROCESSOR_TABLE)); - - // Fill in Length fields of ARM processor table - ArmProcessorTable->Header.Length = sizeof (ARM_PROCESSOR_TABLE); - ArmProcessorTable->Header.DataLen = GET_GUID_HOB_DATA_SIZE (Hob); - - // Fill in Identifier(ARM processor table GUID) - ArmProcessorTable->Header.Identifier = gArmMpCoreInfoGuid; - - // Set Number of ARM core entries in the Table - ArmProcessorTable->NumberOfEntries = GET_GUID_HOB_DATA_SIZE (Hob)/sizeof (ARM_CORE_INFO); - - // Allocate runtime memory for ARM processor Table entries - ArmProcessorTable->ArmCpus = (ARM_CORE_INFO *)AllocateRuntimePool ( - ArmProcessorTable->NumberOfEntries * sizeof (ARM_CORE_INFO) - ); - - // Check if the memory allocation is successful or not - ASSERT (NULL != ArmProcessorTable->ArmCpus); - - // Copy ARM Processor Table data from HOB list to newly allocated memory - CopyMem (ArmProcessorTable->ArmCpus, GET_GUID_HOB_DATA (Hob), ArmProcessorTable->Header.DataLen); - - // Install the ARM Processor table into EFI system configuration table - Status = gBS->InstallConfigurationTable (&gArmMpCoreInfoGuid, ArmProcessorTable); - - ASSERT_EFI_ERROR (Status); - } - } - } -} -- 2.30.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table 2021-12-17 21:34 ` [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table Ard Biesheuvel @ 2022-07-22 15:20 ` Sami Mujawar 2022-07-22 17:27 ` [edk2-devel] " Ard Biesheuvel 0 siblings, 1 reply; 6+ messages in thread From: Sami Mujawar @ 2022-07-22 15:20 UTC (permalink / raw) To: Ard Biesheuvel, devel, Ard Biesheuvel Cc: Rebecca Cran, Leif Lindholm, Leif Lindholm, nd Hi Ard, Thank you for this patch. I have just checked and that patch v2 1/2 from this series is no longer required but this patch v2 2/2 is still applicable. I have applied patch v2 2/2 on latest edk2 master and tested with FVP model and can boot Linux. Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Tested-by: Sami Mujawar <sami.mujawar@arm.com> Regards, Sami Mujawar On 17/12/2021 09:34 pm, Ard Biesheuvel wrote: > 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> > --- > ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 1 - > ArmPkg/Drivers/CpuDxe/CpuDxe.h | 15 --- > ArmPkg/Include/Guid/ArmMpCoreInfo.h | 27 ------ > ArmPkg/Drivers/CpuDxe/CpuDxe.c | 6 -- > ArmPkg/Drivers/CpuDxe/CpuMpCore.c | 98 -------------------- > 5 files changed, 147 deletions(-) > > diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf > index f4cdb8ab5613..4eda960ede36 100644 > --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf > +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf > @@ -21,7 +21,6 @@ [Defines] > [Sources.Common] > > CpuDxe.c > > CpuDxe.h > > - CpuMpCore.c > > CpuMmuCommon.c > > Exception.c > > > > diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h > index 3f04b89d7ad0..7858c12aea55 100644 > --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h > +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h > @@ -104,21 +104,6 @@ SyncCacheConfig ( > IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol > > ); > > > > -/** > > - * Publish ARM Processor Data table in UEFI SYSTEM Table. > > - * @param HobStart Pointer to the beginning of the HOB List from PEI. > > - * > > - * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB. > > - * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory > > - * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is > > - * installed in EFI configuration table. > > -**/ > > -VOID > > -EFIAPI > > -PublishArmProcessorTable ( > > - VOID > > - ); > > - > > // The ARM Attributes might be defined on 64-bit (case of the long format description table) > > UINT64 > > EfiAttributeToArmAttribute ( > > diff --git a/ArmPkg/Include/Guid/ArmMpCoreInfo.h b/ArmPkg/Include/Guid/ArmMpCoreInfo.h > index 43f0848e78b8..3a10fffb6fe4 100644 > --- a/ArmPkg/Include/Guid/ArmMpCoreInfo.h > +++ b/ArmPkg/Include/Guid/ArmMpCoreInfo.h > @@ -23,36 +23,9 @@ typedef struct { > UINT64 MailboxClearValue; > > } ARM_CORE_INFO; > > > > -typedef struct { > > - UINT64 Signature; > > - UINT32 Length; > > - UINT32 Revision; > > - UINT64 OemId; > > - UINT64 OemTableId; > > - UINTN OemRevision; > > - UINTN CreatorId; > > - UINTN CreatorRevision; > > - EFI_GUID Identifier; > > - UINTN DataLen; > > -} ARM_PROCESSOR_TABLE_HEADER; > > - > > -typedef struct { > > - ARM_PROCESSOR_TABLE_HEADER Header; > > - UINTN NumberOfEntries; > > - ARM_CORE_INFO *ArmCpus; > > -} ARM_PROCESSOR_TABLE; > > - > > #define ARM_MP_CORE_INFO_GUID \ > > { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} } > > > > -#define EFI_ARM_PROCESSOR_TABLE_SIGNATURE SIGNATURE_64 ('C', 'P', 'U', 'T', 'A', 'B', 'L', 'E') > > -#define EFI_ARM_PROCESSOR_TABLE_REVISION 0x00010000// 1.0 > > -#define EFI_ARM_PROCESSOR_TABLE_OEM_ID SIGNATURE_64('A','R','M',' ', 'L', 't', 'd', ' ') > > -#define EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID SIGNATURE_64('V', 'E', 'R', 'S', 'A', 'T', 'I', 'L') > > -#define EFI_ARM_PROCESSOR_TABLE_OEM_REVISION 0x00000001 > > -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_ID 0xA5A5A5A5 > > -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION 0x01000001 > > - > > extern EFI_GUID gArmMpCoreInfoGuid; > > > > #endif /* ARM_MP_CORE_INFO_GUID_H_ */ > > diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c > index 6c076982a1bd..1ee7c9237a3a 100644 > --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c > +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c > @@ -256,12 +256,6 @@ CpuDxeInitialize ( > SyncCacheConfig (&mCpu); > > mIsFlushingGCD = FALSE; > > > > - // If the platform is a MPCore system then install the Configuration Table describing the > > - // secondary core states > > - if (ArmIsMpCore ()) { > > - PublishArmProcessorTable (); > > - } > > - > > // > > // Setup a callback for idle events > > // > > diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c b/ArmPkg/Drivers/CpuDxe/CpuMpCore.c > deleted file mode 100644 > index 08de46464515..000000000000 > --- a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c > +++ /dev/null > @@ -1,98 +0,0 @@ > -/** @file > > -* > > -* Copyright (c) 2011-2021, Arm Limited. All rights reserved.<BR> > > -* > > -* SPDX-License-Identifier: BSD-2-Clause-Patent > > -* > > -**/ > > - > > -#include <Library/UefiBootServicesTableLib.h> > > -#include <Library/BaseMemoryLib.h> > > -#include <Library/HobLib.h> > > -#include <Library/DebugLib.h> > > -#include <Library/MemoryAllocationLib.h> > > - > > -#include <Guid/ArmMpCoreInfo.h> > > - > > -ARM_PROCESSOR_TABLE mArmProcessorTableTemplate = { > > - { > > - EFI_ARM_PROCESSOR_TABLE_SIGNATURE, > > - 0, > > - EFI_ARM_PROCESSOR_TABLE_REVISION, > > - EFI_ARM_PROCESSOR_TABLE_OEM_ID, > > - EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID, > > - EFI_ARM_PROCESSOR_TABLE_OEM_REVISION, > > - EFI_ARM_PROCESSOR_TABLE_CREATOR_ID, > > - EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION, > > - { 0 }, > > - 0 > > - }, // ARM Processor table header > > - 0, // Number of entries in ARM processor Table > > - NULL // ARM Processor Table > > -}; > > - > > -/** Publish ARM Processor Data table in UEFI SYSTEM Table. > > - * @param HobStart Pointer to the beginning of the HOB List from PEI. > > - * > > - * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB. > > - * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory > > - * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is > > - * installed in EFI configuration table. > > -**/ > > -VOID > > -EFIAPI > > -PublishArmProcessorTable ( > > - VOID > > - ) > > -{ > > - EFI_PEI_HOB_POINTERS Hob; > > - > > - Hob.Raw = GetHobList (); > > - > > - // Iterate through the HOBs and find if there is ARM PROCESSOR ENTRY HOB > > - for ( ; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) { > > - // Check for Correct HOB type > > - if ((GET_HOB_TYPE (Hob)) == EFI_HOB_TYPE_GUID_EXTENSION) { > > - // Check for correct GUID type > > - if (CompareGuid (&(Hob.Guid->Name), &gArmMpCoreInfoGuid)) { > > - ARM_PROCESSOR_TABLE *ArmProcessorTable; > > - EFI_STATUS Status; > > - > > - // Allocate Runtime memory for ARM processor table > > - ArmProcessorTable = (ARM_PROCESSOR_TABLE *)AllocateRuntimePool (sizeof (ARM_PROCESSOR_TABLE)); > > - > > - // Check if the memory allocation is successful or not > > - ASSERT (NULL != ArmProcessorTable); > > - > > - // Set ARM processor table to default values > > - CopyMem (ArmProcessorTable, &mArmProcessorTableTemplate, sizeof (ARM_PROCESSOR_TABLE)); > > - > > - // Fill in Length fields of ARM processor table > > - ArmProcessorTable->Header.Length = sizeof (ARM_PROCESSOR_TABLE); > > - ArmProcessorTable->Header.DataLen = GET_GUID_HOB_DATA_SIZE (Hob); > > - > > - // Fill in Identifier(ARM processor table GUID) > > - ArmProcessorTable->Header.Identifier = gArmMpCoreInfoGuid; > > - > > - // Set Number of ARM core entries in the Table > > - ArmProcessorTable->NumberOfEntries = GET_GUID_HOB_DATA_SIZE (Hob)/sizeof (ARM_CORE_INFO); > > - > > - // Allocate runtime memory for ARM processor Table entries > > - ArmProcessorTable->ArmCpus = (ARM_CORE_INFO *)AllocateRuntimePool ( > > - ArmProcessorTable->NumberOfEntries * sizeof (ARM_CORE_INFO) > > - ); > > - > > - // Check if the memory allocation is successful or not > > - ASSERT (NULL != ArmProcessorTable->ArmCpus); > > - > > - // Copy ARM Processor Table data from HOB list to newly allocated memory > > - CopyMem (ArmProcessorTable->ArmCpus, GET_GUID_HOB_DATA (Hob), ArmProcessorTable->Header.DataLen); > > - > > - // Install the ARM Processor table into EFI system configuration table > > - Status = gBS->InstallConfigurationTable (&gArmMpCoreInfoGuid, ArmProcessorTable); > > - > > - ASSERT_EFI_ERROR (Status); > > - } > > - } > > - } > > -} > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table 2022-07-22 15:20 ` Sami Mujawar @ 2022-07-22 17:27 ` Ard Biesheuvel 0 siblings, 0 replies; 6+ messages in thread From: Ard Biesheuvel @ 2022-07-22 17:27 UTC (permalink / raw) To: edk2-devel-groups-io, Sami Mujawar Cc: Ard Biesheuvel, Rebecca Cran, Leif Lindholm, Leif Lindholm, nd On Fri, 22 Jul 2022 at 17:20, Sami Mujawar <sami.mujawar@arm.com> wrote: > > Hi Ard, > > Thank you for this patch. > > I have just checked and that patch v2 1/2 from this series is no longer > required but this patch v2 2/2 is still applicable. > > I have applied patch v2 2/2 on latest edk2 master and tested with FVP > model and can boot Linux. > > Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> > > Tested-by: Sami Mujawar <sami.mujawar@arm.com> > Thanks Sami I've now merged this as #3128 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE 2021-12-17 21:34 [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 1/2] ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table Ard Biesheuvel @ 2021-12-22 22:39 ` Rebecca Cran 2 siblings, 0 replies; 6+ messages in thread From: Rebecca Cran @ 2021-12-22 22:39 UTC (permalink / raw) To: Ard Biesheuvel, devel; +Cc: Leif Lindholm, Sami Mujawar Reviewed-by: Rebecca Cran <rebecca@nuviainc.com> On 12/17/21 2:34 PM, Ard Biesheuvel wrote: > Remove the obsolete ARM_PROCESSOR_TABLE definition, and all the pieces > that are related to it. > > Cc: Rebecca Cran <rebecca@nuviainc.com> > Cc: Leif Lindholm <leif@nuviainc.com> > Cc: Sami Mujawar <sami.mujawar@arm.com> > > Ard Biesheuvel (2): > ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE > ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table > > ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 1 - > ArmPkg/Drivers/CpuDxe/CpuDxe.h | 15 --- > ArmPkg/Include/Guid/ArmMpCoreInfo.h | 27 ------ > ArmPkg/Include/Library/MpInitLib.h | 2 +- > ArmPkg/Drivers/CpuDxe/CpuDxe.c | 6 -- > ArmPkg/Drivers/CpuDxe/CpuMpCore.c | 98 -------------------- > ArmPkg/Drivers/CpuDxe/CpuMpInit.c | 10 +- > ArmPkg/Library/MpInitLib/DxeMpLib.c | 6 +- > 8 files changed, 8 insertions(+), 157 deletions(-) > delete mode 100644 ArmPkg/Drivers/CpuDxe/CpuMpCore.c > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-22 17:28 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-17 21:34 [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 1/2] ArmPkg/MpInitLib: avoid ARM_PROCESSOR_TABLE Ard Biesheuvel 2021-12-17 21:34 ` [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table Ard Biesheuvel 2022-07-22 15:20 ` Sami Mujawar 2022-07-22 17:27 ` [edk2-devel] " Ard Biesheuvel 2021-12-22 22:39 ` [PATCH v2 0/2] ArmPkg: remove obsolete ARM_PROCESSOR_TABLE Rebecca Cran
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox