2011-09-23 01:08:40 +02:00
|
|
|
/** @file
|
|
|
|
* Main file supporting the SEC Phase on ARM PLatforms
|
|
|
|
*
|
2013-01-28 12:56:33 +01:00
|
|
|
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
|
2011-09-23 01:08:40 +02:00
|
|
|
*
|
|
|
|
* This program and the accompanying materials
|
|
|
|
* are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
* which accompanies this distribution. The full text of the license may be found at
|
|
|
|
* http://opensource.org/licenses/bsd-license.php
|
|
|
|
*
|
|
|
|
* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __SEC_H__
|
|
|
|
#define __SEC_H__
|
|
|
|
|
|
|
|
#include <Base.h>
|
2011-09-27 18:22:09 +02:00
|
|
|
#include <Library/ArmLib.h>
|
|
|
|
#include <Library/ArmCpuLib.h>
|
2013-05-10 14:41:27 +02:00
|
|
|
#include <Library/ArmPlatformLib.h>
|
2012-05-02 22:13:32 +02:00
|
|
|
#include <Library/ArmPlatformSecLib.h>
|
2011-09-23 01:08:40 +02:00
|
|
|
#include <Library/BaseLib.h>
|
|
|
|
#include <Library/DebugLib.h>
|
2011-09-27 18:22:09 +02:00
|
|
|
#include <Library/PcdLib.h>
|
2011-09-23 01:08:40 +02:00
|
|
|
|
|
|
|
#define IS_ALIGNED(Address, Align) (((UINTN)Address & (Align-1)) == 0)
|
|
|
|
|
2012-02-28 18:28:44 +01:00
|
|
|
VOID
|
|
|
|
TrustedWorldInitialization (
|
2012-07-04 22:08:54 +02:00
|
|
|
IN UINTN MpId,
|
|
|
|
IN UINTN SecBootMode
|
2012-02-28 18:28:44 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NonTrustedWorldTransition (
|
2012-02-28 18:29:41 +01:00
|
|
|
IN UINTN MpId,
|
|
|
|
IN UINTN JumpAddress
|
2012-02-28 18:28:44 +01:00
|
|
|
);
|
|
|
|
|
2011-09-23 01:08:40 +02:00
|
|
|
VOID
|
|
|
|
ArmSetupGicNonSecure (
|
2012-02-28 18:28:44 +01:00
|
|
|
IN INTN GicDistributorBase,
|
|
|
|
IN INTN GicInterruptInterfaceBase
|
2011-09-23 01:08:40 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
enter_monitor_mode (
|
2012-02-28 18:28:44 +01:00
|
|
|
IN UINTN MonitorEntryPoint,
|
|
|
|
IN UINTN MpId,
|
2012-07-04 22:08:54 +02:00
|
|
|
IN UINTN SecBootMode,
|
|
|
|
IN VOID* MonitorStackBase
|
2011-09-23 01:08:40 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
return_from_exception (
|
2012-02-28 18:28:44 +01:00
|
|
|
IN UINTN NonSecureBase
|
2011-09-23 01:08:40 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
copy_cpsr_into_spsr (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2011-11-02 00:41:20 +01:00
|
|
|
VOID
|
|
|
|
set_non_secure_mode (
|
2012-02-28 18:28:44 +01:00
|
|
|
IN ARM_PROCESSOR_MODE Mode
|
2011-11-02 00:41:20 +01:00
|
|
|
);
|
|
|
|
|
2011-09-23 01:08:40 +02:00
|
|
|
VOID
|
|
|
|
SecCommonExceptionEntry (
|
|
|
|
IN UINT32 Entry,
|
2013-01-28 12:56:33 +01:00
|
|
|
IN UINTN LR
|
2011-09-23 01:08:40 +02:00
|
|
|
);
|
|
|
|
|
2013-08-06 12:59:19 +02:00
|
|
|
VOID
|
|
|
|
EFIAPI
|
|
|
|
ArmSecArchTrustzoneInit (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2011-09-23 01:08:40 +02:00
|
|
|
#endif
|