From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.2560.1639776858893580343 for ; Fri, 17 Dec 2021 13:34:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TfQ8t2Yv; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 679CEB82AD9; Fri, 17 Dec 2021 21:34:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FB3FC36AE9; Fri, 17 Dec 2021 21:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639776856; bh=8r7vkgx/vwPu1aXCTYd43QFvbkkhLIHnfmNQ2xn8J5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TfQ8t2YvcKNWGQxepB61xDsHd0/MVd8qo2qbOWwkNzc3i6eWnJwsWLzSIPDJ2dyEG iuScvHecDKEy2PLixqjmKg0y8ryNWhshHcxrZLdzU2NSSyXodx0GHMediIiJpp8QSv r5pfXksNkzzEZLZFvbqMa0FCODAl/6PHpxiGcC7ewxmCHRaBqWym26InjWpdhzyqk5 CPTXR1nNmNEvig6igI6jdv0RpsGtW9JLhhWLwamH+FI7xKLLsPNrsTOQriQ6pXL0T4 NVXxi5430TEjCwa8qixuBJHGq2LKvQw21qGCIaFAfBw1F6JWVWx1xZ4dGzkBtTbx+G YGK87ErK9/EvQ== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Rebecca Cran , Leif Lindholm , Sami Mujawar Subject: [PATCH v2 2/2] ArmPkg/CpuDxe: drop ARM_PROCESSOR_TABLE pseudo-ACPI table Date: Fri, 17 Dec 2021 22:34:03 +0100 Message-Id: <20211217213403.15585-3-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211217213403.15585-1-ardb@kernel.org> References: <20211217213403.15585-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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/CpuDx= e.inf index f4cdb8ab5613..4eda960ede36 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf @@ -21,7 +21,6 @@ [Defines] [Sources.Common]=0D CpuDxe.c=0D CpuDxe.h=0D - CpuMpCore.c=0D CpuMmuCommon.c=0D Exception.c=0D =0D 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=0D );=0D =0D -/**=0D - * Publish ARM Processor Data table in UEFI SYSTEM Table.=0D - * @param HobStart Pointer to the beginning of the HOB List= from PEI.=0D - *=0D - * Description : This function iterates through HOB list and finds ARM pro= cessor Table Entry HOB.=0D - * If the ARM processor Table Entry HOB is found, the HOB d= ata is copied to run-time memory=0D - * and a pointer is assigned to it in ARM processor table. T= hen the ARM processor table is=0D - * installed in EFI configuration table.=0D -**/=0D -VOID=0D -EFIAPI=0D -PublishArmProcessorTable (=0D - VOID=0D - );=0D -=0D // The ARM Attributes might be defined on 64-bit (case of the long format = description table)=0D UINT64=0D EfiAttributeToArmAttribute (=0D diff --git a/ArmPkg/Include/Guid/ArmMpCoreInfo.h b/ArmPkg/Include/Guid/ArmM= pCoreInfo.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;=0D } ARM_CORE_INFO;=0D =0D -typedef struct {=0D - UINT64 Signature;=0D - UINT32 Length;=0D - UINT32 Revision;=0D - UINT64 OemId;=0D - UINT64 OemTableId;=0D - UINTN OemRevision;=0D - UINTN CreatorId;=0D - UINTN CreatorRevision;=0D - EFI_GUID Identifier;=0D - UINTN DataLen;=0D -} ARM_PROCESSOR_TABLE_HEADER;=0D -=0D -typedef struct {=0D - ARM_PROCESSOR_TABLE_HEADER Header;=0D - UINTN NumberOfEntries;=0D - ARM_CORE_INFO *ArmCpus;=0D -} ARM_PROCESSOR_TABLE;=0D -=0D #define ARM_MP_CORE_INFO_GUID \=0D { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8= , 0x34} }=0D =0D -#define EFI_ARM_PROCESSOR_TABLE_SIGNATURE SIGNATURE_64 ('C', 'P', = 'U', 'T', 'A', 'B', 'L', 'E')=0D -#define EFI_ARM_PROCESSOR_TABLE_REVISION 0x00010000// 1.0=0D -#define EFI_ARM_PROCESSOR_TABLE_OEM_ID SIGNATURE_64('A','R','M'= ,' ', 'L', 't', 'd', ' ')=0D -#define EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID SIGNATURE_64('V', 'E', '= R', 'S', 'A', 'T', 'I', 'L')=0D -#define EFI_ARM_PROCESSOR_TABLE_OEM_REVISION 0x00000001=0D -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_ID 0xA5A5A5A5=0D -#define EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION 0x01000001=0D -=0D extern EFI_GUID gArmMpCoreInfoGuid;=0D =0D #endif /* ARM_MP_CORE_INFO_GUID_H_ */=0D 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);=0D mIsFlushingGCD =3D FALSE;=0D =0D - // If the platform is a MPCore system then install the Configuration Tab= le describing the=0D - // secondary core states=0D - if (ArmIsMpCore ()) {=0D - PublishArmProcessorTable ();=0D - }=0D -=0D //=0D // Setup a callback for idle events=0D //=0D diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c b/ArmPkg/Drivers/CpuDxe/CpuM= pCore.c deleted file mode 100644 index 08de46464515..000000000000 --- a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c +++ /dev/null @@ -1,98 +0,0 @@ -/** @file=0D -*=0D -* Copyright (c) 2011-2021, Arm Limited. All rights reserved.
=0D -*=0D -* SPDX-License-Identifier: BSD-2-Clause-Patent=0D -*=0D -**/=0D -=0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -#include =0D -=0D -ARM_PROCESSOR_TABLE mArmProcessorTableTemplate =3D {=0D - {=0D - EFI_ARM_PROCESSOR_TABLE_SIGNATURE,=0D - 0,=0D - EFI_ARM_PROCESSOR_TABLE_REVISION,=0D - EFI_ARM_PROCESSOR_TABLE_OEM_ID,=0D - EFI_ARM_PROCESSOR_TABLE_OEM_TABLE_ID,=0D - EFI_ARM_PROCESSOR_TABLE_OEM_REVISION,=0D - EFI_ARM_PROCESSOR_TABLE_CREATOR_ID,=0D - EFI_ARM_PROCESSOR_TABLE_CREATOR_REVISION,=0D - { 0 },=0D - 0=0D - }, // ARM Processor table header=0D - 0, // Number of entries in ARM processor Table=0D - NULL // ARM Processor Table=0D -};=0D -=0D -/** Publish ARM Processor Data table in UEFI SYSTEM Table.=0D - * @param HobStart Pointer to the beginning of the HOB List= from PEI.=0D - *=0D - * Description : This function iterates through HOB list and finds ARM pro= cessor Table Entry HOB.=0D - * If the ARM processor Table Entry HOB is found, the HOB d= ata is copied to run-time memory=0D - * and a pointer is assigned to it in ARM processor table. T= hen the ARM processor table is=0D - * installed in EFI configuration table.=0D -**/=0D -VOID=0D -EFIAPI=0D -PublishArmProcessorTable (=0D - VOID=0D - )=0D -{=0D - EFI_PEI_HOB_POINTERS Hob;=0D -=0D - Hob.Raw =3D GetHobList ();=0D -=0D - // Iterate through the HOBs and find if there is ARM PROCESSOR ENTRY HOB= =0D - for ( ; !END_OF_HOB_LIST (Hob); Hob.Raw =3D GET_NEXT_HOB (Hob)) {=0D - // Check for Correct HOB type=0D - if ((GET_HOB_TYPE (Hob)) =3D=3D EFI_HOB_TYPE_GUID_EXTENSION) {=0D - // Check for correct GUID type=0D - if (CompareGuid (&(Hob.Guid->Name), &gArmMpCoreInfoGuid)) {=0D - ARM_PROCESSOR_TABLE *ArmProcessorTable;=0D - EFI_STATUS Status;=0D -=0D - // Allocate Runtime memory for ARM processor table=0D - ArmProcessorTable =3D (ARM_PROCESSOR_TABLE *)AllocateRuntimePool (= sizeof (ARM_PROCESSOR_TABLE));=0D -=0D - // Check if the memory allocation is successful or not=0D - ASSERT (NULL !=3D ArmProcessorTable);=0D -=0D - // Set ARM processor table to default values=0D - CopyMem (ArmProcessorTable, &mArmProcessorTableTemplate, sizeof (A= RM_PROCESSOR_TABLE));=0D -=0D - // Fill in Length fields of ARM processor table=0D - ArmProcessorTable->Header.Length =3D sizeof (ARM_PROCESSOR_TABLE)= ;=0D - ArmProcessorTable->Header.DataLen =3D GET_GUID_HOB_DATA_SIZE (Hob)= ;=0D -=0D - // Fill in Identifier(ARM processor table GUID)=0D - ArmProcessorTable->Header.Identifier =3D gArmMpCoreInfoGuid;=0D -=0D - // Set Number of ARM core entries in the Table=0D - ArmProcessorTable->NumberOfEntries =3D GET_GUID_HOB_DATA_SIZE (Hob= )/sizeof (ARM_CORE_INFO);=0D -=0D - // Allocate runtime memory for ARM processor Table entries=0D - ArmProcessorTable->ArmCpus =3D (ARM_CORE_INFO *)AllocateRuntimePoo= l (=0D - ArmProcessorTable-= >NumberOfEntries * sizeof (ARM_CORE_INFO)=0D - );=0D -=0D - // Check if the memory allocation is successful or not=0D - ASSERT (NULL !=3D ArmProcessorTable->ArmCpus);=0D -=0D - // Copy ARM Processor Table data from HOB list to newly allocated = memory=0D - CopyMem (ArmProcessorTable->ArmCpus, GET_GUID_HOB_DATA (Hob), ArmP= rocessorTable->Header.DataLen);=0D -=0D - // Install the ARM Processor table into EFI system configuration t= able=0D - Status =3D gBS->InstallConfigurationTable (&gArmMpCoreInfoGuid, Ar= mProcessorTable);=0D -=0D - ASSERT_EFI_ERROR (Status);=0D - }=0D - }=0D - }=0D -}=0D --=20 2.30.2