2 * Main file supporting the SEC Phase on ARM PLatforms
4 * Copyright (c) 2011, ARM Limited. All rights reserved.
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
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.
20 #include <Library/ArmLib.h>
21 #include <Library/ArmCpuLib.h>
22 #include <Library/ArmPlatformLib.h>
23 #include <Library/BaseLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/PcdLib.h>
27 #define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)
30 ArmSetupGicNonSecure (
31 IN INTN GicDistributorBase
,
32 IN INTN GicInterruptInterfaceBase
35 // Vector Table for Sec Phase
42 NonSecureWaitForFirmware (
52 return_from_exception (
53 IN UINTN NonSecureBase
63 IN ARM_PROCESSOR_MODE Mode
67 SecCommonExceptionEntry (