2011-06-11 14:10:19 +02:00
|
|
|
/** @file
|
|
|
|
* Main file supporting the transition to PEI Core in Normal World for Versatile Express
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011, ARM Limited. All rights reserved.
|
|
|
|
*
|
|
|
|
* 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 __PREPEICORE_H_
|
|
|
|
#define __PREPEICORE_H_
|
|
|
|
|
2011-09-23 01:11:03 +02:00
|
|
|
#include <Library/ArmLib.h>
|
|
|
|
#include <Library/ArmPlatformLib.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
2011-07-01 17:30:01 +02:00
|
|
|
#include <Library/DebugLib.h>
|
2011-09-23 01:11:03 +02:00
|
|
|
#include <Library/IoLib.h>
|
2011-07-01 17:30:01 +02:00
|
|
|
#include <Library/PcdLib.h>
|
|
|
|
|
2011-06-11 14:10:19 +02:00
|
|
|
#include <PiPei.h>
|
|
|
|
#include <Ppi/TemporaryRamSupport.h>
|
|
|
|
|
2011-09-23 01:12:23 +02:00
|
|
|
VOID
|
|
|
|
CreatePpiList (
|
|
|
|
OUT UINTN *PpiListSize,
|
|
|
|
OUT EFI_PEI_PPI_DESCRIPTOR **PpiList
|
|
|
|
);
|
2011-06-11 14:10:19 +02:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
2011-09-23 01:12:23 +02:00
|
|
|
PrePeiCoreTemporaryRamSupport (
|
2011-06-11 14:10:19 +02:00
|
|
|
IN CONST EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
|
|
|
|
IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
|
|
|
|
IN UINTN CopySize
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
SecSwitchStack (
|
|
|
|
INTN StackDelta
|
|
|
|
);
|
|
|
|
|
|
|
|
// Vector Table for Pei Phase
|
|
|
|
VOID PeiVectorTable (VOID);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
EFIAPI
|
|
|
|
PrimaryMain (
|
|
|
|
IN EFI_PEI_CORE_ENTRY_POINT PeiCoreEntryPoint
|
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is the main function for secondary cores. They loop around until a non Null value is written to
|
|
|
|
* SYS_FLAGS register.The SYS_FLAGS register is platform specific.
|
|
|
|
* Note:The secondary cores, while executing secondary_main, assumes that:
|
|
|
|
* : SGI 0 is configured as Non-secure interrupt
|
|
|
|
* : Priority Mask is configured to allow SGI 0
|
|
|
|
* : Interrupt Distributor and CPU interfaces are enabled
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
VOID
|
|
|
|
EFIAPI
|
|
|
|
SecondaryMain (
|
2011-09-23 01:01:13 +02:00
|
|
|
IN UINTN MpId
|
2011-06-11 14:10:19 +02:00
|
|
|
);
|
|
|
|
|
2013-03-12 01:54:02 +01:00
|
|
|
VOID
|
|
|
|
PeiCommonExceptionEntry (
|
|
|
|
IN UINT32 Entry,
|
|
|
|
IN UINTN LR
|
|
|
|
);
|
|
|
|
|
2011-06-11 14:10:19 +02:00
|
|
|
#endif
|