]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/ArmCpuLib/ArmCortexA5xLib/ArmCortexA5xLib.c
ArmPkg: Added Aarch64 support
[mirror_edk2.git] / ArmPkg / Drivers / ArmCpuLib / ArmCortexA5xLib / ArmCortexA5xLib.c
CommitLineData
25402f5d
HL
1/** @file\r
2\r
3 Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
4\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <Base.h>\r
16#include <Library/ArmLib.h>\r
17#include <Library/ArmCpuLib.h>\r
18#include <Library/ArmArchTimerLib.h>\r
19#include <Library/DebugLib.h>\r
20#include <Library/IoLib.h>\r
21#include <Library/PcdLib.h>\r
22\r
23#include <Chipset/ArmCortexA5x.h>\r
24\r
25VOID\r
26ArmCpuSetup (\r
27 IN UINTN MpId\r
28 )\r
29{\r
30 // Check if Architectural Timer frequency is valid number (should not be 0)\r
31 ASSERT (PcdGet32 (PcdArmArchTimerFreqInHz));\r
32 ASSERT (ArmIsArchTimerImplemented () != 0);\r
33\r
34 // Note: System Counter frequency can only be set in Secure privileged mode,\r
35 // if security extensions are implemented.\r
36 ArmArchTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));\r
37\r
38 if (ArmIsMpCore ()) {\r
39 // Turn on SMP coherency\r
40 ArmSetAuxCrBit (A5X_FEATURE_SMP);\r
41 }\r
42\r
43}\r
44\r
45VOID\r
46ArmCpuSetupSmpNonSecure (\r
47 IN UINTN MpId\r
48 )\r
49{\r
50}\r