public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ryan.harkin@linaro.org,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v3 1/3] ArmPlatformPkg/ArmVExpressDxe: remove ARM support
Date: Mon, 10 Apr 2017 17:21:50 +0100	[thread overview]
Message-ID: <20170410162152.20555-2-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20170410162152.20555-1-ard.biesheuvel@linaro.org>

The 32-bit ARM support in this driver is unused, and thus untested.
So let's just remove it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c | 84 --------------------
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf      |  9 ---
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec                | 10 ---
 3 files changed, 103 deletions(-)

diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c
deleted file mode 100644
index 2057c6e2156a..000000000000
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/** @file
-
-  Copyright (c) 2014, ARM Ltd. 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 IMPLIED.
-
-**/
-
-#include "ArmVExpressInternal.h"
-#include <Library/ArmPlatformLib.h>  // To get Core Count
-
-//
-// Description of the four ARM 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[] = {
-  { ARM_FVP_VEXPRESS_A9x4,  FixedPcdGetPtr (PcdFdtVExpressFvpA9x4),  L"rtsm_ve-cortex_a9x4.dtb"  },
-  { ARM_FVP_VEXPRESS_A15x1, FixedPcdGetPtr (PcdFdtVExpressFvpA15x1), L"rtsm_ve-cortex_a15x1.dtb" },
-  { ARM_FVP_VEXPRESS_A15x2, FixedPcdGetPtr (PcdFdtVExpressFvpA15x2), L"rtsm_ve-cortex_a15x2.dtb" },
-  { ARM_FVP_VEXPRESS_A15x4, FixedPcdGetPtr (PcdFdtVExpressFvpA15x4), L"rtsm_ve-cortex_a15x4.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 information
-                          (type ARM_VEXPRESS_PLATFORM*) should be stored.
-                          The returned pointer does not point to an allocated
-                          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
-  )
-{
-  UINT32                SysId;
-  UINTN                 CpuType;
-  EFI_STATUS            Status;
-  UINTN                 CoreCount;
-
-  ASSERT (Platform != NULL);
-
-  CpuType   = 0;
-  Status    = EFI_NOT_FOUND;
-  *Platform = NULL;
-
-  SysId = MmioRead32 (ARM_VE_SYS_ID_REG);
-  if (SysId == ARM_RTSM_SYS_ID) {
-    // Get the Cortex-A version
-    CpuType = (ArmReadMidr () >> 4) & ARM_CPU_TYPE_MASK;
-    if (CpuType == ARM_CPU_TYPE_A9) {
-      Status = ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A9x4, Platform);
-    } else if (CpuType == ARM_CPU_TYPE_A15) {
-      CoreCount = ArmGetCpuCountPerCluster ();
-      if (CoreCount == 1) {
-        Status = ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x1, Platform);
-      } else if (CoreCount == 2) {
-        Status = ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x2, Platform);
-      } else if (CoreCount == 4) {
-        Status = ArmVExpressGetPlatformFromId (ARM_FVP_VEXPRESS_A15x4, Platform);
-      }
-    }
-  }
-
-  if (EFI_ERROR (Status)) {
-    DEBUG ((EFI_D_ERROR, "Unsupported platform (SysId:0x%X, CpuType:0x%X)\n", SysId, CpuType));
-    ASSERT_EFI_ERROR (Status);
-  }
-
-  return Status;
-}
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
index 327c5101ddb5..2a8c8388a3b2 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
@@ -24,9 +24,6 @@ [Sources.common]
   ArmFvpDxe.c
   ArmVExpressCommon.c
 
-[Sources.ARM]
-  Arm/ArmFvpDxeArm.c
-
 [Sources.AARCH64]
   AArch64/ArmFvpDxeAArch64.c
 
@@ -61,12 +58,6 @@ [Protocols]
 [FixedPcd]
   gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase
 
-[FixedPcd.ARM]
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4
-
 [FixedPcd.AARCH64]
   gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4
   gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec
index c774d97541e1..39f046541502 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec
@@ -60,16 +60,6 @@ [PcdsFixedAtBuild.common]
   #
   # ARM Versatile Express FDT Guids
   #
-  # FVP platforms
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4|{ 0x12, 0x7b, 0xdf, 0xa1, 0x60, 0x11, 0xcf, 0x16, 0xb8, 0xc6, 0x98, 0xde, 0xdf, 0xe2, 0xce, 0xae }|VOID*|0x00000007
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1|{ 0xe5, 0x1b, 0xc0, 0x96, 0xeb, 0xd7, 0x1a, 0x42, 0xc8, 0xe8, 0x6a, 0xfd, 0x5a, 0x86, 0x1d, 0x84 }|VOID*|0x00000008
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2|{ 0x84, 0x43, 0x70, 0x4d, 0x19, 0xf1, 0x29, 0xe3, 0xef, 0xcd, 0xa5, 0x9b, 0x3d, 0x0a, 0x5a, 0x5f }|VOID*|0x00000009
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4|{ 0x72, 0x3b, 0x28, 0x27, 0x90, 0x2f, 0xca, 0x4d, 0x9a, 0xb5, 0x98, 0x48, 0xfb, 0xc2, 0xd4, 0xed }|VOID*|0x0000000A
-  # HW platforms
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA9x4|{ 0xf6, 0x1c, 0xd2, 0x2f, 0xe8, 0xe6, 0xf2, 0x4f, 0xa9, 0xca, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 }|VOID*|0x0000000B
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15x2A7x3|{ 0xeb, 0x06, 0xe6, 0xd5, 0xdf, 0x83, 0x90, 0x4e, 0x81, 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x9a }|VOID*|0x0000000C
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15|{ 0xc2, 0x47, 0x89, 0x6b, 0x87, 0x42, 0x91, 0x4d, 0x8f, 0xe0, 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f }|VOID*|0x0000000D
-  gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA5|{ 0x63, 0x76, 0xcc, 0xa2, 0x7c, 0x4d, 0x8a, 0x44, 0xaa, 0xb5, 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 }|VOID*|0x0000000E
 
   # AArch64 FVP platforms
   gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4|{ 0xa8, 0x95, 0x5f, 0xf6, 0x32, 0x7b, 0xf3, 0x16, 0x12, 0x32, 0x45, 0x50, 0xbd, 0x54, 0xca, 0xe5 }|VOID*|0x00000010
-- 
2.9.3



  reply	other threads:[~2017-04-10 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 16:21 [PATCH v3 0/3] ArmPlatformPkg: FVP spring cleaning -- EDK2 edition Ard Biesheuvel
2017-04-10 16:21 ` Ard Biesheuvel [this message]
2017-04-10 16:21 ` [PATCH v3 2/3] ArmPlatformPkg/ArmVExpressDxe: remove unused cruft from ArmHwDxe Ard Biesheuvel
2017-04-10 16:21 ` [PATCH v3 3/3] ArmPlatformPkg/ArmVExpressDxe: remove FDT handling from ArmFvpDxe Ard Biesheuvel
2017-04-10 16:33 ` [PATCH v3 0/3] ArmPlatformPkg: FVP spring cleaning -- EDK2 edition Leif Lindholm
2017-04-11 17:04   ` Ryan Harkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170410162152.20555-2-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox