/** @file\r
*\r
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
-* \r
-* This program and the accompanying materials \r
-* are licensed and made available under the terms and conditions of the BSD License \r
-* which accompanies this distribution. The full text of the license may be found at \r
-* http://opensource.org/licenses/bsd-license.php \r
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
*\r
-* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+* This program and the accompanying materials\r
+* are licensed and made available under the terms and conditions of the BSD License\r
+* which accompanies this distribution. The full text of the license may be found at\r
+* http://opensource.org/licenses/bsd-license.php\r
+*\r
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
*\r
**/\r
\r
//\r
#include <Ppi/MasterBootMode.h>\r
#include <Ppi/BootInRecoveryMode.h>\r
-#include <Guid/MemoryTypeInformation.h>\r
\r
#include <Library/ArmLib.h>\r
\r
/**\r
- This structure is used to describe a region of the EFI memory map\r
+ Return the core position from the value of its MpId register\r
\r
- Every EFI regions of the system memory described by their physical start address and their size\r
- can have different attributes. Some regions can be tested and other untested.\r
+ This function returns the core position from the position 0 in the processor.\r
+ This function might be called from assembler before any stack is set.\r
\r
-**/\r
-typedef struct {\r
- EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;\r
- EFI_PHYSICAL_ADDRESS PhysicalStart;\r
- UINT64 NumberOfBytes;\r
-} ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR;\r
+ @return Return the core position\r
\r
+**/\r
UINTN\r
ArmPlatformGetCorePosition (\r
IN UINTN MpId\r
);\r
\r
+/**\r
+ Return a non-zero value if the callee is the primary core\r
+\r
+ This function returns a non-zero value if the callee is the primary core.\r
+ The primary core is the core responsible to initialize the hardware and run UEFI.\r
+ This function might be called from assembler before any stack is set.\r
+\r
+ @return Return a non-zero value if the callee is the primary core.\r
+\r
+**/\r
+UINTN\r
+ArmPlatformIsPrimaryCore (\r
+ IN UINTN MpId\r
+ );\r
+\r
+/**\r
+ Return the MpId of the primary core\r
+\r
+ This function returns the MpId of the primary core.\r
+ This function might be called from assembler before any stack is set.\r
+\r
+ @return Return the MpId of the primary core\r
+\r
+**/\r
+UINTN\r
+ArmPlatformGetPrimaryCoreMpId (\r
+ VOID\r
+ );\r
+\r
/**\r
Return the current Boot Mode\r
\r
);\r
\r
/**\r
- Initialize controllers that must setup in the normal world\r
+ First platform specific function to be called in the PEI phase\r
\r
- This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei\r
- in the PEI phase.\r
+ This function is actually the first function called by the PrePi\r
+ or PrePeiCore modules. It allows to retrieve arguments passed to\r
+ the UEFI firmware through the CPU registers.\r
+\r
+ This function might be written into assembler as no stack are set\r
+ when the function is invoked.\r
\r
**/\r
-RETURN_STATUS\r
-ArmPlatformInitialize (\r
- IN UINTN MpId\r
+VOID\r
+ArmPlatformPeiBootAction (\r
+ VOID\r
);\r
\r
/**\r
- Initialize the system (or sometimes called permanent) memory\r
+ Initialize controllers that must setup in the normal world\r
\r
- This memory is generally represented by the DRAM.\r
+ This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei\r
+ in the PEI phase.\r
\r
**/\r
-VOID\r
-ArmPlatformInitializeSystemMemory (\r
- VOID\r
+RETURN_STATUS\r
+ArmPlatformInitialize (\r
+ IN UINTN MpId\r
);\r
\r
/**\r
OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap\r
);\r
\r
-/**\r
- Return the EFI Memory Map of your platform\r
-\r
- This EFI Memory Map of the System Memory is used by MemoryInitPei module to create the Resource\r
- Descriptor HOBs used by DXE core.\r
-\r
- @param[out] EfiMemoryMap Array of ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR describing an\r
- EFI Memory region. This array must be ended by a zero-filled entry\r
-\r
-**/\r
-EFI_STATUS\r
-ArmPlatformGetAdditionalSystemMemory (\r
- OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap\r
- );\r
-\r
/**\r
Return the Platform specific PPIs\r
\r