From nobody Sat Nov 2 12:25:57 2024 Delivered-To: importer@patchew.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; Authentication-Results: mx.zoho.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; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149096969856898.6266234673592; Fri, 31 Mar 2017 07:14:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0EEE020080302; Fri, 31 Mar 2017 07:14:56 -0700 (PDT) Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (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 2C07F2050AB12 for ; Fri, 31 Mar 2017 07:14:53 -0700 (PDT) Received: by mail-lf0-x235.google.com with SMTP id z15so44994556lfd.1 for ; Fri, 31 Mar 2017 07:14:53 -0700 (PDT) Received: from localhost.localdomain ([160.171.180.74]) by smtp.gmail.com with ESMTPSA id b42sm6908720wra.36.2017.03.31.07.14.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 07:14:50 -0700 (PDT) X-Original-To: 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=MJTWX6umyPM29kFmdQj7SsRBSRwSvzmovLDXwIGVpkI=; b=KwsggjZoa6XzGK68bGRvq6c8neBsJK2sNpgThUGdhR3RP+YcTCu8ezDRVhAVM8ksdQ QCLNJ+dBnDnmItmie8CQolnHRmJ/GPDEBRrPMF6xKn4P/ymTT6sWOIC7SUBh7IR9uMWh db7vbW9s/TFCgIq8v2G8Kz8r/ry297lA1yJWE= 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=MJTWX6umyPM29kFmdQj7SsRBSRwSvzmovLDXwIGVpkI=; b=VHEO8p4tQhMPzoAySoYAp3YkTeysmV2PooglIyXkRAnUCLY0Y5+diNrCJhYwSU3iJL q29RbbbOEjHCcP6VE7YWuec+t2AzPvCe/OocfoUm2XLEs9e2dgcJ7rNhLmQd3mMDaWDV xLiWyJPcaV6GDqDubkf3BGapzcuP/okR29quWLsiD+qZmTCSJIVHjjMZ1J+ACTdr11ZV qN+kJW0HkH5p/CsdXOckl9h3G6Jyk8SmsI8TRhGqj7DSEtjIqcKSATLLs1AosHl6J/Fh hjF0HQ3Kj/xwIoU5Cc8uzXfiKWXZBTfekusEIcz4V6NZxr/NgLG2lMswDtVaJ9v7OdVH H9Ig== X-Gm-Message-State: AFeK/H0nxkCLYucAq2DdN+qHX+EF0Gyh6qH4sGDP4PP+IPPnq1JVcz9Uiv1wNcToI2AmYb+P X-Received: by 10.28.4.210 with SMTP id 201mr3574098wme.89.1490969691141; Fri, 31 Mar 2017 07:14:51 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Date: Fri, 31 Mar 2017 15:14:29 +0100 Message-Id: <20170331141434.20810-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170331141434.20810-1-ard.biesheuvel@linaro.org> References: <20170331141434.20810-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 4/9] ArmPlatformPkg/ArmVExpressDxe: remove FDT handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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" Replace the elaborate but awkward handling of FDT images using device paths and string PCDs initialized to 128 spaces with a simple scheme involving a set of builtin DTBs and a bit of runtime logic to select between them. This is sufficient for ordinary use, which makes it more suitable as reference code. Note that overriding the DTB presented to the OS can easily be done with a UEFI application that simply installs a new DTB image under the existing FDT configuration table GUID. For this module, this simply involves removing all code that is involved in deciding which platform we are running on, and for reasoning about FDT device paths. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c | = 113 ---------------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c | = 137 +------------------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf | = 33 ----- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c | = 48 ------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h | = 99 -------------- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec | = 18 --- 6 files changed, 5 insertions(+), 443 deletions(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxe= AArch64.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeA= Arch64.c deleted file mode 100644 index c368957dcd3d..000000000000 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64= .c +++ /dev/null @@ -1,113 +0,0 @@ -/** @file - - Copyright (c) 2014-2015, ARM Ltd. All rights reserved. - - This program and the accompanying materials are licensed and made availa= ble - 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, WI= THOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "ArmVExpressInternal.h" -#include - -// -// Description of the AARCH64 model platforms : -// Platform ids are defined in ArmVExpressInternal.h for -// all "ArmVExpress-like" platforms (AARCH64 or ARM architecture, -// model or hardware platforms). -// -CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] =3D { - { ARM_FVP_VEXPRESS_AEMv8x4, FixedPcdGetPtr (PcdFdtFvpVE= xpressAEMv8x4), L"rtsm_ve-aemv8a.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV2), L"fvp-base-gicv2-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV2Legacy), L"fvp-base-gicv2legacy-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, FixedPcdGetPtr (PcdFdtFvpBa= seAEMv8x4GicV3), L"fvp-base-gicv3-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV2), L"fvp-foundation-gicv2-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV2Legacy), L"fvp-foundation-gicv2legacy-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV3, FixedPcdGetPtr (PcdFdtFvpFo= undationGicV3), L"fvp-foundation-gicv3-psci.dtb" }, - { ARM_FVP_VEXPRESS_UNKNOWN } -}; - -/** - Get information about the VExpress platform the firmware is running on. - - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ) -{ - EFI_STATUS Status; - UINT32 SysId; - UINT32 FvpSysId; - UINT32 VariantSysId; - ARM_GIC_ARCH_REVISION GicRevision; - - ASSERT (Platform !=3D NULL); - - Status =3D EFI_NOT_FOUND; - - SysId =3D MmioRead32 (ARM_VE_SYS_ID_REG); - if (SysId !=3D ARM_RTSM_SYS_ID) { - // Remove the GIC variant to identify if we are running on the FVP Bas= e or - // Foundation models - FvpSysId =3D SysId & (ARM_FVP_SYS_ID_HBI_MASK | - ARM_FVP_SYS_ID_PLAT_MASK ); - // Extract the variant from the SysId - VariantSysId =3D SysId & ARM_FVP_SYS_ID_VARIANT_MASK; - - if (FvpSysId =3D=3D ARM_FVP_BASE_BOARD_SYS_ID) { - if (VariantSysId =3D=3D ARM_FVP_GIC_VE_MMAP) { - // FVP Base Model with legacy GIC memory map - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AEMv= 8x4_GICV2_LEGACY, Platform); - } else { - GicRevision =3D ArmGicGetSupportedArchRevision (); - - if (GicRevision =3D=3D ARM_GIC_ARCH_REVISION_2) { - // FVP Base Model with GICv2 support - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AE= Mv8x4_GICV2, Platform); - } else { - // FVP Base Model with GICv3 support - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_BASE_AEMv8x4_AE= Mv8x4_GICV3, Platform); - } - } - } else if (FvpSysId =3D=3D ARM_FVP_FOUNDATION_BOARD_SYS_ID) { - if (VariantSysId =3D=3D ARM_FVP_GIC_VE_MMAP) { - // FVP Foundation Model with legacy GIC memory map - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV2_= LEGACY, Platform); - } else { - GicRevision =3D ArmGicGetSupportedArchRevision (); - - if (GicRevision =3D=3D ARM_GIC_ARCH_REVISION_2) { - // FVP Foundation Model with GICv2 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV= 2, Platform); - } else { - // FVP Foundation Model with GICv3 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_FOUNDATION_GICV= 3, Platform); - } - } - } - } else { - // FVP Versatile Express AEMv8 - Status =3D ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_AEMv8x4, Pla= tform); - } - - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Unsupported AArch64 RTSM (SysId:0x%X).\n", SysId= )); - ASSERT_EFI_ERROR (Status); - } - - return Status; -} diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c b/Arm= PlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c index 8c42814a04dc..7827c50d8bbf 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c @@ -12,16 +12,15 @@ =20 **/ =20 -#include "ArmVExpressInternal.h" - #include + +#include #include +#include +#include #include -#include -#include -#include =20 -#include +#include =20 #define ARM_FVP_BASE_VIRTIO_BLOCK_BASE 0x1c130000 =20 @@ -55,95 +54,6 @@ VIRTIO_BLK_DEVICE_PATH mVirtioBlockDevicePath =3D } }; =20 -STATIC -EFI_STATUS -InternalFindFdtByGuid ( - IN OUT EFI_DEVICE_PATH **FdtDevicePath, - IN CONST EFI_GUID *FdtGuid - ) -{ - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileDevicePath; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FvProtocol; - EFI_GUID NameGuid; - UINTN Size; - VOID *Key; - EFI_FV_FILETYPE FileType; - EFI_FV_FILE_ATTRIBUTES Attributes; - EFI_DEVICE_PATH *FvDevicePath; - EFI_STATUS Status; - - if (FdtGuid =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - EfiInitializeFwVolDevicepathNode (&FileDevicePath, FdtGuid); - - HandleBuffer =3D NULL; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &FvProtocol - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // Allocate Key - Key =3D AllocatePool (FvProtocol->KeySize); - ASSERT (Key !=3D NULL); - ZeroMem (Key, FvProtocol->KeySize); - - do { - FileType =3D EFI_FV_FILETYPE_RAW; - Status =3D FvProtocol->GetNextFile (FvProtocol, Key, &FileType, &Nam= eGuid, &Attributes, &Size); - if (Status =3D=3D EFI_NOT_FOUND) { - break; - } - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Check whether this file is the one we are looking for. If so, - // create a device path for it and return it to the caller. - // - if (CompareGuid (&NameGuid, FdtGuid)) { - Status =3D gBS->HandleProtocol (HandleBuffer[Index], &gEfiDevice= PathProtocolGuid, (VOID **)&FvDevicePath); - if (!EFI_ERROR (Status)) { - *FdtDevicePath =3D AppendDevicePathNode (FvDevicePath, - (EFI_DEVICE_PATH_PROTOCOL *)&FileDevicePath= ); - } - goto Done; - } - } while (TRUE); - FreePool (Key); - } - - if (Index =3D=3D HandleCount) { - Status =3D EFI_NOT_FOUND; - } - return Status; - -Done: - FreePool (Key); - return Status; -} - /** * Generic UEFI Entrypoint for 'ArmFvpDxe' driver * See UEFI specification for the details of the parameters @@ -155,12 +65,7 @@ ArmFvpInitialise ( IN EFI_SYSTEM_TABLE *SystemTable ) { - CONST ARM_VEXPRESS_PLATFORM* Platform; EFI_STATUS Status; - CHAR16 *TextDevicePath; - UINTN TextDevicePathSize; - VOID *Buffer; - EFI_DEVICE_PATH *FdtDevicePath; =20 Status =3D gBS->InstallProtocolInterface (&ImageHandle, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, @@ -169,38 +74,6 @@ ArmFvpInitialise ( return Status; } =20 - Status =3D ArmVExpressGetPlatform (&Platform); - if (!EFI_ERROR (Status)) { - FdtDevicePath =3D NULL; - Status =3D InternalFindFdtByGuid (&FdtDevicePath, Platform->FdtGuid); - if (!EFI_ERROR (Status)) { - TextDevicePath =3D ConvertDevicePathToText (FdtDevicePath, FALSE, FA= LSE); - if (TextDevicePath !=3D NULL) { - TextDevicePathSize =3D StrSize (TextDevicePath); - } - FreePool (FdtDevicePath); - } else { - TextDevicePathSize =3D StrSize ((CHAR16*)PcdGetPtr (PcdFvpFdtDevice= PathsBase)) - sizeof (CHAR16); - TextDevicePathSize +=3D StrSize (Platform->FdtName); - - TextDevicePath =3D AllocatePool (TextDevicePathSize); - if (TextDevicePath !=3D NULL) { - StrCpy (TextDevicePath, ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsB= ase))); - StrCat (TextDevicePath, Platform->FdtName); - } - } - if (TextDevicePath !=3D NULL) { - Buffer =3D PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDe= vicePath); - if (Buffer =3D=3D NULL) { - DEBUG (( - EFI_D_ERROR, - "ArmFvpDxe: Setting of FDT device path in PcdFdtDevicePaths fail= ed - %r\n", EFI_BUFFER_TOO_SMALL - )); - } - FreePool (TextDevicePath); - } - } - // Declare the Virtio BlockIo device Status =3D VirtioMmioInstallDevice (ARM_FVP_BASE_VIRTIO_BLOCK_BASE, Imag= eHandle); if (EFI_ERROR (Status)) { diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf b/A= rmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf index 2a8c8388a3b2..a0dd9cba19a9 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf @@ -22,50 +22,17 @@ [Defines] =20 [Sources.common] ArmFvpDxe.c - ArmVExpressCommon.c - -[Sources.AARCH64] - AArch64/ArmFvpDxeAArch64.c =20 [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec - ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec - EmbeddedPkg/EmbeddedPkg.dec OvmfPkg/OvmfPkg.dec =20 [LibraryClasses] - PcdLib ArmShellCmdRunAxfLib - ArmLib - ArmPlatformLib BaseMemoryLib - DxeServicesTableLib - MemoryAllocationLib UefiDriverEntryPoint UefiBootServicesTableLib VirtioMmioDeviceLib - DevicePathLib - -[LibraryClasses.AARCH64] - ArmGicLib - -[Protocols] - gEfiFirmwareVolume2ProtocolGuid - gEfiDevicePathProtocolGuid - -[FixedPcd] - gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase - -[FixedPcd.AARCH64] - gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3 =20 -[Pcd] - gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon= .c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c deleted file mode 100644 index e1cac7fb3714..000000000000 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressCommon.c +++ /dev/null @@ -1,48 +0,0 @@ -/** @file - - Copyright (c) 2014, ARM Ltd. All rights reserved. - - This program and the accompanying materials are licensed and made availa= ble - 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, WI= THOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "ArmVExpressInternal.h" - -/** - Get information about the VExpress platform the firmware is running on g= iven its Id. - - @param[in] PlatformId Id of the VExpress platform. - @param[out] Platform Address where the pointer to the platform infor= mation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloc= ated - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatformFromId ( - IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId, - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ) -{ - UINTN Index; - - ASSERT (Platform !=3D NULL); - - for (Index =3D 0; ArmVExpressPlatforms[Index].Id !=3D ARM_FVP_VEXPRESS_U= NKNOWN; Index++) { - if (ArmVExpressPlatforms[Index].Id =3D=3D PlatformId) { - *Platform =3D &ArmVExpressPlatforms[Index]; - return EFI_SUCCESS; - } - } - - return EFI_NOT_FOUND; -} diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressIntern= al.h b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h deleted file mode 100644 index e123eea2d28b..000000000000 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h +++ /dev/null @@ -1,99 +0,0 @@ -/** @file - - Copyright (c) 2014-2015, ARM Ltd. All rights reserved. - - This program and the accompanying materials are licensed and made availa= ble - 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, WI= THOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __ARM_VEXPRESS_INTERNAL_H__ -#define __ARM_VEXPRESS_INTERNAL_H__ - -#include - -#include -#include -#include -#include -#include -#include - -#include - -// This 'enum' is needed as variations based on existing platform exist -typedef enum { - ARM_FVP_VEXPRESS_UNKNOWN =3D 0, - ARM_FVP_VEXPRESS_A9x4, - ARM_FVP_VEXPRESS_A15x1, - ARM_FVP_VEXPRESS_A15x2, - ARM_FVP_VEXPRESS_A15x4, - ARM_FVP_VEXPRESS_A15x1_A7x1, - ARM_FVP_VEXPRESS_A15x4_A7x4, - ARM_FVP_VEXPRESS_AEMv8x4, - ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, - ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, - ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, - ARM_FVP_FOUNDATION_GICV2, - ARM_FVP_FOUNDATION_GICV2_LEGACY, - ARM_FVP_FOUNDATION_GICV3, - ARM_HW_A9x4, - ARM_HW_A15x2_A7x3, - ARM_HW_A15, - ARM_HW_A5 -} ARM_VEXPRESS_PLATFORM_ID; - -typedef struct { - ARM_VEXPRESS_PLATFORM_ID Id; - - // Flattened Device Tree (FDT) File - CONST EFI_GUID *FdtGuid; /// Name of the FDT when present int= o the FV - CONST CHAR16 *FdtName; /// Name of the FDT when present int= o a File System -} ARM_VEXPRESS_PLATFORM; - -// Array that contains the list of the VExpress based platform supported b= y this DXE driver -extern CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[]; - -/** - Get information about the VExpress platform the firmware is running on g= iven its Id. - - @param[in] PlatformId Id of the VExpress platform. - @param[out] Platform Address where the pointer to the platform infor= mation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloc= ated - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatformFromId ( - IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId, - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ); - -/** - - Get information about the VExpress platform the firmware is running on. - - @param[out] Platform Address where the pointer to the platform inform= ation - (type ARM_VEXPRESS_PLATFORM*) should be stored. - The returned pointer does not point to an alloca= ted - memory area. - - @retval EFI_SUCCESS The platform information was returned. - @retval EFI_NOT_FOUND The platform was not recognised. - -**/ -EFI_STATUS -ArmVExpressGetPlatform ( - OUT CONST ARM_VEXPRESS_PLATFORM** Platform - ); - -#endif // __ARM_VEXPRESS_INTERNAL_H__ diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec b/ArmPlatform= Pkg/ArmVExpressPkg/ArmVExpressPkg.dec index 39f046541502..3814513c2241 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec @@ -51,21 +51,3 @@ [PcdsFixedAtBuild.common] # Device path of block device on which Fastboot will flash partitions # gArmVExpressTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|""|VOID*|0x00= 000004 - - # FVP platforms : install FDT from SemiHosting - gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase|L"VenHw(C5B9C74A-6D7= 2-4719-99AB-C59F199091EB)/"|VOID*|0x00000005 - # HW platforms : install FDT from NOR Flash - gArmVExpressTokenSpaceGuid.PcdHwFdtDevicePathsBase|L"VenHw(E7223039-5836= -41E1-B542-D7EC736C5E59)/"|VOID*|0x00000006 - - # - # ARM Versatile Express FDT Guids - # - - # AArch64 FVP platforms - gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4|{ 0xa8, 0x95, 0x5f, = 0xf6, 0x32, 0x7b, 0xf3, 0x16, 0x12, 0x32, 0x45, 0x50, 0xbd, 0x54, 0xca, 0xe= 5 }|VOID*|0x00000010 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2|{ 0x66, 0xcf, 0x57,= 0xa4, 0xac, 0x7e, 0x7f, 0x3d, 0x21, 0x88, 0x3a, 0x58, 0x3c, 0x27, 0xd7, 0x= e8 }|VOID*|0x00000011 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy|{ 0x8b, 0xcb,= 0xe0, 0x14, 0xd1, 0x46, 0x79, 0xae, 0x7f, 0x20, 0xcf, 0x84, 0x22, 0xc7, 0x= 94, 0x4a }|VOID*|0x00000012 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3|{ 0x4d, 0x03, 0xb8,= 0x77, 0x63, 0x25, 0x0a, 0x7f, 0xe9, 0x72, 0xfa, 0x68, 0x74, 0xc7, 0x5e, 0x= b5 }|VOID*|0x00000013 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2|{ 0x36, 0x4f, 0x61, = 0x92, 0x86, 0xb1, 0xa2, 0x16, 0x32, 0x65, 0x35, 0x3f, 0x01, 0xf3, 0x3b, 0x6= 4 }|VOID*|0x00000014 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy|{ 0xf6, 0xcb, = 0x9d, 0x86, 0x38, 0x74, 0x8a, 0xb0, 0xfe, 0x40, 0x08, 0x0f, 0x3f, 0xb3, 0x5= 0, 0x7c }|VOID*|0x00000015 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3|{ 0x51, 0xd0, 0x75, = 0x6b, 0x9d, 0x35, 0x1b, 0x1b, 0xa6, 0xc6, 0xab, 0xa0, 0x90, 0xf9, 0xf0, 0x0= a }|VOID*|0x00000016 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel