sdm845Pkg: Library: sdm845Lib: remove sdm845Mem.c
authorBigfootACA <bigfoot@classfun.cn>
星期一, 7 Feb 2022 13:58:20 +0000 (21:58 +0800)
committerBigfootACA <bigfoot@classfun.cn>
星期三, 9 Feb 2022 18:33:25 +0000 (02:33 +0800)
sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf
sdm845Pkg/Library/sdm845Lib/sdm845Mem.c [deleted file]

index fdf85d5f3b4a4dcc91148420b1937c5dc7887229..34734133203f5bbd5fd1f8a20886fbd0c4643021 100644 (file)
@@ -36,7 +36,6 @@
 [Sources.common]
   sdm845.c
   sdm845Helper.S
-  sdm845Mem.c
 
 [FixedPcd]
   gArmTokenSpaceGuid.PcdArmPrimaryCore
diff --git a/sdm845Pkg/Library/sdm845Lib/sdm845Mem.c b/sdm845Pkg/Library/sdm845Lib/sdm845Mem.c
deleted file mode 100644 (file)
index 34c17b7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/** @file
- *
- *  Copyright (c) 2011, ARM Limited. All rights reserved.
- *  Copyright (c) 2019, RUIKAI LIU and MR TUNNEL. 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 <Library/ArmPlatformLib.h>
-#include <Library/DebugLib.h>
-#include <Library/HobLib.h>
-#include <Library/MemoryAllocationLib.h>
-
-// Must include last
-#include <Configuration/DeviceMemoryMap.h>
-
-/**
-  Return the Virtual Memory Map of your platform
-  This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU
-on your platform.
-  @param[out]   VirtualMemoryMap    Array of ARM_MEMORY_REGION_DESCRIPTOR
-describing a Physical-to- Virtual Memory mapping. This array must be ended by a
-zero-filled entry
-**/
-
-STATIC
-VOID AddHob(ARM_MEMORY_REGION_DESCRIPTOR_EX Desc)
-{
-  BuildResourceDescriptorHob(
-      Desc.ResourceType, Desc.ResourceAttribute, Desc.Address, Desc.Length);
-
-  BuildMemoryAllocationHob(Desc.Address, Desc.Length, Desc.MemoryType);
-}
-
-VOID ArmPlatformGetVirtualMemoryMap(
-    IN ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap)
-{
-  // TO-DO:ADD MEMORY MAP HERE
-  ARM_MEMORY_REGION_DESCRIPTOR *MemoryDescriptor;
-  UINTN                         Index = 0;
-
-  MemoryDescriptor =
-      (ARM_MEMORY_REGION_DESCRIPTOR *)AllocatePages(EFI_SIZE_TO_PAGES(
-          sizeof(ARM_MEMORY_REGION_DESCRIPTOR) *
-          MAX_ARM_MEMORY_REGION_DESCRIPTOR_COUNT));
-
-  // Run through each memory descriptor
-  while (gDeviceMemoryDescriptorEx[Index].Address !=
-         (EFI_PHYSICAL_ADDRESS)0xFFFFFFFF) {
-    switch (gDeviceMemoryDescriptorEx[Index].HobOption) {
-    case AddMem:
-    case AddDev:
-      AddHob(gDeviceMemoryDescriptorEx[Index]);
-      break;
-    case NoHob:
-    default:
-      goto update;
-    }
-
-  update:
-    ASSERT(Index < MAX_ARM_MEMORY_REGION_DESCRIPTOR_COUNT);
-
-    MemoryDescriptor[Index].PhysicalBase =
-        gDeviceMemoryDescriptorEx[Index].Address;
-    MemoryDescriptor[Index].VirtualBase =
-        gDeviceMemoryDescriptorEx[Index].Address;
-    MemoryDescriptor[Index].Length = gDeviceMemoryDescriptorEx[Index].Length;
-    MemoryDescriptor[Index].Attributes =
-        gDeviceMemoryDescriptorEx[Index].ArmAttributes;
-
-    Index++;
-  }
-
-  // Last one (terminator)
-  MemoryDescriptor[Index].PhysicalBase = 0;
-  MemoryDescriptor[Index].VirtualBase  = 0;
-  MemoryDescriptor[Index].Length       = 0;
-  MemoryDescriptor[Index++].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)0;
-  ASSERT(Index <= MAX_ARM_MEMORY_REGION_DESCRIPTOR_COUNT);
-
-  *VirtualMemoryMap = &MemoryDescriptor[0];
-  // ASSERT(0);
-}