From 6ed41dadaab9e09afeb7cbd28270eec558e21772 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 29 Jul 2015 16:17:27 +0000 Subject: ArmPlatformPkg: remove obsolete ARM and AARCH64 platforms Remove obsolete ARM and AARCH64 platforms so the maintainers can focus on the ones that are still supported, which are: - TC2 (ArmVExpress-CTA15-A7.dsc) - Foundation model and Fast model emulators (ArmVExpress-FVP-AArch64.dsc) - Juno (ArmJunoPkg/ArmJuno.dsc) - Cortex-A15 MPcore RTSM (ArmVExpress-RTSM-A15_MPCore) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Tested-by: Leif Lindholm git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18110 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c | 146 ------------- .../ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S | 53 ----- .../ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm | 59 ------ .../ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf | 50 ----- .../ArmRealViewEbLibRTSM/ArmRealViewEbLibSec.inf | 46 ---- .../ArmRealViewEbLibRTSM/ArmRealViewEbMem.c | 116 ----------- .../ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.S | 54 ----- .../ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm | 58 ------ .../ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c | 78 ------- .../ArmRealViewEbSecLib.inf | 41 ---- .../DebugAgentTimerLib/DebugAgentTimerLib.c | 77 ------- .../DebugAgentTimerLib/DebugAgentTimerLib.inf | 38 ---- .../Library/GdbSerialLib/GdbSerialLib.c | 118 ----------- .../Library/GdbSerialLib/GdbSerialLib.inf | 39 ---- .../NorFlashArmRealViewEb.c | 54 ----- .../NorFlashArmRealViewEbLib.inf | 35 ---- .../PL111LcdArmRealViewEb.c | 232 --------------------- .../PL111LcdArmRealViewEbLib.inf | 65 ------ .../Library/ResetSystemLib/ResetSystemLib.c | 87 -------- .../Library/ResetSystemLib/ResetSystemLib.inf | 35 ---- 20 files changed, 1481 deletions(-) delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLibSec.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.S delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSecLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEb.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEbLib.inf delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.c delete mode 100644 ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf (limited to 'ArmPlatformPkg/ArmRealViewEbPkg/Library') diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c deleted file mode 100644 index 9ffcbee392..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c +++ /dev/null @@ -1,146 +0,0 @@ -/** @file -* -* Copyright (c) 2011-2012, ARM Limited. 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 -#include -#include -#include -#include - -#include -#include - -#include - -#include - -ARM_CORE_INFO mRealViewEbMpCoreInfoTable[] = { - { - // Cluster 0, Core 0 - 0x0, 0x0, - - // MP Core MailBox Set/Get/Clear Addresses and Clear Value - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_REG, - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_SET_REG, - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_CLR_REG, - (UINT64)0xFFFFFFFF - }, - { - // Cluster 0, Core 1 - 0x0, 0x1, - - // MP Core MailBox Set/Get/Clear Addresses and Clear Value - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_REG, - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_SET_REG, - (EFI_PHYSICAL_ADDRESS)ARM_EB_SYS_FLAGS_CLR_REG, - (UINT64)0xFFFFFFFF - } -}; - -/** - Return the current Boot Mode - - This function returns the boot reason on the platform - -**/ -EFI_BOOT_MODE -ArmPlatformGetBootMode ( - VOID - ) -{ - return BOOT_WITH_FULL_CONFIGURATION; -} - -/** - Initialize controllers that must setup in the normal world - - This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei - in the PEI phase. - -**/ -RETURN_STATUS -ArmPlatformInitialize ( - IN UINTN MpId - ) -{ - if (!ArmPlatformIsPrimaryCore (MpId)) { - return RETURN_SUCCESS; - } - - // Disable memory remapping and return to normal mapping - MmioOr32 (ARM_EB_SYSCTRL, BIT8); //EB_SP810_CTRL_BASE - - // Configure periodic timer (TIMER0) for 1MHz operation - MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER0_TIMCLK); - // Configure 1MHz clock - MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER1_TIMCLK); - // configure SP810 to use 1MHz clock and disable - MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER2_EN, SP810_SYS_CTRL_TIMER2_TIMCLK); - // Configure SP810 to use 1MHz clock and disable - MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER3_EN, SP810_SYS_CTRL_TIMER3_TIMCLK); - - return RETURN_SUCCESS; -} - -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // We do not need to initialize the System Memory on RTSM -} - -EFI_STATUS -PrePeiCoreGetMpCoreInfo ( - OUT UINTN *CoreCount, - OUT ARM_CORE_INFO **ArmCoreTable - ) -{ - if ((MmioRead32 (ARM_EB_SYS_PROCID0_REG) & ARM_EB_SYS_PROC_ID_MASK) == ARM_EB_SYS_PROC_ID_CORTEX_A9) { - *CoreCount = sizeof(mRealViewEbMpCoreInfoTable) / sizeof(ARM_CORE_INFO); - *ArmCoreTable = mRealViewEbMpCoreInfoTable; - return EFI_SUCCESS; - } else { - return EFI_UNSUPPORTED; - } -} - -// Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore -EFI_GUID mArmMpCoreInfoPpiGuid = ARM_MP_CORE_INFO_PPI_GUID; -ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo }; - -EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] = { - { - EFI_PEI_PPI_DESCRIPTOR_PPI, - &mArmMpCoreInfoPpiGuid, - &mMpCoreInfoPpi - } -}; - -VOID -ArmPlatformGetPlatformPpiList ( - OUT UINTN *PpiListSize, - OUT EFI_PEI_PPI_DESCRIPTOR **PpiList - ) -{ - *PpiListSize = sizeof(gPlatformPpiTable); - *PpiList = gPlatformPpiTable; -} - diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S deleted file mode 100644 index 2978753c35..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) 2012-2013, ARM Limited. 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 -#include - -.text -.align 2 - -GCC_ASM_EXPORT(ArmPlatformPeiBootAction) -GCC_ASM_EXPORT(ArmPlatformGetCorePosition) -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore) - -GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore) -GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask) - -//UINTN -//ArmPlatformGetCorePosition ( -// IN UINTN MpId -// ); -ASM_PFX(ArmPlatformGetCorePosition): - and r1, r0, #ARM_CORE_MASK - and r0, r0, #ARM_CLUSTER_MASK - add r0, r1, r0, LSR #7 - bx lr - -//UINTN -//ArmPlatformIsPrimaryCore ( -// IN UINTN MpId -// ); -ASM_PFX(ArmPlatformIsPrimaryCore): - LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1) - ldr r1, [r1] - and r0, r0, r1 - LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1) - ldr r1, [r1] - cmp r0, r1 - moveq r0, #1 - movne r0, #0 - bx lr - -ASM_PFX(ArmPlatformPeiBootAction): - bx lr diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm deleted file mode 100644 index 99a2ed4691..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) 2012-2013, ARM Limited. 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 -#include - - INCLUDE AsmMacroIoLib.inc - - EXPORT ArmPlatformPeiBootAction - EXPORT ArmPlatformGetCorePosition - EXPORT ArmPlatformIsPrimaryCore - - IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore - IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask - - AREA ArmRealViewEbHelper, CODE, READONLY - -//UINTN -//ArmPlatformGetCorePosition ( -// IN UINTN MpId -// ); -ArmPlatformGetCorePosition FUNCTION - and r1, r0, #ARM_CORE_MASK - and r0, r0, #ARM_CLUSTER_MASK - add r0, r1, r0, LSR #7 - bx lr - ENDFUNC - -//UINTN -//ArmPlatformIsPrimaryCore ( -// IN UINTN MpId -// ); -ArmPlatformIsPrimaryCore FUNCTION - LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1) - ldr r1, [r1] - and r0, r0, r1 - LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1) - ldr r1, [r1] - cmp r0, r1 - moveq r0, #1 - movne r0, #0 - bx lr - ENDFUNC - -ArmPlatformPeiBootAction FUNCTION - bx lr - ENDFUNC - - END diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf deleted file mode 100644 index fa0887679d..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf +++ /dev/null @@ -1,50 +0,0 @@ -#/* @file -# Copyright (c) 2011-2013, ARM Limited. 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. -# -#*/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ArmRealViewEbLib - FILE_GUID = 736343a0-1d96-11e0-aaaa-0002a5d5c51b - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmPlatformLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPkg/ArmPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - IoLib - ArmLib - MemoryAllocationLib - -[Sources.common] - ArmRealViewEbHelper.asm | RVCT - ArmRealViewEbHelper.S | GCC - ArmRealViewEb.c - ArmRealViewEbMem.c - ArmRealViewEbHelper.asm | RVCT - ArmRealViewEbHelper.S | GCC - -[FeaturePcd] - gEmbeddedTokenSpaceGuid.PcdCacheEnable - -[FixedPcd] - gArmTokenSpaceGuid.PcdSystemMemoryBase - gArmTokenSpaceGuid.PcdSystemMemorySize - - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask - gArmTokenSpaceGuid.PcdArmPrimaryCore diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLibSec.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLibSec.inf deleted file mode 100644 index bc73400adf..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLibSec.inf +++ /dev/null @@ -1,46 +0,0 @@ -#/* @file -# Copyright (c) 2011-2012, ARM Limited. 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. -# -#*/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ArmRealViewEbLibSec - FILE_GUID = 5d1013ae-57b8-4a37-87d8-f5bf70e49059 - MODULE_TYPE = SEC - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmPlatformLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPkg/ArmPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - IoLib - ArmLib - -[Sources.common] - ArmRealViewEb.c - ArmRealViewEbHelper.asm | RVCT - ArmRealViewEbHelper.S | GCC - -[FeaturePcd] - gEmbeddedTokenSpaceGuid.PcdCacheEnable - -[FixedPcd] - gArmTokenSpaceGuid.PcdSystemMemoryBase - gArmTokenSpaceGuid.PcdSystemMemorySize - - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask - gArmTokenSpaceGuid.PcdArmPrimaryCore diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c deleted file mode 100644 index 40055b2e52..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c +++ /dev/null @@ -1,116 +0,0 @@ -/** @file -* -* Copyright (c) 2011, ARM Limited. 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 -#include -#include -#include -#include - -#include - -#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 6 - -// DDR attributes -#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK -#define DDR_ATTRIBUTES_UNCACHED ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED - -/** - 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 - -**/ -VOID -ArmPlatformGetVirtualMemoryMap ( - IN ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap - ) -{ - UINT32 CacheAttributes; - UINTN Index = 0; - ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; - - ASSERT(VirtualMemoryMap != NULL); - - VirtualMemoryTable = (ARM_MEMORY_REGION_DESCRIPTOR*)AllocatePages (EFI_SIZE_TO_PAGES (sizeof(ARM_MEMORY_REGION_DESCRIPTOR) * MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS)); - if (VirtualMemoryTable == NULL) { - return; - } - - if (FeaturePcdGet(PcdCacheEnable) == TRUE) { - CacheAttributes = DDR_ATTRIBUTES_CACHED; - } else { - CacheAttributes = DDR_ATTRIBUTES_UNCACHED; - } - - // ReMap (Either NOR Flash or DRAM) - VirtualMemoryTable[Index].PhysicalBase = ARM_EB_REMAP_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_REMAP_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_REMAP_SZ; - VirtualMemoryTable[Index].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes; - - // DDR - VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdSystemMemoryBase); - VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdSystemMemoryBase); - VirtualMemoryTable[Index].Length = PcdGet64 (PcdSystemMemorySize); - VirtualMemoryTable[Index].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes; - - // SMC CS7 - VirtualMemoryTable[++Index].PhysicalBase = ARM_EB_SMB_MB_ON_CHIP_PERIPH_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_SMB_MB_ON_CHIP_PERIPH_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_SMB_MB_ON_CHIP_PERIPH_SZ; - VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - - // SMB CS0-CS1 - NOR Flash 1 & 2 - VirtualMemoryTable[++Index].PhysicalBase = ARM_EB_SMB_NOR_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_SMB_NOR_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_SMB_NOR_SZ + ARM_EB_SMB_DOC_SZ; - VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - - // SMB CS2 - SRAM - VirtualMemoryTable[++Index].PhysicalBase = ARM_EB_SMB_SRAM_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_SMB_SRAM_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_SMB_SRAM_SZ; - VirtualMemoryTable[Index].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes; - - // SMB CS3-CS6 - Motherboard Peripherals - VirtualMemoryTable[++Index].PhysicalBase = ARM_EB_SMB_PERIPH_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_SMB_PERIPH_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_SMB_PERIPH_SZ; - VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - - // If a Logic Tile is connected to The ARM Versatile Express Motherboard - if (MmioRead32(ARM_EB_SYS_PROCID1_REG) != 0) { - VirtualMemoryTable[++Index].PhysicalBase = ARM_EB_LOGIC_TILE_BASE; - VirtualMemoryTable[Index].VirtualBase = ARM_EB_LOGIC_TILE_BASE; - VirtualMemoryTable[Index].Length = ARM_EB_LOGIC_TILE_SZ; - VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; - - ASSERT((Index + 1) == (MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS + 1)); - } else { - ASSERT((Index + 1) == MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS); - } - - // End of Table - VirtualMemoryTable[++Index].PhysicalBase = 0; - VirtualMemoryTable[Index].VirtualBase = 0; - VirtualMemoryTable[Index].Length = 0; - VirtualMemoryTable[Index].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)0; - - *VirtualMemoryMap = VirtualMemoryTable; -} diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.S b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.S deleted file mode 100644 index ba87650f99..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.S +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) 2011-2012, ARM Limited. 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 -#include -#include -#include -#include - -.text -.align 3 - -GCC_ASM_EXPORT(ArmPlatformSecBootAction) -GCC_ASM_EXPORT(ArmPlatformSecBootMemoryInit) - -/** - Call at the beginning of the platform boot up - - This function allows the firmware platform to do extra actions at the early - stage of the platform power up. - - Note: This function must be implemented in assembler as there is no stack set up yet - -**/ -ASM_PFX(ArmPlatformSecBootAction): - LoadConstantToReg (ARM_EB_SYS_FLAGS_NV_REG, r0) - ldr r0, [r0] - cmp r0, #0 - bxeq lr - bxne r0 - -/** - Initialize the memory where the initial stacks will reside - - This memory can contain the initial stacks (Secure and Secure Monitor stacks). - In some platform, this region is already initialized and the implementation of this function can - do nothing. This memory can also represent the Secure RAM. - This function is called before the satck has been set up. Its implementation must ensure the stack - pointer is not used (probably required to use assembly language) - -**/ -ASM_PFX(ArmPlatformSecBootMemoryInit): - // The SMC does not need to be initialized for RTSM - bx lr diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm deleted file mode 100644 index e8bc0cd0b4..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbBoot.asm +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) 2011-2012, ARM Limited. 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 -#include -#include -#include -#include - - INCLUDE AsmMacroIoLib.inc - - EXPORT ArmPlatformSecBootAction - EXPORT ArmPlatformSecBootMemoryInit - - PRESERVE8 - AREA ArmRealviewEbBootMode, CODE, READONLY - -/** - Call at the beginning of the platform boot up - - This function allows the firmware platform to do extra actions at the early - stage of the platform power up. - - Note: This function must be implemented in assembler as there is no stack set up yet - -**/ -ArmPlatformSecBootAction - LoadConstantToReg (ARM_EB_SYS_FLAGS_NV_REG, r0) - ldr r0, [r0] - cmp r0, #0 - bxeq lr - bxne r0 - -/** - Initialize the memory where the initial stacks will reside - - This memory can contain the initial stacks (Secure and Secure Monitor stacks). - In some platform, this region is already initialized and the implementation of this function can - do nothing. This memory can also represent the Secure RAM. - This function is called before the satck has been set up. Its implementation must ensure the stack - pointer is not used (probably required to use assembly language) - -**/ -ArmPlatformSecBootMemoryInit - // The SMC does not need to be initialized for RTSM - bx lr - - END diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c deleted file mode 100644 index e09e33a5e2..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c +++ /dev/null @@ -1,78 +0,0 @@ -/** @file -* -* Copyright (c) 2011-2014, ARM Limited. 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 -#include -#include -#include -#include -#include - -#include -#include - -#include - -/** - Initialize the Secure peripherals and memory regions - - If Trustzone is supported by your platform then this function makes the required initialization - of the secure peripherals and memory regions. - -**/ -VOID -ArmPlatformSecTrustzoneInit ( - IN UINTN MpId - ) -{ - ASSERT(FALSE); -} - -/** - Initialize controllers that must setup at the early stage - - Some peripherals must be initialized in Secure World. - For example, some L2x0 requires to be initialized in Secure World - -**/ -RETURN_STATUS -ArmPlatformSecInitialize ( - IN UINTN MpId - ) -{ - // If it is not the primary core then there is nothing to do - if (!ArmPlatformIsPrimaryCore (MpId)) { - return RETURN_SUCCESS; - } - - // Do nothing yet - return RETURN_SUCCESS; -} - -/** - Call before jumping to Normal World - - This function allows the firmware platform to do extra actions before - jumping to the Normal World - -**/ -VOID -ArmPlatformSecExtraAction ( - IN UINTN MpId, - OUT UINTN* JumpAddress - ) -{ - *JumpAddress = (UINTN)PcdGet64 (PcdFvBaseAddress); -} - diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSecLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSecLib.inf deleted file mode 100644 index 11466ac95a..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSecLib.inf +++ /dev/null @@ -1,41 +0,0 @@ -#/* @file -# Copyright (c) 2011-2012, ARM Limited. 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. -# -#*/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ArmRealViewEbSecLib - FILE_GUID = 6e02ebe0-1d96-11e0-b9cb-0002a5d5c51b - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmPlatformSecLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPkg/ArmPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - IoLib - ArmLib - ArmPlatformLib - -[Sources.common] - ArmRealViewEbSec.c - ArmRealViewEbBoot.asm | RVCT - ArmRealViewEbBoot.S | GCC - -[FixedPcd] - gArmTokenSpaceGuid.PcdFvBaseAddress - diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c deleted file mode 100644 index 1dd3153395..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c +++ /dev/null @@ -1,77 +0,0 @@ -/** @file - Template for ArmEb DebugAgentLib. - - For ARM we reserve FIQ for the Debug Agent Timer. We don't care about - laytency as we only really need the timer to run a few times a second - (how fast can some one type a ctrl-c?), but it works much better if - the interrupt we are using to break into the debugger is not being - used, and masked, by the system. - - Copyright (c) 2008 - 2010, Apple 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 IMPLIED. - -**/ - -#include - -#include - - - -/** - Setup all the hardware needed for the debug agents timer. - - This function is used to set up debug enviroment. - -**/ -VOID -EFIAPI -DebugAgentTimerIntialize ( - VOID - ) -{ - // Map Timer to FIQ -} - - -/** - Set the period for the debug agent timer. Zero means disable the timer. - - @param[in] TimerPeriodMilliseconds Frequency of the debug agent timer. - -**/ -VOID -EFIAPI -DebugAgentTimerSetPeriod ( - IN UINT32 TimerPeriodMilliseconds - ) -{ - if (TimerPeriodMilliseconds == 0) { - // Disable timer and Disable FIQ - return; - } - - // Set timer period and unmask FIQ -} - - -/** - Perform End Of Interrupt for the debug agent timer. This is called in the - interrupt handler after the interrupt has been processed. - -**/ -VOID -EFIAPI -DebugAgentTimerEndOfInterrupt ( - VOID - ) -{ - // EOI Timer interrupt for FIQ -} diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf deleted file mode 100644 index 38642fdf78..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf +++ /dev/null @@ -1,38 +0,0 @@ -#/** @file -# Component description file for Base PCI Cf8 Library. -# -# PCI CF8 Library that uses I/O ports 0xCF8 and 0xCFC to perform PCI Configuration cycles. -# Layers on top of an I/O Library instance. -# Copyright (c) 2007, Intel Corporation. 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. -# -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ArmEbDebugAgentTimerLib - FILE_GUID = 80949BBB-68EE-4a4c-B434-D5DB5A232F0C - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = DebugAgentTimerLib|SEC BASE DXE_CORE - - -[Sources.common] - DebugAgentTimerLib.c - - -[Packages] - MdePkg/MdePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEbPkg.dec - -[LibraryClasses] - IoLib - diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.c deleted file mode 100644 index 6d2892f6d7..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.c +++ /dev/null @@ -1,118 +0,0 @@ -/** @file - Basic serial IO abstaction for GDB - - Copyright (c) 2008 - 2009, Apple 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 IMPLIED. - -**/ - -#include -#include -#include -#include -#include - -RETURN_STATUS -EFIAPI -GdbSerialLibConstructor ( - VOID - ) -{ - return GdbSerialInit (115200, 0, 8, 1); -} - -RETURN_STATUS -EFIAPI -GdbSerialInit ( - IN UINT64 BaudRate, - IN UINT8 Parity, - IN UINT8 DataBits, - IN UINT8 StopBits - ) -{ - if ((Parity != 0) || (DataBits != 8) || (StopBits != 1)) { - return RETURN_UNSUPPORTED; - } - - if (BaudRate != 115200) { - // Could add support for different Baud rates.... - return RETURN_UNSUPPORTED; - } - - UINT32 Base = PcdGet32 (PcdGdbUartBase); - - // initialize baud rate generator to 115200 based on EB clock REFCLK24MHZ - MmioWrite32 (Base + UARTIBRD, UART_115200_IDIV); - MmioWrite32 (Base + UARTFBRD, UART_115200_FDIV); - - // no parity, 1 stop, no fifo, 8 data bits - MmioWrite32 (Base + UARTLCR_H, 0x60); - - // clear any pending errors - MmioWrite32 (Base + UARTECR, 0); - - // enable tx, rx, and uart overall - MmioWrite32 (Base + UARTCR, 0x301); - - return RETURN_SUCCESS; -} - -BOOLEAN -EFIAPI -GdbIsCharAvailable ( - VOID - ) -{ - UINT32 FR = PcdGet32 (PcdGdbUartBase) + UARTFR; - - if ((MmioRead32 (FR) & UART_RX_EMPTY_FLAG_MASK) == 0) { - return TRUE; - } else { - return FALSE; - } -} - -CHAR8 -EFIAPI -GdbGetChar ( - VOID - ) -{ - UINT32 FR = PcdGet32 (PcdGdbUartBase) + UARTFR; - UINT32 DR = PcdGet32 (PcdGdbUartBase) + UARTDR; - - while ((MmioRead32 (FR) & UART_RX_EMPTY_FLAG_MASK) == 0); - return MmioRead8 (DR); -} - -VOID -EFIAPI -GdbPutChar ( - IN CHAR8 Char - ) -{ - UINT32 FR = PcdGet32 (PcdGdbUartBase) + UARTFR; - UINT32 DR = PcdGet32 (PcdGdbUartBase) + UARTDR; - - while ((MmioRead32 (FR) & UART_TX_EMPTY_FLAG_MASK) != 0); - MmioWrite8 (DR, Char); - return; -} - -VOID -GdbPutString ( - IN CHAR8 *String - ) -{ - while (*String != '\0') { - GdbPutChar (*String); - String++; - } -} diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.inf deleted file mode 100644 index 38448ceaa6..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/GdbSerialLib/GdbSerialLib.inf +++ /dev/null @@ -1,39 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2010, Apple 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 IMPLIED. -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = GdbSerialLib - FILE_GUID = E8EA1309-2F14-428f-ABE3-7016CE4B4305 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = GdbSerialLib - - CONSTRUCTOR = GdbSerialLibConstructor - - -[Sources.common] - GdbSerialLib.c - - -[Packages] - MdePkg/MdePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEbPkg.dec - -[LibraryClasses] - DebugLib - IoLib - -[FixedPcd] - gArmRealViewEbPkgTokenSpaceGuid.PcdGdbUartBase diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c deleted file mode 100644 index 33524c06f1..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c +++ /dev/null @@ -1,54 +0,0 @@ -/** @file - - Copyright (c) 2011-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 -#include -#include - -#define NOR_FLASH_DEVICE_COUNT 1 - -// RTSM -NOR_FLASH_DESCRIPTION mNorFlashDevices[NOR_FLASH_DEVICE_COUNT] = { - { // UEFI - ARM_EB_SMB_NOR_BASE, - ARM_EB_SMB_NOR_BASE, - SIZE_128KB * 512, - SIZE_128KB, - {0xE7223039, 0x5836, 0x41E1, { 0xB5, 0x42, 0xD7, 0xEC, 0x73, 0x6C, 0x5E, 0x59 } } - } -}; - -EFI_STATUS -NorFlashPlatformInitialization ( - VOID - ) -{ - return EFI_SUCCESS; -} - -EFI_STATUS -NorFlashPlatformGetDevices ( - OUT NOR_FLASH_DESCRIPTION **NorFlashDevices, - OUT UINT32 *Count - ) -{ - if ((NorFlashDevices == NULL) || (Count == NULL)) { - return EFI_INVALID_PARAMETER; - } - - *NorFlashDevices = mNorFlashDevices; - *Count = NOR_FLASH_DEVICE_COUNT; - - return EFI_SUCCESS; -} diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf deleted file mode 100644 index 5f8c5c6b4f..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf +++ /dev/null @@ -1,35 +0,0 @@ -#/** @file -# -# Component description file for NorFlashArmRealViewEbLib module -# -# Copyright (c) 2011-2012, 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. -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = NorFlashArmRealViewEbLib - FILE_GUID = a3a49a60-7597-11e0-b07c-0002a5d5c51b - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = NorFlashPlatformLib - -[Sources.common] - NorFlashArmRealViewEb.c - -[Packages] - MdePkg/MdePkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - BaseLib - DebugLib - IoLib diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEb.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEb.c deleted file mode 100644 index 8b1a49bfbe..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEb.c +++ /dev/null @@ -1,232 +0,0 @@ -/** @file - - Copyright (c) 2011, 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 - -#include -#include -#include -#include - -#include -#include - -#include - -#include - -typedef struct { - UINT32 Mode; - UINT32 HorizontalResolution; - UINT32 VerticalResolution; - LCD_BPP Bpp; - UINT32 ClcdClk; - - UINT32 HSync; - UINT32 HBackPorch; - UINT32 HFrontPorch; - UINT32 VSync; - UINT32 VBackPorch; - UINT32 VFrontPorch; -} CLCD_RESOLUTION; - - -CLCD_RESOLUTION mResolutions[] = { - { // Mode 0 : VGA : 640 x 480 x 24 bpp - VGA, VGA_H_RES_PIXELS, VGA_V_RES_PIXELS, LCD_BITS_PER_PIXEL_24, 0x2C77, - VGA_H_SYNC, VGA_H_BACK_PORCH, VGA_H_FRONT_PORCH, - VGA_V_SYNC, VGA_V_BACK_PORCH, VGA_V_FRONT_PORCH - }, - { // Mode 1 : SVGA : 800 x 600 x 24 bpp - SVGA, SVGA_H_RES_PIXELS, SVGA_V_RES_PIXELS, LCD_BITS_PER_PIXEL_24, 0x2CAC, - SVGA_H_SYNC, SVGA_H_BACK_PORCH, SVGA_H_FRONT_PORCH, - SVGA_V_SYNC, SVGA_V_BACK_PORCH, SVGA_V_FRONT_PORCH - } -}; - -EFI_EDID_DISCOVERED_PROTOCOL mEdidDiscovered = { - 0, - NULL -}; - -EFI_EDID_ACTIVE_PROTOCOL mEdidActive = { - 0, - NULL -}; - -EFI_STATUS -LcdPlatformInitializeDisplay ( - IN EFI_HANDLE Handle - ) -{ - EFI_STATUS Status; - - MmioWrite32(ARM_EB_SYS_CLCD_REG, 1); - - // Install the EDID Protocols - Status = gBS->InstallMultipleProtocolInterfaces( - &Handle, - &gEfiEdidDiscoveredProtocolGuid, &mEdidDiscovered, - &gEfiEdidActiveProtocolGuid, &mEdidActive, - NULL - ); - - return Status; -} - -EFI_STATUS -LcdPlatformGetVram ( - OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress, - OUT UINTN* VramSize - ) -{ - *VramBaseAddress = PL111_CLCD_VRAM_BASE; - *VramSize = SIZE_8MB; //FIXME: Can this size change ? - return EFI_SUCCESS; -} - -UINT32 -LcdPlatformGetMaxMode ( - VOID - ) -{ - return (sizeof(mResolutions) / sizeof(CLCD_RESOLUTION)); -} - -EFI_STATUS -LcdPlatformSetMode ( - IN UINT32 ModeNumber - ) -{ - if (ModeNumber >= LcdPlatformGetMaxMode ()) { - return EFI_INVALID_PARAMETER; - } - - MmioWrite32(ARM_EB_SYS_LOCK_REG,0x0000A05F); - MmioWrite32(ARM_EB_SYS_OSC4_REG,mResolutions[ModeNumber].ClcdClk); - MmioWrite32(ARM_EB_SYS_LOCK_REG,0x0); - - return EFI_SUCCESS; -} - -EFI_STATUS -LcdPlatformQueryMode ( - IN UINT32 ModeNumber, - OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info - ) -{ - EFI_STATUS Status; - - if (ModeNumber >= LcdPlatformGetMaxMode ()) { - return EFI_INVALID_PARAMETER; - } - - Status = EFI_UNSUPPORTED; - - Info->Version = 0; - Info->HorizontalResolution = mResolutions[ModeNumber].HorizontalResolution; - Info->VerticalResolution = mResolutions[ModeNumber].VerticalResolution; - Info->PixelsPerScanLine = mResolutions[ModeNumber].HorizontalResolution; - - switch (mResolutions[ModeNumber].Bpp) { - case LCD_BITS_PER_PIXEL_24: - Info->PixelFormat = PixelRedGreenBlueReserved8BitPerColor; - Info->PixelInformation.RedMask = LCD_24BPP_RED_MASK; - Info->PixelInformation.GreenMask = LCD_24BPP_GREEN_MASK; - Info->PixelInformation.BlueMask = LCD_24BPP_BLUE_MASK; - Info->PixelInformation.ReservedMask = LCD_24BPP_RESERVED_MASK; - Status = EFI_SUCCESS; - break; - - case LCD_BITS_PER_PIXEL_16_555: - Info->PixelFormat = PixelBitMask; - Info->PixelInformation.RedMask = LCD_16BPP_555_RED_MASK; - Info->PixelInformation.GreenMask = LCD_16BPP_555_GREEN_MASK; - Info->PixelInformation.BlueMask = LCD_16BPP_555_BLUE_MASK; - Info->PixelInformation.ReservedMask = LCD_16BPP_555_RESERVED_MASK; - Status = EFI_SUCCESS; - break; - - case LCD_BITS_PER_PIXEL_16_565: - Info->PixelFormat = PixelBitMask; - Info->PixelInformation.RedMask = LCD_16BPP_565_RED_MASK; - Info->PixelInformation.GreenMask = LCD_16BPP_565_GREEN_MASK; - Info->PixelInformation.BlueMask = LCD_16BPP_565_BLUE_MASK; - Info->PixelInformation.ReservedMask = LCD_16BPP_565_RESERVED_MASK; - Status = EFI_SUCCESS; - break; - - case LCD_BITS_PER_PIXEL_12_444: - Info->PixelFormat = PixelBitMask; - Info->PixelInformation.RedMask = LCD_12BPP_444_RED_MASK; - Info->PixelInformation.GreenMask = LCD_12BPP_444_GREEN_MASK; - Info->PixelInformation.BlueMask = LCD_12BPP_444_BLUE_MASK; - Info->PixelInformation.ReservedMask = LCD_12BPP_444_RESERVED_MASK; - Status = EFI_SUCCESS; - break; - - case LCD_BITS_PER_PIXEL_8: - case LCD_BITS_PER_PIXEL_4: - case LCD_BITS_PER_PIXEL_2: - case LCD_BITS_PER_PIXEL_1: - default: - // These are not supported - break; - } - - return Status; -} - -EFI_STATUS -LcdPlatformGetTimings ( - IN UINT32 ModeNumber, - OUT UINT32* HRes, - OUT UINT32* HSync, - OUT UINT32* HBackPorch, - OUT UINT32* HFrontPorch, - OUT UINT32* VRes, - OUT UINT32* VSync, - OUT UINT32* VBackPorch, - OUT UINT32* VFrontPorch - ) -{ - if (ModeNumber >= LcdPlatformGetMaxMode ()) { - return EFI_INVALID_PARAMETER; - } - - *HRes = mResolutions[ModeNumber].HorizontalResolution; - *HSync = mResolutions[ModeNumber].HSync; - *HBackPorch = mResolutions[ModeNumber].HBackPorch; - *HFrontPorch = mResolutions[ModeNumber].HFrontPorch; - *VRes = mResolutions[ModeNumber].VerticalResolution; - *VSync = mResolutions[ModeNumber].VSync; - *VBackPorch = mResolutions[ModeNumber].VBackPorch; - *VFrontPorch = mResolutions[ModeNumber].VFrontPorch; - - return EFI_SUCCESS; -} - -EFI_STATUS -LcdPlatformGetBpp ( - IN UINT32 ModeNumber, - OUT LCD_BPP * Bpp - ) -{ - if (ModeNumber >= LcdPlatformGetMaxMode ()) { - return EFI_INVALID_PARAMETER; - } - - *Bpp = mResolutions[ModeNumber].Bpp; - - return EFI_SUCCESS; -} diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEbLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEbLib.inf deleted file mode 100644 index b94936bf34..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/PL111LcdArmRealViewEbLib/PL111LcdArmRealViewEbLib.inf +++ /dev/null @@ -1,65 +0,0 @@ -#/** @file -# -# Component description file for ArmRealViewGraphicsDxe module -# -# Copyright (c) 2011-2012, 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. -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = PL111LcdArmRealViewEbLib - FILE_GUID = 51396ee0-4973-11e0-868a-0002a5d5c51b - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = PL111LcdPlatformLib - -[Sources.common] - PL111LcdArmRealViewEb.c - -[Packages] - MdePkg/MdePkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - BaseLib - DebugLib - IoLib - -[Guids] - -[Protocols] - gEfiEdidDiscoveredProtocolGuid # Produced - gEfiEdidActiveProtocolGuid # Produced - -[FixedPcd.common] - - # - # The following modes are supported by PL111 - # - # 0 : 640 x 480 x 24 bpp - # 1 : 800 x 600 x 24 bpp - # 2 : 1024 x 768 x 24 bpp - # 3 : 640 x 480 x 16 bpp (565 RGB Mode) - # 4 : 800 x 600 x 16 bpp (565 RGB Mode) - # 5 : 1024 x 768 x 16 bpp (565 RGB Mode) - # 6 : 640 x 480 x 15 bpp (555 RGB Mode) - # 7 : 800 x 600 x 15 bpp (555 RGB Mode) - # 8 : 1024 x 768 x 15 bpp (555 RGB Mode) - # 9 : 1024 x 768 x 15 bpp (555 RGB Mode) - Linux driver settings - # 10 : 640 x 480 x 12 bpp (444 RGB Mode) - # 11 : 800 x 600 x 12 bpp (444 RGB Mode) - # 12 : 1024 x 768 x 12 bpp (444 RGB Mode) - # - -[Pcd.common] - -[Depex] - # gEfiCpuArchProtocolGuid diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.c deleted file mode 100644 index 1bcc481cb4..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.c +++ /dev/null @@ -1,87 +0,0 @@ -/** @file - Template library implementation to support ResetSystem Runtime call. - - Fill in the templates with what ever makes you system reset. - - - Copyright (c) 2008 - 2009, Apple 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 IMPLIED. - -**/ - - -#include - -#include -#include -#include -#include -#include - -/** - Resets the entire platform. - - @param ResetType The type of reset to perform. - @param ResetStatus The status code for the reset. - @param DataSize The size, in bytes, of WatchdogData. - @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or - EfiResetShutdown the data buffer starts with a Null-terminated - Unicode string, optionally followed by additional binary data. - -**/ -EFI_STATUS -EFIAPI -LibResetSystem ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN CHAR16 *ResetData OPTIONAL - ) -{ - if (ResetData != NULL) { - DEBUG ((EFI_D_ERROR, "%s", ResetData)); - } - - switch (ResetType) { - case EfiResetWarm: - // Map a warm reset into a cold reset - case EfiResetCold: - case EfiResetShutdown: - default: - CpuDeadLoop (); - break; - } - - // If the reset didn't work, return an error. - ASSERT (FALSE); - return EFI_DEVICE_ERROR; -} - - - -/** - Initialize any infrastructure required for LibResetSystem () to function. - - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -LibInitializeResetSystem ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - return EFI_SUCCESS; -} - diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf deleted file mode 100644 index 18a1203698..0000000000 --- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf +++ /dev/null @@ -1,35 +0,0 @@ -#/** @file -# Reset System lib to make it easy to port new platforms -# -# Copyright (c) 2008, Apple 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 IMPLIED. -# -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ArmEbResetSystemLib - FILE_GUID = CEFFA65C-B568-453e-9E11-B81AE683D035 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = EfiResetSystemLib - - -[Sources.common] - ResetSystemLib.c - -[Packages] - MdePkg/MdePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - -[LibraryClasses] - DebugLib - BaseLib -- cgit v1.2.3