summaryrefslogtreecommitdiff
path: root/ArmRealViewEbPkg/SecForPei
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-13 09:33:49 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-13 09:33:49 +0000
commit151daa57732eaeacf286f63ea05bbe08c0e27c3c (patch)
tree0d332b62676f49a30765f2aabbb0459f295a5821 /ArmRealViewEbPkg/SecForPei
parent48a9d5f7781e430c54cfc2964243580c56384310 (diff)
downloadedk2-platforms-151daa57732eaeacf286f63ea05bbe08c0e27c3c.tar.xz
ArmRealViewEbPkg: Delete the deprecated package 'ArmRealViewEbPkg'
ARM RealView Emulation Board is supporting by the package: ArmPlatformPkg/ArmRealViewEbPkg/ git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12337 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmRealViewEbPkg/SecForPei')
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.S79
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.asm80
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Arm/SwitchStack.S43
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm38
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Sec.c119
-rwxr-xr-xArmRealViewEbPkg/SecForPei/Sec.inf57
6 files changed, 0 insertions, 416 deletions
diff --git a/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.S b/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.S
deleted file mode 100755
index 57fea68c65..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.S
+++ /dev/null
@@ -1,79 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# ARM EB Entry point. Reset vector in FV header will brach to
-# _ModuleEntryPoint.
-#
-# We use crazy macros, like LoadConstantToReg, since Xcode assembler
-# does not support = assembly syntax for ldr.
-#
-# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-#
-# 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 <AsmMacroIoLib.h>
-#include <Base.h>
-#include <Library/PcdLib.h>
-#include <ArmEb/ArmEb.h>
-
-.text
-.align 3
-
-.globl ASM_PFX(CEntryPoint)
-.globl ASM_PFX(_ModuleEntryPoint)
-.globl ASM_PFX(StartupAddr)
-
-
-ASM_PFX(StartupAddr): .word ASM_PFX(CEntryPoint)
-
-ASM_PFX(_ModuleEntryPoint):
-
- // Turn off remapping NOR to 0. We can now use DRAM in low memory
- // CAN'T DO THIS HERE -- BRANCH FROM RESET VECTOR IS RELATIVE AND REMAINS IN REMAPPED NOR
- //MmioOr32 (0x10001000 ,BIT8) //EB_SP810_CTRL_BASE
-
- // Enable NEON register in case folks want to use them for optimizations (CopyMem)
- mrc p15, 0, r0, c1, c0, 2
- orr r0, r0, #0x00f00000 // Enable VFP access (V* instructions)
- mcr p15, 0, r0, c1, c0, 2
- mov r0, #0x40000000 // Set EN bit in FPEXC
- mcr p10,#0x7,r0,c8,c0,#0 // msr FPEXC,r0 in ARM assembly
-
- // Set CPU vectors to 0 (which is currently flash)
- LoadConstantToReg (FixedPcdGet32(PcdCpuVectorBaseAddress) ,r0) // Get vector base
- mcr p15, 0, r0, c12, c0, 0
- isb // Sync changes to control registers
-
- //
- // Set stack based on PCD values. Need to do it this way to make C code work
- // when it runs from FLASH.
- //
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackBase) ,r0) // temp ram base arg 0 TODO: change "stackbase" to "temprambase"
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackSize) ,r1) // temp ram size arg 1
- lsr r3, r1, #1 // r4 = size of temp mem / 2
- add r3, r3, r0 // r2 = temp ram base + r4
- mov r13, r3 // result: stack pointer = temp ram base + (size of temp mem / 2)
-
- // lr points to area in reset vector block containing PEI core address
- ldr r2, [lr] // pei core arg 3
-
- // move sec startup address into a data register
- // ensure we're jumping to FV version of the code (not boot remapped alias)
- ldr r4, ASM_PFX(StartupAddr) // Extra level of indirection fixes Xcode relocation issue
-
- // jump to SEC C code
- blx r4
-
-
-ASM_PFX(ShouldNeverGetHere):
- // _CEntryPoint should never return
- b ASM_PFX(ShouldNeverGetHere)
-
-
diff --git a/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.asm b/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.asm
deleted file mode 100755
index 135cb8d207..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Arm/ModuleEntryPoint.asm
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-//
-// 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 <AsmMacroIoLib.h>
-#include <Base.h>
-#include <Library/PcdLib.h>
-#include <ArmEb/ArmEb.h>
-#include <AutoGen.h>
-
- INCLUDE AsmMacroIoLib.inc
-
- IMPORT CEntryPoint
- EXPORT _ModuleEntryPoint
-
- PRESERVE8
- AREA ModuleEntryPoint, CODE, READONLY
-
-
-StartupAddr DCD CEntryPoint
-
-_ModuleEntryPoint
-
- // Turn off remapping NOR to 0. We can now use DRAM in low memory
- // CAN'T DO THIS HERE -- BRANCH FROM RESET VECTOR IS RELATIVE AND REMAINS IN REMAPPED NOR
- //MmioOr32 (0x10001000 ,BIT8) //EB_SP810_CTRL_BASE
-
- // Enable NEON register in case folks want to use them for optimizations (CopyMem)
- mrc p15, 0, r0, c1, c0, 2
- orr r0, r0, #0x00f00000 // Enable VFP access (V* instructions)
- mcr p15, 0, r0, c1, c0, 2
- mov r0, #0x40000000 // Set EN bit in FPEXC
- mcr p10,#0x7,r0,c8,c0,#0 // msr FPEXC,r0 in ARM assembly
-
- // Set CPU vectors to 0 (which is currently flash)
- LoadConstantToReg (FixedPcdGet32(PcdCpuVectorBaseAddress) ,r0) // Get vector base
- mcr p15, 0, r0, c12, c0, 0
- isb // Sync changes to control registers
-
- //
- // Set stack based on PCD values. Need to do it this way to make C code work
- // when it runs from FLASH.
- //
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackBase) ,r0) // temp ram base arg 0 TODO: change "stackbase" to "temprambase"
- LoadConstantToReg (FixedPcdGet32(PcdPrePiStackSize) ,r1) // temp ram size arg 1
- lsr r3, r1, #1 // r4 = size of temp mem / 2
- add r3, r3, r0 // r2 = temp ram base + r4
- mov r13, r3 // result: stack pointer = temp ram base + (size of temp mem / 2)
-
- // lr points to area in reset vector block containing PEI core address
- ldr r2, [lr] // pei core arg 3
-
- // move sec startup address into a data register
- // ensure we're jumping to FV version of the code (not boot remapped alias)
- ldr r4, StartupAddr
-
- // jump to SEC C code
- blx r4
-
- // Call C entry point
- // THIS DOESN'T WORK, WE NEED A LONG JUMP
- // blx CEntryPoint
-
-ShouldNeverGetHere
- // _CEntryPoint should never return
- b ShouldNeverGetHere
-
- END
-
-
diff --git a/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.S b/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.S
deleted file mode 100755
index b4b62d935a..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.S
+++ /dev/null
@@ -1,43 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# 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.
-#
-#------------------------------------------------------------------------------
-
-.text
-.align 3
-
-.globl ASM_PFX(SecSwitchStack)
-
-
-
-#/**
-# This allows the caller to switch the stack and return
-#
-# @param StackDelta Signed amount by which to modify the stack pointer
-#
-# @return Nothing. Goes to the Entry Point passing in the new parameters
-#
-#**/
-#VOID
-#EFIAPI
-#SecSwitchStack (
-# VOID *StackDelta
-# )#
-#
-ASM_PFX(SecSwitchStack):
- mov R1, R13
- add R1, R0, R1
- mov R13, R1
- bx LR
-
-
-
diff --git a/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm b/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm
deleted file mode 100755
index 10da81d6ac..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm
+++ /dev/null
@@ -1,38 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-; 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.
-;
-;------------------------------------------------------------------------------
-
- EXPORT SecSwitchStack
-
- AREA Switch_Stack, CODE, READONLY
-
-;/**
-; This allows the caller to switch the stack and return
-;
-; @param StackDelta Signed amount by which to modify the stack pointer
-;
-; @return Nothing. Goes to the Entry Point passing in the new parameters
-;
-;**/
-;VOID
-;EFIAPI
-;SecSwitchStack (
-; VOID *StackDelta
-; );
-;
-SecSwitchStack
- MOV R1, SP
- ADD R1, R0, R1
- MOV SP, R1
- BX LR
- END
diff --git a/ArmRealViewEbPkg/SecForPei/Sec.c b/ArmRealViewEbPkg/SecForPei/Sec.c
deleted file mode 100755
index fbe5b9a2d0..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Sec.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/** @file
- C Entry point for the SEC. First C code after the reset vector.
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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 <PiPei.h>
-#include <Ppi/TemporaryRamSupport.h>
-#include <Library/PcdLib.h>
-#include <Library/IoLib.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <ArmEb/ArmEb.h>
-
-EFI_STATUS
-EFIAPI
-SecTemporaryRamSupport (
- IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
- IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
- IN UINTN CopySize
- );
-
-VOID
-SecSwitchStack (
- INTN StackDelta
- );
-
-TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {SecTemporaryRamSupport};
-
-EFI_PEI_PPI_DESCRIPTOR gSecPpiTable[] = {
- {
- EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
- &gEfiTemporaryRamSupportPpiGuid,
- &mSecTemporaryRamSupportPpi
- }
-};
-
-
-VOID
-EFIAPI
-_ModuleEntryPoint(
- VOID
- );
-
-VOID
-CEntryPoint (
- IN UINTN TempRamBase,
- IN UINTN TempRamSize,
- IN EFI_PEI_CORE_ENTRY_POINT PeiCoreEntryPoint
- )
-{
- EFI_SEC_PEI_HAND_OFF SecCoreData;
-
- // Turn off remapping NOR to 0. We can will now see DRAM in low memory (although it is not yet initialized)
- // note: this makes SEC platform-specific for the EB platform
- MmioOr32 (0x10001000 ,BIT8); //EB_SP810_CTRL_BASE
-
- //
- // Bind this information into the SEC hand-off state
- // Note: this must be in sync with the stuff in the asm file
- // Note also: HOBs (pei temp ram) MUST be above stack
- //
- SecCoreData.DataSize = sizeof(EFI_SEC_PEI_HAND_OFF);
- SecCoreData.BootFirmwareVolumeBase = (VOID *)(UINTN)PcdGet32 (PcdEmbeddedFdBaseAddress);
- SecCoreData.BootFirmwareVolumeSize = PcdGet32 (PcdEmbeddedFdSize);
- SecCoreData.TemporaryRamBase = (VOID*)(UINTN)TempRamBase;
- SecCoreData.TemporaryRamSize = TempRamSize;
- SecCoreData.PeiTemporaryRamBase = (VOID *)(UINTN)(SecCoreData.TemporaryRamBase + (SecCoreData.TemporaryRamSize / 2));
- SecCoreData.PeiTemporaryRamSize = SecCoreData.TemporaryRamSize / 2;
- SecCoreData.StackBase = (VOID *)(UINTN)(SecCoreData.TemporaryRamBase);
- SecCoreData.StackSize = SecCoreData.TemporaryRamSize - SecCoreData.PeiTemporaryRamSize;
-
- // jump to pei core entry point
- (PeiCoreEntryPoint)(&SecCoreData, (VOID *)&gSecPpiTable);
-}
-
-EFI_STATUS
-EFIAPI
-SecTemporaryRamSupport (
- IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
- IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
- IN UINTN CopySize
- )
-{
- //
- // Migrate the whole temporary memory to permenent memory.
- //
- CopyMem (
- (VOID*)(UINTN)PermanentMemoryBase,
- (VOID*)(UINTN)TemporaryMemoryBase,
- CopySize
- );
-
- SecSwitchStack((UINTN)(PermanentMemoryBase - TemporaryMemoryBase));
-
- //
- // We need *not* fix the return address because currently,
- // The PeiCore is excuted in flash.
- //
-
- //
- // Simulate to invalid temporary memory, terminate temporary memory
- //
- //ZeroMem ((VOID*)(UINTN)TemporaryMemoryBase, CopySize);
-
- return EFI_SUCCESS;
-}
-
diff --git a/ArmRealViewEbPkg/SecForPei/Sec.inf b/ArmRealViewEbPkg/SecForPei/Sec.inf
deleted file mode 100755
index e1673f0189..0000000000
--- a/ArmRealViewEbPkg/SecForPei/Sec.inf
+++ /dev/null
@@ -1,57 +0,0 @@
-
-#/** @file
-# SEC - Reset vector code that jumps to C and loads DXE core
-#
-# Copyright (c) 2008, Apple Inc. All rights reserved.<BR>
-# 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 = ArmRealViewEbSec
- FILE_GUID = d959e387-7b91-452c-90e0-a1dbac90ddb8
- MODULE_TYPE = SEC
- VERSION_STRING = 1.0
-
-
-
-[Sources.ARM]
- Sec.c
- Arm/SwitchStack.asm
- Arm/SwitchStack.S
- Arm/ModuleEntryPoint.S
- Arm/ModuleEntryPoint.asm
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
- ArmPkg/ArmPkg.dec
- ArmRealViewEbPkg/ArmRealViewEbPkg.dec
-
-[LibraryClasses]
- BaseLib
- BaseMemoryLib
- DebugLib
- IoLib
-
-[Ppis]
- gEfiTemporaryRamSupportPpiGuid
-
-[FeaturePcd]
-
-[FixedPcd]
- gArmTokenSpaceGuid.PcdCpuVectorBaseAddress
- gEmbeddedTokenSpaceGuid.PcdPrePiStackSize
- gEmbeddedTokenSpaceGuid.PcdPrePiStackBase
- gEmbeddedTokenSpaceGuid.PcdEmbeddedFdSize
- gEmbeddedTokenSpaceGuid.PcdEmbeddedFdBaseAddress
-
-