]>
Commit | Line | Data |
---|---|---|
8cc852f7 | 1 | /** @file\r |
2 | * Main file supporting the Monitor World on ARM PLatforms\r | |
3 | *\r | |
836c3500 | 4 | * Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r |
8cc852f7 | 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 | |
22 | VOID\r | |
23 | MonitorVectorTable (\r | |
24 | VOID\r | |
25 | );\r | |
26 | \r | |
27 | VOID\r | |
28 | ArmSecureMonitorWorldInitialize (\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 | |
836c3500 | 36 | ArmWriteMVBar ((UINT32) &MonitorVectorTable);\r |
8cc852f7 | 37 | }\r |