+++ /dev/null
-/** @file\r
-\r
- Copyright (c) 2011-2012, 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 <Base.h>\r
-#include <Library/ArmLib.h>\r
-#include <Library/ArmCpuLib.h>\r
-#include <Library/ArmGenericTimerCounterLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/PcdLib.h>\r
-\r
-#include <Chipset/ArmV7.h>\r
-\r
-#define A15_FEATURE_SMP (1<<6)\r
-\r
-VOID\r
-ArmCpuSetup (\r
- IN UINTN MpId\r
- )\r
-{\r
- // Check if Architectural Timer frequency is valid number (should not be 0)\r
- ASSERT (PcdGet32 (PcdArmArchTimerFreqInHz));\r
- ASSERT(ArmIsArchTimerImplemented () != 0);\r
-\r
- // Enable SWP instructions\r
- ArmEnableSWPInstruction ();\r
-\r
- // Enable program flow prediction, if supported.\r
- ArmEnableBranchPrediction ();\r
-\r
- // Note: System Counter frequency can only be set in Secure privileged mode,\r
- // if security extensions are implemented.\r
- ArmGenericTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));\r
-\r
- if (ArmIsMpCore()) {\r
- // Turn on SMP coherency\r
- ArmSetAuxCrBit (A15_FEATURE_SMP);\r
- }\r
-\r
-}\r
-\r
-\r
-VOID\r
-ArmCpuSetupSmpNonSecure (\r
- IN UINTN MpId\r
- )\r
-{\r
- /*// Make the SCU accessible in Non Secure world\r
- if (ArmPlatformIsPrimaryCore (MpId)) {\r
- ScuBase = ArmGetScuBaseAddress();\r
-\r
- // Allow NS access to SCU register\r
- MmioOr32 (ScuBase + A9_SCU_SACR_OFFSET, 0xf);\r
- // Allow NS access to Private Peripherals\r
- MmioOr32 (ScuBase + A9_SCU_SSACR_OFFSET, 0xfff);\r
- }*/\r
-}\r