+++ /dev/null
-/** @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 <Uefi.h>
-#include <Chipset/ArmV7.h>
-#include <Library/ArmLib.h>
-#include <Library/BaseLib.h>
-#include <Library/IoLib.h>
-#include "ArmV7Lib.h"
-#include "ArmLibPrivate.h"
-
-VOID
-EFIAPI
-ArmSetupSmpNonSecure (
- IN UINTN CoreId
- )
-{
- INTN scu_base;
-
- ArmSetAuxCrBit (A9_FEATURE_SMP);
-
- if (CoreId == 0) {
- scu_base = ArmGetScuBaseAddress();
-
- // Allow NS access to SCU register
- MmioOr32(scu_base + SCU_SACR_OFFSET, 0xf);
- // Allow NS access to Private Peripherals
- MmioOr32(scu_base + SCU_SSACR_OFFSET, 0xfff);
- }
-}
-
-VOID
-EFIAPI
-ArmInvalidScu (
- VOID
- )
-{
- INTN scu_base;
-
- scu_base = ArmGetScuBaseAddress();
-
- // Invalidate all: write -1 to SCU Invalidate All register
- MmioWrite32(scu_base + SCU_INVALL_OFFSET, 0xffffffff);
- // Enable SCU
- MmioWrite32(scu_base + SCU_CONTROL_OFFSET, 0x1);
-}
+++ /dev/null
-#\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
-#\r
-#\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Chipset/ArmV7.h>\r
-#include <AutoGen.h>\r
-#.include AsmMacroIoLib.inc\r
-\r
-.text\r
-.align 2\r
-\r
-GCC_ASM_EXPORT(ArmIsScuEnable)\r
-GCC_ASM_EXPORT(ArmGetScuBaseAddress)\r
-\r
-# IN None\r
-# OUT r0 = SCU Base Address\r
-ASM_PFX(ArmGetScuBaseAddress):\r
- # Read Configuration Base Address Register. ArmCBar cannot be called to get\r
- # the Configuration BAR as a stack is not necessary setup. The SCU is at the\r
- # offset 0x0000 from the Private Memory Region.\r
- mrc p15, 4, r0, c15, c0, 0\r
- bx lr\r
-\r
-# IN None\r
-# OUT r1 = SCU enabled (boolean)\r
-ASM_PFX(ArmIsScuEnable):\r
- # Read Configuration Base Address Register. ArmCBar cannot be called to get\r
- # the Configuration BAR as a stack is not necessary setup. The SCU is at the\r
- # offset 0x0000 from the Private Memory Region.\r
- mrc p15, 4, r0, c15, c0, 0\r
- add r1, r0, #SCU_CONTROL_OFFSET\r
- ldr r1, [r1]\r
- and r1, r1, #1\r
- bx lr\r
-\r
-ASM_FUNCTION_REMOVE_IF_UNREFERENCED \r
+++ /dev/null
-//\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
-//\r
-//\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Chipset/ArmV7.h>\r
-#include <AutoGen.h>\r
-\r
- INCLUDE AsmMacroIoLib.inc\r
-\r
- EXPORT ArmIsScuEnable\r
- EXPORT ArmGetScuBaseAddress\r
- \r
- AREA ArmV7MPCore, CODE, READONLY\r
-\r
-// IN None\r
-// OUT r0 = SCU Base Address\r
-ArmGetScuBaseAddress\r
- // Read Configuration Base Address Register. ArmCBar cannot be called to get\r
- // the Configuration BAR as a stack is not necessary setup. The SCU is at the\r
- // offset 0x0000 from the Private Memory Region.\r
- mrc p15, 4, r0, c15, c0, 0\r
- bx lr\r
-\r
-// IN None\r
-// OUT r1 = SCU enabled (boolean)\r
-ArmIsScuEnable\r
- // Read Configuration Base Address Register. ArmCBar cannot be called to get\r
- // the Configuration BAR as a stack is not necessary setup. The SCU is at the\r
- // offset 0x0000 from the Private Memory Region.\r
- mrc p15, 4, r0, c15, c0, 0\r
- add r1, r0, #SCU_CONTROL_OFFSET\r
- ldr r1, [r1]\r
- and r1, r1, #1\r
- bx lr\r
-\r
- END\r
+++ /dev/null
-#/** @file\r
-# Helper Library for ARMv7 MPCore architecture\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
-#\r
-#\r
-#**/\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = ArmV7Lib\r
- FILE_GUID = 411cdfd8-f964-4b9d-a3e3-1719a9c15559\r
- MODULE_TYPE = DXE_DRIVER\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = ArmLib\r
-\r
-[Sources.common]\r
- ArmLibSupport.S | GCC\r
- ArmLibSupport.asm | RVCT\r
- ../Common/ArmLib.c\r
- \r
- ArmV7Support.S | GCC\r
- ArmV7Support.asm | RVCT\r
-\r
- ArmV7Lib.c\r
- ArmV7Mmu.c\r
-\r
- ArmV7MPCore.c\r
- ArmV7MPCoreHelper.S | GCC\r
- ArmV7MPCoreHelper.asm | RVCT\r
-\r
-[Packages]\r
- ArmPkg/ArmPkg.dec\r
- MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
- IoLib\r
- MemoryAllocationLib\r
-\r
-[Protocols]\r
- gEfiCpuArchProtocolGuid\r
-\r
-[FixedPcd]\r
- gArmTokenSpaceGuid.PcdArmCacheOperationThreshold\r
+++ /dev/null
-#/** @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
-#\r
-#**/\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = ArmV7LibPrePi\r
- FILE_GUID = A150FA0C-F4E8-4207-9BEB-CD6DFB430D73\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = ArmLib\r
-\r
-[Sources.common]\r
- ArmLibSupport.S | GCC\r
- ArmLibSupport.asm | RVCT\r
- ../Common/ArmLib.c\r
- \r
- ArmV7Support.S | GCC\r
- ArmV7Support.asm | RVCT\r
-\r
- ArmV7Lib.c\r
- ArmV7Mmu.c\r
-\r
- ArmV7MPCore.c\r
- ArmV7MPCoreHelper.S | GCC\r
- ArmV7MPCoreHelper.asm | RVCT\r
-\r
-[Packages]\r
- ArmPkg/ArmPkg.dec\r
- MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
- IoLib\r
- PrePiLib\r
- \r
-[Protocols]\r
- gEfiCpuArchProtocolGuid\r
-\r
-[FixedPcd]\r
- gArmTokenSpaceGuid.PcdArmCacheOperationThreshold\r
+++ /dev/null
-#/* @file\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
-#\r
-#*/\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = ArmV7Lib\r
- FILE_GUID = 411cdfd8-f964-4b9d-a3e3-1719a9c15559\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = ArmLib\r
-\r
-[Sources.common]\r
- ArmLibSupport.S | GCC\r
- ArmLibSupport.asm | RVCT\r
- ../Common/ArmLib.c\r
- \r
- ArmV7Support.S | GCC\r
- ArmV7Support.asm | RVCT\r
-\r
- ArmV7Lib.c\r
- ArmV7MPCore.c\r
- ArmV7MPCoreHelper.S | GCC\r
- ArmV7MPCoreHelper.asm | RVCT\r
-\r
-[Packages]\r
- ArmPkg/ArmPkg.dec\r
- MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
- IoLib\r
-\r
-[Protocols]\r
- gEfiCpuArchProtocolGuid\r
-\r
-[FixedPcd]\r
- gArmTokenSpaceGuid.PcdArmCacheOperationThreshold\r
!include ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc\r
\r
[LibraryClasses.common]\r
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf\r
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf\r
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf\r
\r
ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf\r
\r
[LibraryClasses.common.SEC]\r
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLibSec.inf\r
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbSecLib.inf\r
\r
[BuildOptions]\r
ArmPlatformPkg/PrePi/PeiMPCore.inf {\r
<LibraryClasses>\r
ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf\r
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf\r
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf\r
}\r
!else\r
!include ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
[LibraryClasses.common]
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf
ArmTrustZoneLib|ArmPkg/Library/ArmTrustZoneLib/ArmTrustZoneLib.inf
LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
[LibraryClasses.common.SEC]
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLibSec.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressSecLib.inf
# Uncomment to turn on GDB stub in SEC.
ArmPlatformPkg/PrePi/PeiMPCore.inf {
<LibraryClasses>
ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf
ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.inf
}
!include ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
[LibraryClasses.common]
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
#DebugAgentTimerLib|ArmPlatformPkg/ArmVExpressPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.inf
[LibraryClasses.common.SEC]
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLibSec.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressSecLib.inf
# Uncomment to turn on GDB stub in SEC.
ArmPlatformPkg/PrePi/PeiMPCore.inf {
<LibraryClasses>
ArmGicSecLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLib.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.inf
}