]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Library/ArmTrustedMonitorLibNull/ArmTrustedMonitorLibNull.c
ArmPlatformPkg: Move the Secure Monitor initialization into a separate 'ArmTrustedMon...
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmTrustedMonitorLibNull / ArmTrustedMonitorLibNull.c
CommitLineData
8cc852f7 1/** @file\r
2* Main file supporting the Monitor World on ARM PLatforms\r
3*\r
4* Copyright (c) 2011, ARM Limited. All rights reserved.\r
5*\r
6* This program and the accompanying materials\r
7* are licensed and made available under the terms and conditions of the BSD License\r
8* which accompanies this distribution. The full text of the license may be found at\r
9* http://opensource.org/licenses/bsd-license.php\r
10*\r
11* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13*\r
14**/\r
15\r
16#include <Library/ArmLib.h>\r
17#include <Library/ArmTrustedMonitorLib.h>\r
18#include <Library/DebugLib.h>\r
19\r
20#define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)\r
21\r
22VOID\r
23MonitorVectorTable (\r
24 VOID\r
25 );\r
26\r
27VOID\r
28ArmSecureMonitorWorldInitialize (\r
29 VOID\r
30 )\r
31{\r
32 // Ensure the Monitor Table is 32bit aligned\r
33 ASSERT (IS_ALIGNED(MonitorVectorTable, BIT5));\r
34\r
35 // Write the Monitor Mode Vector Table Address\r
36 ArmWriteVMBar ((UINT32) &MonitorVectorTable);\r
37}\r