From nobody Sun Dec 22 14:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526405870610447.09108045037453; Tue, 15 May 2018 10:37:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3BA6C2034862C; Tue, 15 May 2018 10:37:49 -0700 (PDT) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B74F2209603DA for ; Tue, 15 May 2018 10:37:47 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id o4-v6so1020795wrm.0 for ; Tue, 15 May 2018 10:37:47 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id v75-v6sm814183wrc.65.2018.05.15.10.37.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 10:37:45 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YeTrVhslB5MjKv/QGsjKNe9ONYfEeO/pFgzZU8S9vvA=; b=fbJIJPfBQvpBHSQxbgyaQePINAr0maKcZCPiI9SdP+1ls1xk22fzID6Y3W+BHsJbFq z7jTvX9krQr873DOV8S3mPRSXU2KzIqRjj1/adL8Dc6oYV9UpNFMUytExSyv7+2QYjX1 Ce7uUCU608vJdGCAnzjvII2O1TnH9zHdy5+O8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YeTrVhslB5MjKv/QGsjKNe9ONYfEeO/pFgzZU8S9vvA=; b=MzEt9vP9mZXhBl1yAEoZOXsuif1T75lOhJd8BT69s8nzEID7USMb5b7Sq+A8Jw2Dad 3pWOD5red/suDNgtNV/HzZN1DvQZIC7rcQ8/f203ciepcZ0cUy33yF1SSpA3vVVmfswF IkDMPnRVJWcAx6eGofZjx7Yq+eGQi4ZuuQcr+qFujG9ymasO3cjUTs0eNUSOLESjLVPD AZuqUhn9ssBgM+j0p5gKbXW8xFnXP4uMXQ+Wx3sAAZxhYp+372QKz3ikX2na/lgEv2Cb UGOwioIxBynvzQQm1LqqMjl7gRMOLcyhALHwazBcOG7sjdVRHA3ywtgA3vk739Kv8e+f fXkA== X-Gm-Message-State: ALKqPwfhYA8nixUGNWqdJ0VXKfZ+taRJ2WNoIjTqQqHyW2oC63zCd4hz TB5xwZbOy48eOPyx9vqciBGhGPD+KiU= X-Google-Smtp-Source: AB8JxZq/p5hun7Z1bdksoVFRgwsx+FOWCFLzyft7cXmN09E0kFjqdWxGi0KnNaxZyvD9bS7j6JeE5Q== X-Received: by 2002:adf:dd03:: with SMTP id a3-v6mr12401057wrm.0.1526405865806; Tue, 15 May 2018 10:37:45 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 15 May 2018 19:37:32 +0200 Message-Id: <20180515173736.29639-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515173736.29639-1-ard.biesheuvel@linaro.org> References: <20180515173736.29639-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 1/5] Silicon/AMD/Styx: make ARM-TF and PSCI dependencies unconditional X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, neko@bakuhatsu.net, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The Styx platform theoretically supports running in an environment where no ARM Trusted Firmware is running in EL3 and PSCI is not implemented. This is not a configuration that we aim to support, and so let's remove the code that implements this, especially because it is essentially dead code and unmaintained. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 7 -- Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 7 -- Silicon/AMD/Styx/AcpiTables/AcpiTables.inf | 2 - Silicon/AMD/Styx/AcpiTables/Fadt.c | 5 +- Silicon/AMD/Styx/AmdStyx.dec | 5 -- Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c | 70 ------= -------------- Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf | 6 -- Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 - Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c | 58 ++++++= ++-------- Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf | 1 - Silicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf | 3 - Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 2 - 13 files changed, 29 insertions(+), 139 deletions(-) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/= OverdriveBoard/OverdriveBoard.dsc index 348828e18d44..86061cd4606f 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -19,7 +19,6 @@ [Defines] =20 DEFINE DO_XGBE =3D 1 DEFINE NUM_CORES =3D 8 -DEFINE DO_PSCI =3D 1 DEFINE DO_ISCP =3D 1 DEFINE DO_KCS =3D 1 DEFINE DO_FLASHER =3D FALSE @@ -457,12 +456,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC0000000= 00007FD1 =20 -!if $(DO_PSCI) - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE -!else - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|FALSE -!endif - !if $(DO_ISCP) gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE !else diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/= CelloBoard/CelloBoard.dsc index 007c36412b93..80b096ba5587 100644 --- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc +++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc @@ -431,7 +431,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC0000000= 00007FD1 =20 - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE =20 # SMBIOS 3.0 only diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/= Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc index 3f4c7c8a3eef..72eb943a8bfd 100644 --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc @@ -18,7 +18,6 @@ [Defines] =20 DEFINE NUM_CORES =3D 4 -DEFINE DO_PSCI =3D 1 DEFINE DO_ISCP =3D 1 DEFINE DO_KCS =3D 1 DEFINE DO_FLASHER =3D FALSE @@ -428,12 +427,6 @@ [PcdsFixedAtBuild.common] ## ACPI (no tables < 4GB) gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 =20 -!if $(DO_PSCI) - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE -!else - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|FALSE -!endif - !if $(DO_ISCP) gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE !else diff --git a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf b/Silicon/AMD/Styx/= AcpiTables/AcpiTables.inf index 057c52512e4e..bff5be4673a4 100644 --- a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf +++ b/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf @@ -82,8 +82,6 @@ [FixedPcd] gAmdStyxTokenSpaceGuid.PcdSbsaWakeUpGSIV gAmdStyxTokenSpaceGuid.PcdSbsaWatchDogGSIV gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion gAmdStyxTokenSpaceGuid.PcdSata1PortCount =20 diff --git a/Silicon/AMD/Styx/AcpiTables/Fadt.c b/Silicon/AMD/Styx/AcpiTabl= es/Fadt.c index bcbff3798883..bdf88a9c8e32 100644 --- a/Silicon/AMD/Styx/AcpiTables/Fadt.c +++ b/Silicon/AMD/Styx/AcpiTables/Fadt.c @@ -73,7 +73,7 @@ STATIC EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt= =3D { FADT_FLAGS, = // UINT32 Flags NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg 0, = // UINT8 ResetValue - 0, = // UINT16 ArmBootArch + EFI_ACPI_5_1_ARM_PSCI_COMPLIANT, = // UINT16 ArmBootArch 1, = // UINT8 MinorVersion 0, = // UINT64 XFirmwareCtrl 0, = // UINT64 XDsdt @@ -96,9 +96,6 @@ FadtTable ( VOID ) { - if (FixedPcdGetBool (PcdPsciOsSupport) && FixedPcdGetBool (PcdTrustedFWS= upport)) { - AcpiFadt.ArmBootArch =3D EFI_ACPI_5_1_ARM_PSCI_COMPLIANT; - } return (EFI_ACPI_DESCRIPTION_HEADER *) &AcpiFadt; } =20 diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec index 0d7e82f2d768..cffe1cafde8b 100644 --- a/Silicon/AMD/Styx/AmdStyx.dec +++ b/Silicon/AMD/Styx/AmdStyx.dec @@ -89,17 +89,12 @@ [PcdsFixedAtBuild] gAmdStyxTokenSpaceGuid.PcdSbsaWatchDogGSIV|369|UINT32|0x00050008 =20 # Trusted-Firmware - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport|TRUE|BOOLEAN|0x00060000 gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase|0x8000000000|UINT64|0x0006= 0001 gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize|0xE80000|UINT64|0x0006002 =20 # ISCP gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE|BOOLEAN|0x00070000 =20 - # PSCI - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport|TRUE|BOOLEAN|0x00080000 - gAmdStyxTokenSpaceGuid.PcdPsciCpuOnContext|0|UINT64|0x00080001 - # Cores Per cluster gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster|2|UINT32|0x00090000 =20 diff --git a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c b/Silicon/A= MD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c index fd5bb96f7c98..e713d5581925 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c +++ b/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c @@ -33,7 +33,6 @@ =20 =20 STATIC AMD_MP_CORE_INFO_PROTOCOL mAmdMpCoreInfoProtocol =3D { 0 }; -STATIC AMD_MP_BOOT_PROTOCOL mAmdMpBootProtocol =3D { 0 }; STATIC AMD_MP_BOOT_INFO mAmdMpBootInfo =3D { 0 }; =20 =20 @@ -56,13 +55,6 @@ AmdStyxGetMpParkingBase ( OUT UINTN *MpParkingSize ); =20 -STATIC -VOID -AmdStyxParkSecondaryCore ( - ARM_CORE_INFO *ArmCoreInfo, - EFI_PHYSICAL_ADDRESS SecondaryEntry - ); - =20 #pragma pack(push, 1) typedef struct _PMU_INFO { @@ -94,8 +86,6 @@ PlatInitDxeEntryPoint ( ) { EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS MpParkingBase; - UINTN MpParkingSize; ARM_CORE_INFO *ArmCoreInfoTable; UINTN ArmCoreCount; EFI_HANDLE Handle =3D NULL; @@ -120,39 +110,6 @@ PlatInitDxeEntryPoint ( ); ASSERT_EFI_ERROR (Status); =20 - // Install MP-Boot Protocol - if (!FixedPcdGetBool (PcdPsciOsSupport) && - FixedPcdGetBool (PcdTrustedFWSupport)) { - // Allocate Parking area (4KB-aligned, 4KB per core) as Reserved memory - MpParkingBase =3D 0; - MpParkingSize =3D ArmCoreCount * SIZE_4KB; - Status =3D gBS->AllocatePages (AllocateAnyPages, EfiReservedMemoryType, - EFI_SIZE_TO_PAGES (MpParkingSize), - &MpParkingBase); - if (EFI_ERROR (Status) || MpParkingBase =3D=3D 0) { - DEBUG ((EFI_D_ERROR, "Warning: Failed to allocate MpParkingBase.")); - } else { - mAmdMpBootInfo.MpParkingBase =3D MpParkingBase; - mAmdMpBootInfo.MpParkingSize =3D MpParkingSize; - mAmdMpBootInfo.ArmCoreInfoTable =3D ArmCoreInfoTable; - mAmdMpBootInfo.ArmCoreCount =3D ArmCoreCount; - - mAmdMpBootProtocol.ParkSecondaryCore =3D AmdStyxParkSecondaryCore; - mAmdMpBootProtocol.MpBootInfo =3D &mAmdMpBootInfo; - - Status =3D gBS->InstallProtocolInterface ( - &Handle, - &gAmdMpBootProtocolGuid, - EFI_NATIVE_INTERFACE, - (VOID *)&mAmdMpBootProtocol - ); - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Warning: Failed to install MP-Boot Protocol.= ")); - gBS->FreePages (MpParkingBase, EFI_SIZE_TO_PAGES (MpParkingSize)); - } - } - } - return Status; } =20 @@ -208,30 +165,3 @@ AmdStyxGetMpParkingBase ( *MpParkingSize =3D mAmdMpBootInfo.MpParkingBase; return mAmdMpBootInfo.MpParkingBase; } - - -STATIC -VOID -AmdStyxParkSecondaryCore ( - ARM_CORE_INFO *ArmCoreInfo, - EFI_PHYSICAL_ADDRESS SecondaryEntry - ) -{ - ARM_SMC_ARGS SmcRegs =3D {0}; - UINTN MpId; - - MpId =3D GET_MPID (ArmCoreInfo->ClusterId, ArmCoreInfo->CoreId); - - SmcRegs.Arg0 =3D ARM_SMC_ID_PSCI_CPU_ON_AARCH64; - SmcRegs.Arg1 =3D MpId; - SmcRegs.Arg2 =3D SecondaryEntry; - SmcRegs.Arg3 =3D FixedPcdGet64 (PcdPsciCpuOnContext); - ArmCallSmc (&SmcRegs); - - if (SmcRegs.Arg0 =3D=3D ARM_SMC_PSCI_RET_SUCCESS || - SmcRegs.Arg0 =3D=3D ARM_SMC_PSCI_RET_ALREADY_ON) { - DEBUG ((EFI_D_ERROR, "CPU[MpId] =3D 0x%X at RUN state.\n", MpId)); - } else { - DEBUG ((EFI_D_ERROR, "Warning: Could not transition CPU[MpId] =3D 0x%X= to RUN state.\n", MpId)); - } -} diff --git a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf b/Silicon= /AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf index 15f46be651b7..1ebde2723355 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf +++ b/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf @@ -51,12 +51,6 @@ [Guids] =20 [Protocols] gAmdMpCoreInfoProtocolGuid ## PRODUCER - gAmdMpBootProtocolGuid ## PRODUCER - -[FixedPcd] - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport - gAmdStyxTokenSpaceGuid.PcdPsciCpuOnContext - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport =20 [Depex] TRUE diff --git a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf b/Silicon= /AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf index 9f141946aea5..ccc079bebab2 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf +++ b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf @@ -68,7 +68,6 @@ [Pcd] =20 [FixedPcd] gAmdStyxTokenSpaceGuid.PcdIscpSupport - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdCpuIdRegister =20 [Depex] diff --git a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Si= licon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c index 70821d1b120b..67f90efdcb3f 100644 --- a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c +++ b/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c @@ -127,36 +127,34 @@ MemoryPeim ( =20 Base =3D PcdGet64 (PcdSystemMemoryBase); Size =3D PcdGet64 (PcdSystemMemorySize); - if (FixedPcdGetBool (PcdTrustedFWSupport)) { - - // - // For now, we assume that the trusted firmware region is at the base = of - // system memory, since that is much easier to deal with. - // - ASSERT (Base =3D=3D PcdGet64 (PcdTrustedFWMemoryBase)); - - Base +=3D PcdGet64 (PcdTrustedFWMemorySize); - Size -=3D PcdGet64 (PcdTrustedFWMemorySize); - - // Reserved Trusted Firmware region - BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, - ( EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | - EFI_RESOURCE_ATTRIBUTE_TESTED ), - PcdGet64 (PcdTrustedFWMemoryBase), - PcdGet64 (PcdTrustedFWMemorySize) - ); - - BuildMemoryAllocationHob ( - PcdGet64 (PcdTrustedFWMemoryBase), - PcdGet64 (PcdTrustedFWMemorySize), - EfiReservedMemoryType - ); - } + + // + // For now, we assume that the trusted firmware region is at the base of + // system memory, since that is much easier to deal with. + // + ASSERT (Base =3D=3D PcdGet64 (PcdTrustedFWMemoryBase)); + + Base +=3D PcdGet64 (PcdTrustedFWMemorySize); + Size -=3D PcdGet64 (PcdTrustedFWMemorySize); + + // Reserved Trusted Firmware region + BuildResourceDescriptorHob ( + EFI_RESOURCE_SYSTEM_MEMORY, + ( EFI_RESOURCE_ATTRIBUTE_PRESENT | + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | + EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | + EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | + EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | + EFI_RESOURCE_ATTRIBUTE_TESTED ), + PcdGet64 (PcdTrustedFWMemoryBase), + PcdGet64 (PcdTrustedFWMemorySize) + ); + + BuildMemoryAllocationHob ( + PcdGet64 (PcdTrustedFWMemoryBase), + PcdGet64 (PcdTrustedFWMemorySize), + EfiReservedMemoryType + ); =20 // Declare system memory BuildResourceDescriptorHob ( diff --git a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf b/= Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf index 724d71645d5a..d17e6c26feb5 100644 --- a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf +++ b/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf @@ -69,7 +69,6 @@ [FixedPcd] gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData =20 - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize =20 diff --git a/Silicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf b/S= ilicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf index 5a99fd79384a..d9faf3abb09a 100644 --- a/Silicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf +++ b/Silicon/AMD/Styx/Library/ResetSystemLib/ResetSystemLib.inf @@ -42,6 +42,3 @@ [LibraryClasses] PcdLib BaseLib ArmSmcLib - -[FixedPcd] - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf= b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf index fc8b25c92873..3f36799f5df1 100644 --- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf +++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf @@ -51,8 +51,6 @@ [Pcd] [FixedPcd] gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment - gAmdStyxTokenSpaceGuid.PcdPsciOsSupport - gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdSata1PortCount =20 [Guids] --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Dec 22 14:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526405873434379.9606929055019; Tue, 15 May 2018 10:37:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6675520348635; Tue, 15 May 2018 10:37:51 -0700 (PDT) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1E197209603D9 for ; Tue, 15 May 2018 10:37:49 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id y15-v6so987177wrg.11 for ; Tue, 15 May 2018 10:37:49 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id v75-v6sm814183wrc.65.2018.05.15.10.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 10:37:46 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RGF7sqd+567yVouByADXvhOOhLGBBsdPB2axphSHZ80=; b=aDxPeqmpS/TVmdlXz2T0ub3BN1qqGq5Q7pXPENDPH24ERrkO9ghnFK2lYkwefrS3SG FvBWRMP6ZnoTz75Lp9bf4+R2n/aIOWLD4UpjMdXOUdSOrgnEyZmejsV4KJBWjBvbwHAV 5JAGMSe5hOTHMF+jXBE/UY02O9fVAATDZbjVo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RGF7sqd+567yVouByADXvhOOhLGBBsdPB2axphSHZ80=; b=Lq0Etd91BUavYH3H69dUzY9vPPKyFCX1Nj7QsVelVIo4Xk4hnayN82Lg9BADPgK2PO vI4I7vjwffM6uQd8/T6NZwAPPcguoUyvUAsl6pE3LMosyt1TJM9DGfogjlw4gyajF7cm w44sytDDHWXKrCw3d0O6bC+x7VvVJX+AIPZ3h8xV4EMLU7jHLIZr3uvkHtRK833kwcF4 ld2FzwsdA7Qk9mSmPfkSOF0Sv/nwjFKrPn/Tu1nXi54i7JYvtSJQav6qax59nozjx1yE yvcz67FkNBN1T6Z55UaxcNsb/1Vb4qRXGYqhIybUdY1G86ft07TNU8MCDeUJ3G0vr7ib Iz7w== X-Gm-Message-State: ALKqPwdIlnIEIWbhf+1u+f0vC78HnCuZYfvlPQHaeUepaom1XCSIH5Z0 qkejKIvYW4Gd4dCMExYUy5svB0/ojc0= X-Google-Smtp-Source: AB8JxZoKqlTjLkMGvFmrh8VOnRzD/qKcyYA/NVuw0SuIKcecmJMW28v2Hjr64uJrCjJVYScQ7CViwA== X-Received: by 2002:adf:88b6:: with SMTP id f51-v6mr10617935wrf.55.1526405867871; Tue, 15 May 2018 10:37:47 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 15 May 2018 19:37:33 +0200 Message-Id: <20180515173736.29639-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515173736.29639-1-ard.biesheuvel@linaro.org> References: <20180515173736.29639-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 2/5] Silicon/AMD/Styx: remove MpBootDxe driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, neko@bakuhatsu.net, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" MpBootDxe implements support for the ACPI Parking Protocol and the DT based spintable protocol to bring up secondaries, neither of which are recommended on systems implementing EL3, are not enabled in the default build configuration of the platforms that include it and is therefore essentially dead code. (Note that this driver DEPEXes on a protocol that never gets installed when building this platform with ARM-TF and PSCI support, which we now do unconditionally) So let's remove it from the platform descriptions that refer to it, and remove the code altogether as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 5 - Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 5 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 5 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf | 5 - Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.c | 170 --------= ------------ Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf | 53 ------ Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootHelper.S | 87 --------= -- 7 files changed, 330 deletions(-) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/= OverdriveBoard/OverdriveBoard.dsc index 86061cd4606f..26b91ca88a2c 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -629,11 +629,6 @@ [Components.common] MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 - # - # MP-Boot: ACPI[Parking Protocol] + FDT[Spin-Table] - # - Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf - # # AHCI Support # diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/= OverdriveBoard/OverdriveBoard.fdf index 541d65ef753e..1ed32f68ef9d 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf @@ -222,11 +222,6 @@ [FV.FvMain] INF Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphic= sResourceTableDxe.inf =20 - # - # MP-Boot: ACPI[Parking Protocol] + FDT[Spin-Table] - # - INF Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf - # # SMBIOS Support # diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/= Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc index 72eb943a8bfd..8d50d78c30cd 100644 --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc @@ -563,11 +563,6 @@ [Components.common] MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 - # - # MP-Boot: ACPI[Parking Protocol] + FDT[Spin-Table] - # - Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf - # # AHCI Support # diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf b/= Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf index 38344fa406a3..e23533d1bddb 100644 --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.fdf @@ -220,11 +220,6 @@ [FV.FvMain] INF RuleOverride=3DACPITABLE Silicon/AMD/Styx/AcpiTables/AcpiAml.inf INF Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf =20 - # - # MP-Boot: ACPI[Parking Protocol] + FDT[Spin-Table] - # - INF Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf - # # SMBIOS Support # diff --git a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.c b/Silicon/AMD/S= tyx/Drivers/MpBootDxe/MpBootDxe.c deleted file mode 100644 index bd7244648ab0..000000000000 --- a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.c +++ /dev/null @@ -1,170 +0,0 @@ -/** @file - - Copyright (c) 2016, AMD Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* These externs are used to relocate our Pen code into pre-allocated memo= ry */ -extern VOID *SecondariesPenStart; -extern VOID *SecondariesPenEnd; -extern UINTN *AsmParkingBase; -extern UINTN *AsmMailboxBase; - - -STATIC -EFI_PHYSICAL_ADDRESS -ConfigurePen ( - IN EFI_PHYSICAL_ADDRESS MpParkingBase, - IN UINTN MpParkingSize, - IN ARM_CORE_INFO *ArmCoreInfoTable, - IN UINTN ArmCoreCount - ) -{ - EFI_PHYSICAL_ADDRESS PenBase; - UINTN PenSize; - UINTN MailboxBase; - UINTN CoreNum; - UINTN CoreMailbox; - UINTN CoreParking; - - // - // Set Pen at the 2K-offset of the Parking area, skipping an 8-byte slot= for the Core#. - // For details, refer to the "Multi-processor Startup for ARM Platforms"= document: - // https://acpica.org/sites/acpica/files/MP%20Startup%20for%20ARM%20plat= forms.docx - // - PenBase =3D (EFI_PHYSICAL_ADDRESS)((UINTN)MpParkingBase + SIZE_2KB + siz= eof(UINT64)); - PenSize =3D (UINTN)&SecondariesPenEnd - (UINTN)&SecondariesPenStart; - - // Relocate the Pen code - CopyMem ((VOID*)(PenBase), (VOID*)&SecondariesPenStart, PenSize); - - // Put spin-table mailboxes below the pen code so we know where they are= relative to code. - // Make sure this is 8 byte aligned. - MailboxBase =3D (UINTN)PenBase + ((UINTN)&SecondariesPenEnd - (UINTN)&Se= condariesPenStart); - if (MailboxBase % sizeof(UINT64) !=3D 0) { - MailboxBase +=3D sizeof(UINT64) - MailboxBase % sizeof(UINT64); - } - - // Update variables used in the Pen code - *(UINTN*)(PenBase + ((UINTN)&AsmMailboxBase - (UINTN)&SecondariesPenStar= t)) =3D MailboxBase; - *(UINTN*)(PenBase + ((UINTN)&AsmParkingBase - (UINTN)&SecondariesPenStar= t)) =3D (UINTN)MpParkingBase; - - for (CoreNum =3D 0; CoreNum < ArmCoreCount; CoreNum++) { - // Clear the jump address at spin-table slot - CoreMailbox =3D MailboxBase + CoreNum * sizeof (UINT64); - *((UINTN*)(CoreMailbox)) =3D 0x0; - - // Clear the jump address and set Core# at mp-parking slot - CoreParking =3D (UINTN)MpParkingBase + CoreNum * SIZE_4KB; - *((UINTN*)(CoreParking + sizeof (UINT64))) =3D 0x0; - *((UINTN*)(CoreParking + SIZE_2KB)) =3D CoreNum; - - // Update table entry to be consumed by FDT parser - ArmCoreInfoTable[CoreNum].MailboxSetAddress =3D CoreMailbox; - } - - // flush the cache before launching secondary cores - WriteBackDataCacheRange ((VOID *)MpParkingBase, MpParkingSize); - - return PenBase; -} - - -EFI_STATUS -EFIAPI -MpBootDxeEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - AMD_MP_BOOT_PROTOCOL *MpBootProtocol; - EFI_PHYSICAL_ADDRESS MpParkingBase; - UINTN MpParkingSize; - ARM_CORE_INFO *ArmCoreInfoTable; - UINTN ArmCoreCount; - UINTN CoreNum; - EFI_PHYSICAL_ADDRESS PenBase; - - DEBUG ((EFI_D_ERROR, "MpBootDxe Loaded\n")); - - MpBootProtocol =3D NULL; - Status =3D gBS->LocateProtocol ( - &gAmdMpBootProtocolGuid, - NULL, - (VOID **)&MpBootProtocol - ); - if (EFI_ERROR (Status) || MpBootProtocol =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Warning: Failed to locate MP-Boot Protocol.\n")); - return EFI_UNSUPPORTED; - } - - if ((VOID *)MpBootProtocol->MpBootInfo =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Warning: MpBootInfo not allocated.\n")); - return EFI_UNSUPPORTED; - } - - MpParkingBase =3D MpBootProtocol->MpBootInfo->MpParkingBase; - if ((VOID *)MpParkingBase =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Warning: MpParkingBase not allocated.\n")); - return EFI_UNSUPPORTED; - } - if (((UINTN)MpParkingBase & (SIZE_4KB -1)) !=3D 0) { - DEBUG ((EFI_D_ERROR, "Warning: MpParkingBase not 4K aligned.\n")); - return EFI_UNSUPPORTED; - } - - ArmCoreInfoTable =3D MpBootProtocol->MpBootInfo->ArmCoreInfoTable; - if (ArmCoreInfoTable =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Warning: ArmCoreInfoTable not allocated.\n")); - return EFI_UNSUPPORTED; - } - - ArmCoreCount =3D MpBootProtocol->MpBootInfo->ArmCoreCount; - if (ArmCoreCount < 2) { - DEBUG ((EFI_D_ERROR, "Warning: Found %d cores.\n", ArmCoreCount)); - return EFI_UNSUPPORTED; - } - - MpParkingSize =3D ArmCoreCount * SIZE_4KB; - if (MpParkingSize > MpBootProtocol->MpBootInfo->MpParkingSize) { - DEBUG ((EFI_D_ERROR, "Warning: MpParkingSize =3D 0x%lX, not large enou= gh for %d cores.\n", - MpBootProtocol->MpBootInfo->MpParkingSize, ArmCoreCount)); - return EFI_UNSUPPORTED; - } - - if ((VOID *)MpBootProtocol->ParkSecondaryCore =3D=3D NULL) { - DEBUG ((EFI_D_ERROR, "Warning: ParkSecondaryCore() not supported.\n")); - return EFI_UNSUPPORTED; - } - - // Move secondary cores to our new Pen - PenBase =3D ConfigurePen (MpParkingBase, MpParkingSize, ArmCoreInfoTable= , ArmCoreCount); - for (CoreNum =3D 0; CoreNum < ArmCoreCount; CoreNum++) { - MpBootProtocol->ParkSecondaryCore (&ArmCoreInfoTable[CoreNum], PenBase= ); - } - - return EFI_SUCCESS; -} - - diff --git a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf b/Silicon/AMD= /Styx/Drivers/MpBootDxe/MpBootDxe.inf deleted file mode 100644 index ec63cd36e804..000000000000 --- a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootDxe.inf +++ /dev/null @@ -1,53 +0,0 @@ -#/* @file -# -# Copyright (c) 2016, AMD Inc. All rights reserved.
-# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the B= SD License -# which accompanies this distribution. The full text of the license may = be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. -# -#*/ - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D MpBootDxe - FILE_GUID =3D ff3f9c9b-6d36-4787-9144-6b22acba5e9b - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D MpBootDxeEntryPoint - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D AARCH64 -# -# - -[Sources.common] - MpBootDxe.c - -[Sources.AARCH64] - MpBootHelper.S - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - Silicon/AMD/Styx/AmdModulePkg/AmdModulePkg.dec - Silicon/AMD/Styx/AmdStyx.dec - -[LibraryClasses] - UefiDriverEntryPoint - UefiBootServicesTableLib - CacheMaintenanceLib - BaseMemoryLib - DebugLib - -[Protocols] - gAmdMpBootProtocolGuid ## CONSUMED - -[Depex] - gAmdMpBootProtocolGuid diff --git a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootHelper.S b/Silicon/AM= D/Styx/Drivers/MpBootDxe/MpBootHelper.S deleted file mode 100644 index c16cc59a1e5e..000000000000 --- a/Silicon/AMD/Styx/Drivers/MpBootDxe/MpBootHelper.S +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) 2011-2013, ARM Limited. All rights reserved. -// Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.
-// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the = BSD License -// which accompanies this distribution. The full text of the license may= be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. -// -//** -// Derived from: -// ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoaderHelper.S -// -//** - -/* Secondary core pens for AArch64 Linux booting. - - This code is placed in Linux kernel memory and marked reserved. UEFI en= sures - that the secondary cores get to this pen and the kernel can then start = the - cores from here. - NOTE: This code must be self-contained. -*/ - -#include - -.text -.align 3 - -GCC_ASM_EXPORT(SecondariesPenStart) -ASM_GLOBAL SecondariesPenEnd - -ASM_PFX(SecondariesPenStart): - // Registers x0-x3 are reserved for future use and should be set to zer= o. - mov x0, xzr - mov x1, xzr - mov x2, xzr - mov x3, xzr - - mrs x4, mpidr_el1 // Get MPCore register - and x5, x4, #ARM_CORE_MASK // Get core number - and x4, x4, #ARM_CLUSTER_MASK // Get cluster number - - add x4, x5, x4, LSR #7 // Add scaled cluster number to core numb= er - mov x6, x4 // Save a copy to compute mp-parking offs= et - - ldr x5, AsmMailboxBase // Get mailbox addr relative to PC - lsl x4, x4, 3 // Add 8-byte offset for this core - add x4, x4, x5 // - - ldr x5, AsmParkingBase // Get mp-parking addr relative to PC - lsl x6, x6, 12 // Add 4K-byte offset for this core - add x6, x6, x5 // - - mov x5, 1 // Get mp-parking id# at 2K offset - lsl x5, x5, 11 // - add x5, x5, x6 // - ldr x10, [x5] // - -1: ldr x5, [x4] // Load jump-addr from spin-table mailbox - cmp xzr, x5 // Has the value been set? - b.ne 4f // If so, break out of loop - - ldr x5, [x6] // Load mp-parking id# - cmp w10, w5 // Is it my id? - b.ne 2f // If not, continue polling - - ldr x5, [x6, 8] // Load jump-addr from mp-parking - cmp xzr, x5 // Has the value been set? - b.ne 3f // If so, break out of loop - -2: wfe // Wait a bit - b 1b // Wait over, check again - -3: str xzr, [x6, 8] // Clear to acknowledge - mov x0, x6 // Return mp-parking address -4: br x5 // Jump to new addr - -.align 3 // Make sure the variable below is 8 byte aligned. - .global AsmParkingBase -AsmParkingBase: .xword 0xdeaddeadbeefbeef - .global AsmMailboxBase -AsmMailboxBase: .xword 0xdeaddeadbeefbeef - -SecondariesPenEnd: --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Dec 22 14:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526405876548473.89310090214906; Tue, 15 May 2018 10:37:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 92030209603E7; Tue, 15 May 2018 10:37:54 -0700 (PDT) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 500FE20348632 for ; Tue, 15 May 2018 10:37:51 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id v60-v6so1003120wrc.7 for ; Tue, 15 May 2018 10:37:51 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id v75-v6sm814183wrc.65.2018.05.15.10.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 10:37:48 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z6UIXSs8PNpFoSJO2TkFmet98acvG2q4F3jghyfpuqA=; b=EFHtlTNGww9xbfcUUEfB4jGvmNfdwo3FSgCRwIP+Oo2h3tpDVOrxyGSJtfrgZd0Tu3 pT0vHp8i0LIaClKN6Rekh2+PkOYBYEQWDxmAwf2qsmrquZsiQ75g+tzzoMd7fDK1S8ni iqfl3X7ZIMsZrZZhTEPszPjMSstQbhDzmfQQ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z6UIXSs8PNpFoSJO2TkFmet98acvG2q4F3jghyfpuqA=; b=DSc/YGPUW7sCYK3EfepgPkgut6Iay9B7BFzHmQ+icCXqnc8yVA/ENY/ie0bXIg3vgr 9sJIAeFmt9xU5VExweZE2GZ4+3/baoWdqnSwQtD/Dqr+x38jYWQ6QZxsAjQFHVN4i0+f JSnEwrbzpMHfGivuvmD2KHOId7MtHU7fMrMSGrRvzKJnQjPKheIqqCbq1oVDl7RzFFmQ shSYjlpLBbpLk+G80qhhsGNH7tw7We1Gteh/OuwFN1uFtaRccbpWQJzFyBhXoqCukHb9 P9Ot41A21pGkjz3W3k2aMH5f/QMZaMmBd/2oAW33h6z4pf8GKXt+cGCP379Ol3L6pExj /0Vw== X-Gm-Message-State: ALKqPwfZNY1GppgtcgJNs9P1jlapzke8ivt6UzJ+pCPdDq6jV3JYHBX4 ns3Dw9URamocG8AbcDcE2CutLWJwQL4= X-Google-Smtp-Source: AB8JxZqBavWDfpedUKoFEHCNzhi2oH8bDIpBDgl6RT27GifH39SE0OnaPLbyaiAJKv6kKngCJyP8JA== X-Received: by 2002:adf:abab:: with SMTP id s40-v6mr12033178wrc.259.1526405869581; Tue, 15 May 2018 10:37:49 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 15 May 2018 19:37:34 +0200 Message-Id: <20180515173736.29639-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515173736.29639-1-ard.biesheuvel@linaro.org> References: <20180515173736.29639-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 3/5] Silicon/AMD/Styx: remove support for the ACPI parking protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, neko@bakuhatsu.net, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The ACPI parking protocol is a kludge to allow SOC implementations that lack EL3 support to bring up secondaries in a standardized manner. Since our UEFI implementation unconditionally relies on ARM Trusted Firmware and PSCI now, there is no point in supporting the parking protocol any longer so let's remove it. (Note also that the implementation of AmdStyxGetMpParkingBase is flawed, so it is unsure whether it has ever worked in reality) Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Silicon/AMD/Styx/AcpiTables/AcpiTables.inf | 1 - Silicon/AMD/Styx/AcpiTables/Madt.c | 24 ++---------- Silicon/AMD/Styx/AmdStyx.dec | 4 -- Silicon/AMD/Styx/Common/Protocol/AmdMpBoot.h | 39 ------------------= -- Silicon/AMD/Styx/Common/Protocol/AmdMpCoreInfo.h | 7 ---- Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c | 21 ----------- 6 files changed, 3 insertions(+), 93 deletions(-) diff --git a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf b/Silicon/AMD/Styx/= AcpiTables/AcpiTables.inf index bff5be4673a4..4ae64ac22665 100644 --- a/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf +++ b/Silicon/AMD/Styx/AcpiTables/AcpiTables.inf @@ -82,7 +82,6 @@ [FixedPcd] gAmdStyxTokenSpaceGuid.PcdSbsaWakeUpGSIV gAmdStyxTokenSpaceGuid.PcdSbsaWatchDogGSIV gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster - gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion gAmdStyxTokenSpaceGuid.PcdSata1PortCount =20 [Depex] diff --git a/Silicon/AMD/Styx/AcpiTables/Madt.c b/Silicon/AMD/Styx/AcpiTabl= es/Madt.c index 96182e790f98..43d415c8bc32 100644 --- a/Silicon/AMD/Styx/AcpiTables/Madt.c +++ b/Silicon/AMD/Styx/AcpiTables/Madt.c @@ -57,12 +57,7 @@ AMD_MP_CORE_INFO_PROTOCOL *mAmdMpCoreInfoProtocol =3D N= ULL; #define MSI_TYPER_FLAG ( 0 ) // Use TYPER register a= nd ignore Count/Base fields #endif =20 -#define PARKING_PROTOCOL_VERSION (FixedPcdGet32 (PcdParkingPro= tocolVersion)) -#define PARKED_OFFSET ( 4096 ) - #define CORES_PER_CLUSTER (FixedPcdGet32 (PcdSocCoresPe= rCluster)) -#define PARKED_ADDRESS(Base, ClusterId, CoreId) \ - ((Base) + (CORES_PER_CLUSTER * ClusterId + CoreId) * PARKED_OFFSET) =20 =20 /* Macro to populate EFI_ACPI_5_1_GIC_STRUCTURE */ @@ -73,7 +68,7 @@ AMD_MP_CORE_INFO_PROTOCOL *mAmdMpCoreInfoProtocol =3D NU= LL; CpuNum, /* UINT32 CPUInterfaceNumber */ = \ (ClusterId << 8) | CoreId, /* UINT32 AcpiProcessorUid */ = \ EFI_ACPI_5_1_GIC_ENABLED, /* UINT32 Flags */ = \ - PARKING_PROTOCOL_VERSION, /* UINT32 ParkingProtocolVersion *= / \ + 0, /* UINT32 ParkingProtocolVersion *= / \ PerfInt, /* UINT32 PerformanceInterruptGsiv= */ \ 0, /* UINT64 ParkedAddress */ = \ GIC_BASE, /* UINT64 PhysicalBaseAddress */ = \ @@ -194,8 +189,7 @@ BuildGicC ( EFI_ACPI_5_1_GIC_STRUCTURE *GicC, UINT32 CpuNum, UINT32 ClusterId, - UINT32 CoreId, - EFI_PHYSICAL_ADDRESS MpParkingBase + UINT32 CoreId ) { UINT32 MpId, PmuSpi; @@ -212,8 +206,6 @@ BuildGicC ( GicC->CPUInterfaceNumber =3D CpuNum; GicC->AcpiProcessorUid =3D MpId; GicC->Flags =3D EFI_ACPI_5_1_GIC_ENABLED; - GicC->ParkingProtocolVersion =3D PARKING_PROTOCOL_VERSION; - GicC->ParkedAddress =3D PARKED_ADDRESS(MpParkingBase, ClusterId, CoreId); GicC->PhysicalBaseAddress =3D GIC_BASE; GicC->GICV =3D GICV_BASE; GicC->GICH =3D GICH_BASE; @@ -281,8 +273,6 @@ MadtHeader ( ARM_CORE_INFO *ArmCoreInfoTable; UINTN CoreCount, CpuNum; EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS MpParkingBase; - UINTN MpParkingSize; =20 Status =3D gBS->LocateProtocol ( &gAmdMpCoreInfoProtocolGuid, @@ -299,13 +289,6 @@ MadtHeader ( ASSERT (CoreCount <=3D NUM_CORES); ASSERT (CoreCount <=3D PcdGet32(PcdSocCoreCount)); =20 - MpParkingSize =3D 0; - MpParkingBase =3D mAmdMpCoreInfoProtocol->GetMpParkingBase(&MpParkingSi= ze); - if (MpParkingBase && MpParkingSize < (CoreCount * SIZE_4KB)) { - DEBUG ((EFI_D_ERROR, "MADT: Parking Protocol not supported.\n")); - MpParkingBase =3D 0; - } - GicC =3D (EFI_ACPI_5_1_GIC_STRUCTURE *)&AcpiMadt.GicC[0]; AcpiMadt.Header.Header.Length =3D sizeof (EFI_ACPI_5_1_MULTIPLE_APIC_DES= CRIPTION_TABLE_HEADER); =20 @@ -315,8 +298,7 @@ MadtHeader ( =20 Status =3D BuildGicC (GicC, CpuNum, ArmCoreInfoTable[CpuNum].ClusterId, - ArmCoreInfoTable[CpuNum].CoreId, - MpParkingBase + ArmCoreInfoTable[CpuNum].CoreId ); ASSERT_EFI_ERROR (Status); =20 diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec index cffe1cafde8b..1eb1ce801e0b 100644 --- a/Silicon/AMD/Styx/AmdStyx.dec +++ b/Silicon/AMD/Styx/AmdStyx.dec @@ -28,7 +28,6 @@ [Ppis] gAmdStyxPlatInitPpiGuid =3D { 0xcbff429c, 0xd3e3, 0x4c50, { 0xac, 0x1= a, 0x1c, 0xd2, 0xfe, 0x15, 0x1a, 0xd7 } } =20 [Protocols] - gAmdMpBootProtocolGuid =3D { 0xe21eac84, 0x9fbf, 0x4808, { 0x83, 0x9= 3, 0xe1, 0x93, 0x97, 0x23, 0x48, 0xab } } gAmdMpCoreInfoProtocolGuid =3D { 0x0dba25f8, 0x2da1, 0x4ec5, { 0x89, 0x5= d, 0x32, 0x1e, 0xd6, 0x1e, 0x3f, 0x43 } } =20 [Guids] @@ -101,9 +100,6 @@ [PcdsFixedAtBuild] # UEFI entry point gAmdStyxTokenSpaceGuid.PcdUefiEntryAddress|0x8000E80000|UINT64|0x000a0000 =20 - # Parking Protocol - gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion|1|UINT32|0x000b0000 - # The original offset in memory of the NV store firmware volume, before # relocating it to a dynamically allocated buffer. We need this to corre= late # flash accesses to the in-memory copy with LBAs in the actual SPI flash diff --git a/Silicon/AMD/Styx/Common/Protocol/AmdMpBoot.h b/Silicon/AMD/Sty= x/Common/Protocol/AmdMpBoot.h deleted file mode 100644 index 2aa4c55ccbaf..000000000000 --- a/Silicon/AMD/Styx/Common/Protocol/AmdMpBoot.h +++ /dev/null @@ -1,39 +0,0 @@ -/** @file - - Copyright (c) 2016, AMD Inc. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#ifndef _AMD_MP_BOOT_H_ -#define _AMD_MP_BOOT_H_ - -extern EFI_GUID gAmdMpBootProtocolGuid; - -typedef -VOID -(EFIAPI *PARK_SECONDARY_CORE) ( - IN ARM_CORE_INFO *ArmCoreInfo, - IN EFI_PHYSICAL_ADDRESS SecondaryEntry - ); - -typedef struct _AMD_MP_BOOT_INFO { - EFI_PHYSICAL_ADDRESS MpParkingBase; - UINTN MpParkingSize; - ARM_CORE_INFO *ArmCoreInfoTable; - UINTN ArmCoreCount; -} AMD_MP_BOOT_INFO; - -typedef struct _AMD_MP_BOOT_PROTOCOL { - PARK_SECONDARY_CORE ParkSecondaryCore; - AMD_MP_BOOT_INFO *MpBootInfo; -} AMD_MP_BOOT_PROTOCOL; - -#endif // _AMD_MP_BOOT_H_ diff --git a/Silicon/AMD/Styx/Common/Protocol/AmdMpCoreInfo.h b/Silicon/AMD= /Styx/Common/Protocol/AmdMpCoreInfo.h index 95f46e8af962..e6aa8fb1bec9 100644 --- a/Silicon/AMD/Styx/Common/Protocol/AmdMpCoreInfo.h +++ b/Silicon/AMD/Styx/Common/Protocol/AmdMpCoreInfo.h @@ -30,16 +30,9 @@ EFI_STATUS OUT UINT32 *PmuSpi ); =20 -typedef -EFI_PHYSICAL_ADDRESS -(EFIAPI *GET_MP_PARKING_BASE) ( - OUT UINTN *MpParkingSize - ); - typedef struct _AMD_MP_CORE_INFO_PROTOCOL { GET_ARM_CORE_INFO_TABLE GetArmCoreInfoTable; GET_PMU_SPI_FROM_MPID GetPmuSpiFromMpId; - GET_MP_PARKING_BASE GetMpParkingBase; } AMD_MP_CORE_INFO_PROTOCOL; =20 #endif // _AMD_MP_CORE_INFO_H_ diff --git a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c b/Silicon/A= MD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c index e713d5581925..68f97fb89148 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c +++ b/Silicon/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.c @@ -29,11 +29,9 @@ #include =20 #include -#include =20 =20 STATIC AMD_MP_CORE_INFO_PROTOCOL mAmdMpCoreInfoProtocol =3D { 0 }; -STATIC AMD_MP_BOOT_INFO mAmdMpBootInfo =3D { 0 }; =20 =20 STATIC @@ -49,12 +47,6 @@ AmdStyxGetPmuSpiFromMpId ( OUT UINT32 *PmuSpi ); =20 -STATIC -EFI_PHYSICAL_ADDRESS -AmdStyxGetMpParkingBase ( - OUT UINTN *MpParkingSize - ); - =20 #pragma pack(push, 1) typedef struct _PMU_INFO { @@ -101,7 +93,6 @@ PlatInitDxeEntryPoint ( // Install CoreInfo Protocol mAmdMpCoreInfoProtocol.GetArmCoreInfoTable =3D AmdStyxGetArmCoreInfoTabl= e; mAmdMpCoreInfoProtocol.GetPmuSpiFromMpId =3D AmdStyxGetPmuSpiFromMpId; - mAmdMpCoreInfoProtocol.GetMpParkingBase =3D AmdStyxGetMpParkingBase; Status =3D gBS->InstallProtocolInterface ( &Handle, &gAmdMpCoreInfoProtocolGuid, @@ -153,15 +144,3 @@ AmdStyxGetPmuSpiFromMpId ( return EFI_INVALID_PARAMETER; } =20 - -STATIC -EFI_PHYSICAL_ADDRESS -AmdStyxGetMpParkingBase ( - OUT UINTN *MpParkingSize - ) -{ - ASSERT (MpParkingSize !=3D NULL); - - *MpParkingSize =3D mAmdMpBootInfo.MpParkingBase; - return mAmdMpBootInfo.MpParkingBase; -} --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Dec 22 14:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526405880156580.2435313945698; Tue, 15 May 2018 10:38:00 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BEAE42034863B; Tue, 15 May 2018 10:37:55 -0700 (PDT) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B7909209603D9 for ; Tue, 15 May 2018 10:37:53 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id f8-v6so2641502wmc.4 for ; Tue, 15 May 2018 10:37:53 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id v75-v6sm814183wrc.65.2018.05.15.10.37.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 10:37:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Jn0im5+tXL8rl51MlKrQb1X7aGSjULzplqKXrDuOk88=; b=RZDIFtGGqhQiQJpxIQ2WQtPj+pwJKeLP8WHEfwjeF8ijqcnxBArv3+7dXxJJdiitMY p0tT/WB1UAol4sV/xlPBWu7YZgGpHFm8yGT58/I34cNCH2CaEgRGI3vfiVIHwUer9T5E vmcaPoivgZ4tX63fG6S/EXbxRVa4KAchnxcBU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jn0im5+tXL8rl51MlKrQb1X7aGSjULzplqKXrDuOk88=; b=H7wVqcklUBzKAXF2k2oGycK6SN9OXFz0bSWht9EFNkL8NQ1LjefORTgag6Y4vqkx6M ZrNTZZ4luh+eFHRZG2HstnHfD7i2TdTEKzBL72VQ4nOJcNHxygciKAqpYkjkoQJRQ0Ma 2fHWf3OXxOZCqxqCV//FJIAYJYg4q64hDlAQUFl94FjniWCGUjBixj++0pPbKdP1CuAL nD2n2TMQQj2Nwk6sxmBp6INRvzAifdvsdXKDq/UhQgEa+qjEAbzOE6Cgxe6jLvcYKvov c4hdetBRAGStpEwbAnVUmYFbzAto847yiDgRjsn3LFFlhbqjQPyoEB61Uq7ZYJPK2f8u gSbQ== X-Gm-Message-State: ALKqPwe53KcQ8y8TNwQAspVdq/xKLftSaW9tOFxQK7n/1zv/EhF8j4JQ 8g/a4nq6lOkIhmdIuZX8I+kJfMwgfZ4= X-Google-Smtp-Source: AB8JxZqbTzX5Sd+xDCqFLzNdRZw+IJYOgzImVBTyQ4mXjwvQidZIhQu9KrQqRe24JqduCqIJVbMDFQ== X-Received: by 2002:a1c:e854:: with SMTP id f81-v6mr2037602wmh.14.1526405871517; Tue, 15 May 2018 10:37:51 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 15 May 2018 19:37:35 +0200 Message-Id: <20180515173736.29639-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515173736.29639-1-ard.biesheuvel@linaro.org> References: <20180515173736.29639-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 4/5] Silicon/AMD/Styx: make ISCP dependency unconditional X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, neko@bakuhatsu.net, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The Styx code can be built without relying on the ISCP, but doing so is rather pointless, and is essentially dead code because nobody ever does that. Let's just remove this feature. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 7 -- Platform/LeMaker/CelloBoard/CelloBoard.dsc | 2 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 7 -- Silicon/AMD/Styx/AmdStyx.dec | 3 - Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c | 120 +++= ++++++----------- Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf | 1 - Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 40 ---= ---- Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf | 1 - Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf | 2 - Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c | 16 +-- Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf | 3 - 11 files changed, 55 insertions(+), 147 deletions(-) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/= OverdriveBoard/OverdriveBoard.dsc index 26b91ca88a2c..7bc1ab937813 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -19,7 +19,6 @@ [Defines] =20 DEFINE DO_XGBE =3D 1 DEFINE NUM_CORES =3D 8 -DEFINE DO_ISCP =3D 1 DEFINE DO_KCS =3D 1 DEFINE DO_FLASHER =3D FALSE DEFINE DO_CAPSULE =3D FALSE @@ -456,12 +455,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC0000000= 00007FD1 =20 -!if $(DO_ISCP) - gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE -!else - gAmdStyxTokenSpaceGuid.PcdIscpSupport|FALSE -!endif - # SMBIOS 3.0 only gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 =20 diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/= CelloBoard/CelloBoard.dsc index 80b096ba5587..1acfe7e93fad 100644 --- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc +++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc @@ -431,8 +431,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC0000000= 00007FD1 =20 - gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE - # SMBIOS 3.0 only gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 =20 diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/= Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc index 8d50d78c30cd..8d0a5bdc5270 100644 --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc @@ -18,7 +18,6 @@ [Defines] =20 DEFINE NUM_CORES =3D 4 -DEFINE DO_ISCP =3D 1 DEFINE DO_KCS =3D 1 DEFINE DO_FLASHER =3D FALSE =20 @@ -427,12 +426,6 @@ [PcdsFixedAtBuild.common] ## ACPI (no tables < 4GB) gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 =20 -!if $(DO_ISCP) - gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE -!else - gAmdStyxTokenSpaceGuid.PcdIscpSupport|FALSE -!endif - # SMBIOS 3.0 only gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 =20 diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec index 1eb1ce801e0b..eeded93a32e2 100644 --- a/Silicon/AMD/Styx/AmdStyx.dec +++ b/Silicon/AMD/Styx/AmdStyx.dec @@ -91,9 +91,6 @@ [PcdsFixedAtBuild] gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase|0x8000000000|UINT64|0x0006= 0001 gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize|0xE80000|UINT64|0x0006002 =20 - # ISCP - gAmdStyxTokenSpaceGuid.PcdIscpSupport|TRUE|BOOLEAN|0x00070000 - # Cores Per cluster gAmdStyxTokenSpaceGuid.PcdSocCoresPerCluster|2|UINT32|0x00090000 =20 diff --git a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c b/Silicon/A= MD/Styx/Drivers/PlatInitPei/PlatInitPei.c index 61e373406bcc..4ea1dd4b3577 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c +++ b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.c @@ -140,64 +140,56 @@ PlatInitPeiEntryPoint ( mAmdCoreCount =3D PcdGet32 (PcdSocCoreCount); } =20 - if (FixedPcdGetBool (PcdIscpSupport)) { - Status =3D PeiServicesLocatePpi (&gPeiIscpPpiGuid, 0, NULL, (VOID**)&P= eiIscpPpi); - ASSERT_EFI_ERROR (Status); + Status =3D PeiServicesLocatePpi (&gPeiIscpPpiGuid, 0, NULL, (VOID**)&Pei= IscpPpi); + ASSERT_EFI_ERROR (Status); =20 - // Get fuse information from ISCP - Status =3D PeiIscpPpi->ExecuteFuseTransaction (PeiServices, &IscpFuseI= nfo); - ASSERT_EFI_ERROR (Status); + // Get fuse information from ISCP + Status =3D PeiIscpPpi->ExecuteFuseTransaction (PeiServices, &IscpFuseInf= o); + ASSERT_EFI_ERROR (Status); =20 - CpuMap =3D IscpFuseInfo.SocConfiguration.CpuMap; - CpuCoreCount =3D IscpFuseInfo.SocConfiguration.CpuCoreCount; - CpuMapSize =3D sizeof (IscpFuseInfo.SocConfiguration.CpuMap) * 8; + CpuMap =3D IscpFuseInfo.SocConfiguration.CpuMap; + CpuCoreCount =3D IscpFuseInfo.SocConfiguration.CpuCoreCount; + CpuMapSize =3D sizeof (IscpFuseInfo.SocConfiguration.CpuMap) * 8; =20 - ASSERT (CpuMap !=3D 0); - ASSERT (CpuCoreCount !=3D 0); - ASSERT (CpuCoreCount <=3D CpuMapSize); + ASSERT (CpuMap !=3D 0); + ASSERT (CpuCoreCount !=3D 0); + ASSERT (CpuCoreCount <=3D CpuMapSize); =20 - // Update core count based on fusing - if (mAmdCoreCount > CpuCoreCount) { - mAmdCoreCount =3D CpuCoreCount; - } + // Update core count based on fusing + if (mAmdCoreCount > CpuCoreCount) { + mAmdCoreCount =3D CpuCoreCount; } =20 // // Update per-core information from ISCP + // Walk CPU map to enumerate active cores // - if (!FixedPcdGetBool (PcdIscpSupport)) { - DEBUG ((EFI_D_ERROR, "Warning: Could not get CPU info via ISCP, using = default values.\n")); - } else { - // - // Walk CPU map to enumerate active cores - // - for (CoreNum =3D 0, Index =3D 0; CoreNum < CpuMapSize && Index < mAmdC= oreCount; ++CoreNum) { - if (CpuMap & 1) { - CpuResetInfo.CoreNum =3D CoreNum; - Status =3D PeiIscpPpi->ExecuteCpuRetrieveIdTransaction ( - PeiServices, &CpuResetInfo ); - ASSERT_EFI_ERROR (Status); - ASSERT (CpuResetInfo.CoreStatus.Status !=3D CPU_CORE_DISABLED); - ASSERT (CpuResetInfo.CoreStatus.Status !=3D CPU_CORE_UNDEFINED); - - mAmdMpCoreInfoTable[Index].ClusterId =3D CpuResetInfo.CoreStatus.C= lusterId; - mAmdMpCoreInfoTable[Index].CoreId =3D CpuResetInfo.CoreStatus.Core= Id; - - DEBUG ((EFI_D_ERROR, "Core[%d]: ClusterId =3D %d CoreId =3D %d\n= ", - Index, mAmdMpCoreInfoTable[Index].ClusterId, - mAmdMpCoreInfoTable[Index].CoreId)); - - // Next core in Table - ++Index; - } - // Next core in Map - CpuMap >>=3D 1; + for (CoreNum =3D 0, Index =3D 0; CoreNum < CpuMapSize && Index < mAmdCor= eCount; ++CoreNum) { + if (CpuMap & 1) { + CpuResetInfo.CoreNum =3D CoreNum; + Status =3D PeiIscpPpi->ExecuteCpuRetrieveIdTransaction ( + PeiServices, &CpuResetInfo ); + ASSERT_EFI_ERROR (Status); + ASSERT (CpuResetInfo.CoreStatus.Status !=3D CPU_CORE_DISABLED); + ASSERT (CpuResetInfo.CoreStatus.Status !=3D CPU_CORE_UNDEFINED); + + mAmdMpCoreInfoTable[Index].ClusterId =3D CpuResetInfo.CoreStatus.Clu= sterId; + mAmdMpCoreInfoTable[Index].CoreId =3D CpuResetInfo.CoreStatus.CoreId; + + DEBUG ((EFI_D_ERROR, "Core[%d]: ClusterId =3D %d CoreId =3D %d\n", + Index, mAmdMpCoreInfoTable[Index].ClusterId, + mAmdMpCoreInfoTable[Index].CoreId)); + + // Next core in Table + ++Index; } + // Next core in Map + CpuMap >>=3D 1; + } =20 - // Update core count based on CPU map - if (mAmdCoreCount > Index) { - mAmdCoreCount =3D Index; - } + // Update core count based on CPU map + if (mAmdCoreCount > Index) { + mAmdCoreCount =3D Index; } =20 // Update SocCoreCount on Dynamic PCD @@ -212,14 +204,12 @@ PlatInitPeiEntryPoint ( =20 // Get SystemMemorySize from ISCP IscpMemDescriptor.Size0 =3D 0; - if (FixedPcdGetBool (PcdIscpSupport)) { - Status =3D PeiIscpPpi->ExecuteMemoryTransaction (PeiServices, &IscpMem= Descriptor); - ASSERT_EFI_ERROR (Status); + Status =3D PeiIscpPpi->ExecuteMemoryTransaction (PeiServices, &IscpMemDe= scriptor); + ASSERT_EFI_ERROR (Status); =20 - // Update SystemMemorySize on Dynamic PCD - if (IscpMemDescriptor.Size0) { - PcdSet64 (PcdSystemMemorySize, IscpMemDescriptor.Size0); - } + // Update SystemMemorySize on Dynamic PCD + if (IscpMemDescriptor.Size0) { + PcdSet64 (PcdSystemMemorySize, IscpMemDescriptor.Size0); } if (IscpMemDescriptor.Size0 =3D=3D 0) { DEBUG ((EFI_D_ERROR, "Warning: Could not get SystemMemorySize via ISCP= , using default value.\n")); @@ -229,19 +219,17 @@ PlatInitPeiEntryPoint ( =20 #if DO_XGBE =3D=3D 1 // Get MAC Address from ISCP - if (FixedPcdGetBool (PcdIscpSupport)) { - Status =3D PeiIscpPpi->ExecuteGetMacAddressTransaction ( - PeiServices, &MacAddrInfo ); - ASSERT_EFI_ERROR (Status); - - MacAddr0 =3D MacAddr1 =3D 0; - for (Index =3D 0; Index < 6; ++Index) { - MacAddr0 |=3D (UINT64)MacAddrInfo.MacAddress0[Index] << (Index * 8); - MacAddr1 |=3D (UINT64)MacAddrInfo.MacAddress1[Index] << (Index * 8); - } - PcdSet64 (PcdEthMacA, MacAddr0); - PcdSet64 (PcdEthMacB, MacAddr1); + Status =3D PeiIscpPpi->ExecuteGetMacAddressTransaction ( + PeiServices, &MacAddrInfo ); + ASSERT_EFI_ERROR (Status); + + MacAddr0 =3D MacAddr1 =3D 0; + for (Index =3D 0; Index < 6; ++Index) { + MacAddr0 |=3D (UINT64)MacAddrInfo.MacAddress0[Index] << (Index * 8); + MacAddr1 |=3D (UINT64)MacAddrInfo.MacAddress1[Index] << (Index * 8); } + PcdSet64 (PcdEthMacA, MacAddr0); + PcdSet64 (PcdEthMacB, MacAddr1); =20 DEBUG ((EFI_D_ERROR, "EthMacA =3D 0x%lX\n", PcdGet64 (PcdEthMacA))); DEBUG ((EFI_D_ERROR, "EthMacB =3D 0x%lX\n", PcdGet64 (PcdEthMacB))); diff --git a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf b/Silicon= /AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf index ccc079bebab2..b8829a4a9c3e 100644 --- a/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf +++ b/Silicon/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf @@ -67,7 +67,6 @@ [Pcd] gAmdStyxTokenSpaceGuid.PcdEthMacB =20 [FixedPcd] - gAmdStyxTokenSpaceGuid.PcdIscpSupport gAmdStyxTokenSpaceGuid.PcdCpuIdRegister =20 [Depex] diff --git a/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c= b/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c index 4bf9fc39942f..bcb6e020a5fd 100644 --- a/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c +++ b/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c @@ -455,16 +455,7 @@ STATIC SMBIOS_TABLE_TYPE17 mMemDevInfoType17 =3D { 0, // ConfiguredMemoryClockSpeed; }; =20 -#if (FixedPcdGetBool (PcdIscpSupport)) STATIC CHAR8 CONST *mMemDevInfoType17Strings[ 7 ] =3D {0}; -#else -STATIC CHAR8 CONST * CONST mMemDevInfoType17Strings[] =3D { - "OS Virtual Memory", - "malloc", - "OSV", - NULL -}; -#endif =20 /*********************************************************************** SMBIOS data definition TYPE19 Memory Array Mapped Address Inform= ation @@ -648,7 +639,6 @@ ProcessorInfoUpdateSmbiosType4 ( VOID ) { -#if (FixedPcdGetBool (PcdIscpSupport)) ISCP_TYPE4_SMBIOS_INFO *SmbiosT4 =3D &mSmbiosInfo.SmbiosCpuBuffer.T4[0]; =20 DEBUG ((EFI_D_ERROR, "Logging SmbiosType4 from ISCP.\n")); @@ -671,22 +661,6 @@ ProcessorInfoUpdateSmbiosType4 ( &SmbiosT4->T4ProcId.ProcIDMsd, sizeof(UINT32)); CopyMem (&mProcessorInfoType4.Voltage, &SmbiosT4->T4Voltage, sizeof(UINT8)); -#else - mProcessorInfoType4.ProcessorType =3D CentralProcessor; - mProcessorInfoType4.ProcessorFamily =3D ProcessorFamilyIndicatorFamily2; - mProcessorInfoType4.ProcessorFamily2 =3D ProcessorFamilyARM; - #ifdef ARM_CPU_AARCH64 - mProcessorInfoType4.ProcessorCharacteristics =3D 0x6C; - #else - mProcessorInfoType4.ProcessorCharacteristics =3D 0x68; - #endif - mProcessorInfoType4.MaxSpeed =3D PcdGet32(PcdArmArchTimerFreqInHz)/10000= 00; // In MHz - mProcessorInfoType4.CurrentSpeed =3D PcdGet32(PcdArmArchTimerFreqInHz)/1= 000000; // In MHz - mProcessorInfoType4.CoreCount =3D PcdGet32(PcdCoreCount); - mProcessorInfoType4.EnabledCoreCount =3D PcdGet32(PcdCoreCount); - mProcessorInfoType4.ThreadCount =3D PcdGet32(PcdCoreCount); - mProcessorInfoType4.ProcessorUpgrade =3D ProcessorUpgradeDaughterBoard; -#endif =20 LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&mProcessorInfoType4, mProcess= orInfoType4Strings); } @@ -700,7 +674,6 @@ CacheInfoUpdateSmbiosType7 ( VOID ) { -#if (FixedPcdGetBool (PcdIscpSupport)) ISCP_TYPE7_SMBIOS_INFO *SmbiosT7; SMBIOS_TABLE_TYPE7 dstType7 =3D {{0}}; =20 @@ -756,9 +729,6 @@ CacheInfoUpdateSmbiosType7 ( dstType7.SystemCacheType =3D SmbiosT7->T7SystemCacheType; dstType7.Associativity =3D SmbiosT7->T7Associativity; LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&dstType7, mCacheInfoType7Stri= ngs); -#else - LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&mCacheInfoType7, mCacheInfoTy= pe7Strings); -#endif } =20 /*********************************************************************** @@ -782,7 +752,6 @@ PhyMemArrayInfoUpdateSmbiosType16 ( VOID ) { -#if (FixedPcdGetBool (PcdIscpSupport)) ISCP_TYPE16_SMBIOS_INFO *SmbiosT16 =3D &mSmbiosInfo.SmbiosMemBuffer.T16; =20 DEBUG ((EFI_D_ERROR, "Logging SmbiosType16 from ISCP.\n")); @@ -791,7 +760,6 @@ PhyMemArrayInfoUpdateSmbiosType16 ( mPhyMemArrayInfoType16.Use =3D SmbiosT16->Use; mPhyMemArrayInfoType16.MemoryErrorCorrection =3D SmbiosT16->MemoryErrorC= orrection; mPhyMemArrayInfoType16.NumberOfMemoryDevices =3D SmbiosT16->NumberOfMemo= ryDevices; -#endif =20 LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&mPhyMemArrayInfoType16, mPhyM= emArrayInfoType16Strings); } @@ -805,7 +773,6 @@ MemDevInfoUpdatedstType17 ( VOID ) { -#if (FixedPcdGetBool (PcdIscpSupport)) SMBIOS_TABLE_TYPE17 dstType17 =3D {{0}}; ISCP_TYPE17_SMBIOS_INFO *srcType17; UINTN i, j, StrIndex, LastIndex; @@ -874,9 +841,6 @@ MemDevInfoUpdatedstType17 ( LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&dstType17, mMemDevInfoTyp= e17Strings); } } -#else - LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&mMemDevInfoType17, mMemDevInf= oType17Strings); -#endif } =20 /*********************************************************************** @@ -888,7 +852,6 @@ MemArrMapInfoUpdateSmbiosType19 ( VOID ) { -#if (FixedPcdGetBool (PcdIscpSupport)) ISCP_TYPE19_SMBIOS_INFO *SmbiosT19 =3D &mSmbiosInfo.SmbiosMemBuffer.T19; =20 DEBUG ((EFI_D_ERROR, "Logging SmbiosType19 from ISCP.\n")); @@ -899,7 +862,6 @@ MemArrMapInfoUpdateSmbiosType19 ( mMemArrMapInfoType19.PartitionWidth =3D SmbiosT19->PartitionWidth; mMemArrMapInfoType19.ExtendedStartingAddress =3D SmbiosT19->ExtStartingA= ddr; mMemArrMapInfoType19.ExtendedEndingAddress =3D SmbiosT19->ExtEndingAddr; -#endif =20 LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER *)&mMemArrMapInfoType19, mMemArr= MapInfoType19Strings); } @@ -946,7 +908,6 @@ PlatformSmbiosDriverEntryPoint ( return Status; } =20 -#if (FixedPcdGetBool (PcdIscpSupport)) Status =3D gBS->LocateProtocol ( &gAmdIscpDxeProtocolGuid, NULL, @@ -966,7 +927,6 @@ PlatformSmbiosDriverEntryPoint ( DEBUG ((EFI_D_ERROR, "Failed to get SMBIOS data via ISCP")); return Status; } -#endif =20 BIOSInfoUpdateSmbiosType0(); =20 diff --git a/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.i= nf b/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf index 0027d79031d7..76521cbde59e 100644 --- a/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf +++ b/Silicon/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf @@ -52,7 +52,6 @@ [Guids] [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz - gAmdStyxTokenSpaceGuid.PcdIscpSupport =20 [Depex] gEfiSmbiosProtocolGuid AND diff --git a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf b/= Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf index d17e6c26feb5..db7ce6af33d1 100644 --- a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf +++ b/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.inf @@ -72,8 +72,6 @@ [FixedPcd] gAmdStyxTokenSpaceGuid.PcdTrustedFWMemoryBase gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize =20 - gAmdStyxTokenSpaceGuid.PcdIscpSupport - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize diff --git a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c b= /Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c index 1b926242b5bb..11f398ad29e2 100644 --- a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c +++ b/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c @@ -60,10 +60,6 @@ LibGetTime ( ISCP_RTC_INFO RtcInfo; EFI_STATUS Status; =20 - if (!FixedPcdGetBool (PcdIscpSupport)) { - return EFI_DEVICE_ERROR; - } - if (mRtcIscpDxeProtocol =3D=3D NULL) { DEBUG((EFI_D_ERROR, "RTC: ISCP DXE Protocol is NULL!\n")); return EFI_DEVICE_ERROR; @@ -111,10 +107,6 @@ LibSetTime ( EFI_STATUS Status; ISCP_RTC_INFO RtcInfo; =20 - if (!FixedPcdGetBool (PcdIscpSupport)) { - return EFI_DEVICE_ERROR; - } - // // Use Time, to set the time in your RTC hardware // @@ -213,10 +205,6 @@ LibRtcInitialize ( { EFI_STATUS Status; =20 - if (!FixedPcdGetBool (PcdIscpSupport)) { - return EFI_SUCCESS; - } - // // Do some initialization if required to turn on the RTC // @@ -268,9 +256,7 @@ LibRtcVirtualNotifyEvent ( // to virtual address. After the OS transistions to calling in virtual m= ode, all future // runtime calls will be made in virtual mode. // - if (FixedPcdGetBool (PcdIscpSupport)) { - EfiConvertPointer (0x0, (VOID**)&mRtcIscpDxeProtocol); - } + EfiConvertPointer (0x0, (VOID**)&mRtcIscpDxeProtocol); } =20 =20 diff --git a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf= b/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf index cd9418c9b732..5392bd076cf0 100644 --- a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf +++ b/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf @@ -41,9 +41,6 @@ [LibraryClasses] UefiRuntimeLib DxeServicesTableLib =20 -[FixedPcd] - gAmdStyxTokenSpaceGuid.PcdIscpSupport - [Guids] gEfiEventVirtualAddressChangeGuid =20 --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Dec 22 14:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1526405883741875.5137968456111; Tue, 15 May 2018 10:38:03 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E5167203B8583; Tue, 15 May 2018 10:37:56 -0700 (PDT) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 36F5F2034863A for ; Tue, 15 May 2018 10:37:55 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id g21-v6so998480wrb.8 for ; Tue, 15 May 2018 10:37:55 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id v75-v6sm814183wrc.65.2018.05.15.10.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 10:37:52 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=88jViZIedGxsLt7kELXLByYVGB9glpj7OGD31URZKLs=; b=F2wumNv6dhxGv6zIqg07tlWF2OtI7pgfkmCLH5MsciKy9dnT6tmJJPJuQ2Cz5ZbPgN AHzxU/tvAFlPA4nYJ6B/SoxUQF1I2ildlADIRuhqMt7tCyx0dFGOlM5LCBaROrStaNts bGRkp091gOPt/T6eLRWUW5TQaYOr+u/xz2ml8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=88jViZIedGxsLt7kELXLByYVGB9glpj7OGD31URZKLs=; b=A1ZLA4DRKMUEUKcSdM8aYFReq+LajwgdackXnuTUUBitu1NEhk9Knd0qRbCyUetw2V wzznkxyua732FMGgF1btvYP7Nq/rhuUR0v4wcHQglFZssM4TX1/nqpSpW/Bajr09hpGU No43CgYihcx4XJtilpFRviRz3M+mEYY1QjXbRia3Q4KwUx/mLykWBsT6TL7yWOEqGHjb AcfMrQplxSLt3dSgE6uCopsFSjGY8fxTORMl9swGGHa2PrlJog6ou62hRYto0krI9ZmF dr7ucZHpuK4WTFSstDJwdEaJZHxsGr2h6W91JwVFAdU9T8CUT5Bq0o220gUYlV2XRkx6 7t5Q== X-Gm-Message-State: ALKqPwf7aCxkIYMZIFk4AIl2RtllF6ouuXeeNhZBfPWCm2R9kUaltJn3 rVOVjO1xIilnVyJ4ycSJZHZjjmC+feQ= X-Google-Smtp-Source: AB8JxZqkNyFpAJNIide6+vdPEvBnf5VsxcM2MRa2cLJaUkFIEfy2B9YEMwXT/AacLLL0Dt73G4CSag== X-Received: by 2002:adf:87d4:: with SMTP id c20-v6mr11298983wrc.197.1526405873607; Tue, 15 May 2018 10:37:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 15 May 2018 19:37:36 +0200 Message-Id: <20180515173736.29639-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515173736.29639-1-ard.biesheuvel@linaro.org> References: <20180515173736.29639-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 5/5] Platform/AMD/Overdrive: enable support for NVME PCIe devices X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, neko@bakuhatsu.net, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Upon request, add the generic NvmExpress driver to the Overdrive build so plugin NVME SSDs can be supported at boot. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 + Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 1 + 2 files changed, 2 insertions(+) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/= OverdriveBoard/OverdriveBoard.dsc index 7bc1ab937813..5e564f66b824 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -621,6 +621,7 @@ [Components.common] ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf + MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf =20 # # AHCI Support diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/= OverdriveBoard/OverdriveBoard.fdf index 1ed32f68ef9d..97894aa8482d 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf @@ -161,6 +161,7 @@ [FV.FvMain] INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf + INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf =20 # # AHCI Support --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel