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