]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c
ArmPlatformPkg/Documentation: remove outdated porting manual
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibCTA9x4 / CTA9x4Mem.c
index 13ec5de8d09c1177995e634a030cdc3e8ae54b7f..7ea6e741738973adb9862a03553eaccd355c1bb3 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
 *  Copyright (c) 2011, ARM Limited. All rights reserved.\r
-*  \r
-*  This program and the accompanying materials                          \r
-*  are licensed and made available under the terms and conditions of the BSD License         \r
-*  which accompanies this distribution.  The full text of the license may be found at        \r
-*  http://opensource.org/licenses/bsd-license.php                                            \r
 *\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+*  This program and the accompanying materials\r
+*  are licensed and made available under the terms and conditions of the BSD License\r
+*  which accompanies this distribution.  The full text of the license may be found at\r
+*  http://opensource.org/licenses/bsd-license.php\r
+*\r
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 *\r
 **/\r
 \r
@@ -26,8 +26,6 @@
 // DDR attributes\r
 #define DDR_ATTRIBUTES_CACHED           ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK\r
 #define DDR_ATTRIBUTES_UNCACHED         ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED\r
-#define DDR_ATTRIBUTES_SECURE_CACHED    ARM_MEMORY_REGION_ATTRIBUTE_SECURE_WRITE_BACK\r
-#define DDR_ATTRIBUTES_SECURE_UNCACHED  ARM_MEMORY_REGION_ATTRIBUTE_SECURE_UNCACHED_UNBUFFERED\r
 \r
 /**\r
   Return the Virtual Memory Map of your platform\r
@@ -45,7 +43,6 @@ ArmPlatformGetVirtualMemoryMap (
   )\r
 {\r
   ARM_MEMORY_REGION_ATTRIBUTES  CacheAttributes;\r
-  BOOLEAN                       TrustzoneSupport;\r
   UINTN                         Index = 0;\r
   ARM_MEMORY_REGION_DESCRIPTOR  *VirtualMemoryTable;\r
 \r
@@ -56,14 +53,10 @@ ArmPlatformGetVirtualMemoryMap (
       return;\r
   }\r
 \r
-  // Check if SMC TZASC is enabled. If Trustzone not enabled then all the entries remain in Secure World.\r
-  // As this value can be changed in the Board Configuration file, the UEFI firmware needs to work for both case\r
-  TrustzoneSupport = PcdGetBool (PcdTrustzoneSupport);\r
-\r
   if (FeaturePcdGet(PcdCacheEnable) == TRUE) {\r
-      CacheAttributes = (TrustzoneSupport ? DDR_ATTRIBUTES_CACHED : DDR_ATTRIBUTES_SECURE_CACHED);\r
+      CacheAttributes = DDR_ATTRIBUTES_CACHED;\r
   } else {\r
-      CacheAttributes = (TrustzoneSupport ? DDR_ATTRIBUTES_UNCACHED : DDR_ATTRIBUTES_SECURE_UNCACHED);\r
+      CacheAttributes = DDR_ATTRIBUTES_UNCACHED;\r
   }\r
 \r
   if (FeaturePcdGet(PcdNorFlashRemapping) == FALSE) {\r
@@ -84,13 +77,13 @@ ArmPlatformGetVirtualMemoryMap (
   VirtualMemoryTable[++Index].PhysicalBase = ARM_VE_SMB_MB_ON_CHIP_PERIPH_BASE;\r
   VirtualMemoryTable[Index].VirtualBase  = ARM_VE_SMB_MB_ON_CHIP_PERIPH_BASE;\r
   VirtualMemoryTable[Index].Length       = ARM_VE_SMB_MB_ON_CHIP_PERIPH_SZ;\r
-  VirtualMemoryTable[Index].Attributes   = (TrustzoneSupport ? ARM_MEMORY_REGION_ATTRIBUTE_DEVICE : ARM_MEMORY_REGION_ATTRIBUTE_SECURE_DEVICE);\r
+  VirtualMemoryTable[Index].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;\r
 \r
   // SMB CS0-CS1 - NOR Flash 1 & 2\r
   VirtualMemoryTable[++Index].PhysicalBase = ARM_VE_SMB_NOR0_BASE;\r
   VirtualMemoryTable[Index].VirtualBase  = ARM_VE_SMB_NOR0_BASE;\r
   VirtualMemoryTable[Index].Length       = ARM_VE_SMB_NOR0_SZ + ARM_VE_SMB_NOR1_SZ;\r
-  VirtualMemoryTable[Index].Attributes   = (TrustzoneSupport ? ARM_MEMORY_REGION_ATTRIBUTE_DEVICE : ARM_MEMORY_REGION_ATTRIBUTE_SECURE_DEVICE);\r
+  VirtualMemoryTable[Index].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;\r
 \r
   // SMB CS2 - SRAM\r
   VirtualMemoryTable[++Index].PhysicalBase = ARM_VE_SMB_SRAM_BASE;\r
@@ -102,14 +95,14 @@ ArmPlatformGetVirtualMemoryMap (
   VirtualMemoryTable[++Index].PhysicalBase = ARM_VE_SMB_PERIPH_BASE;\r
   VirtualMemoryTable[Index].VirtualBase  = ARM_VE_SMB_PERIPH_BASE;\r
   VirtualMemoryTable[Index].Length       = ARM_VE_SMB_PERIPH_SZ;\r
-  VirtualMemoryTable[Index].Attributes   = (TrustzoneSupport ? ARM_MEMORY_REGION_ATTRIBUTE_DEVICE : ARM_MEMORY_REGION_ATTRIBUTE_SECURE_DEVICE);\r
+  VirtualMemoryTable[Index].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;\r
 \r
   // If a Logic Tile is connected to The ARM Versatile Express Motherboard\r
   if (MmioRead32(ARM_VE_SYS_PROCID1_REG) != 0) {\r
       VirtualMemoryTable[++Index].PhysicalBase = ARM_VE_EXT_AXI_BASE;\r
       VirtualMemoryTable[Index].VirtualBase  = ARM_VE_EXT_AXI_BASE;\r
       VirtualMemoryTable[Index].Length       = ARM_VE_EXT_AXI_SZ;\r
-      VirtualMemoryTable[Index].Attributes   = (TrustzoneSupport ? ARM_MEMORY_REGION_ATTRIBUTE_DEVICE : ARM_MEMORY_REGION_ATTRIBUTE_SECURE_DEVICE);\r
+      VirtualMemoryTable[Index].Attributes   = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;\r
 \r
       ASSERT((Index + 1) == (MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS + 1));\r
   } else {\r
@@ -124,21 +117,3 @@ ArmPlatformGetVirtualMemoryMap (
 \r
   *VirtualMemoryMap = VirtualMemoryTable;\r
 }\r
-\r
-/**\r
-  Return the EFI Memory Map provided by extension memory on your platform\r
-\r
-  This EFI Memory Map of the System Memory is used by MemoryInitPei module to create the Resource\r
-  Descriptor HOBs used by DXE core.\r
-\r
-  @param[out]   EfiMemoryMap        Array of ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR describing an\r
-                                    EFI Memory region. This array must be ended by a zero-filled entry\r
-\r
-**/\r
-EFI_STATUS\r
-ArmPlatformGetAdditionalSystemMemory (\r
-  OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap\r
-  )\r
-{\r
-  return EFI_UNSUPPORTED;\r
-}\r