X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPlatformPkg%2FInclude%2FLibrary%2FArmPlatformLib.h;h=3ad4c16066b6bcb36738d09924b0ce30a2cb63c4;hp=3f6c1517b0f836c15f3513734a1a0e2be55ead08;hb=f33d5d68abc02727dc828c1079e72ab65e1d63af;hpb=72647f190167a6f7830dc4cd8991aa6c1859d672 diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index 3f6c1517b0..3ad4c16066 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -1,14 +1,14 @@ /** @file * -* Copyright (c) 2011-2012, 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 +* Copyright (c) 2011-2013, ARM Limited. All rights reserved. * -* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* 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. * **/ @@ -24,28 +24,52 @@ // #include #include -#include #include /** - This structure is used to describe a region of the EFI memory map + Return the core position from the value of its MpId register - Every EFI regions of the system memory described by their physical start address and their size - can have different attributes. Some regions can be tested and other untested. + This function returns the core position from the position 0 in the processor. + This function might be called from assembler before any stack is set. -**/ -typedef struct { - EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; - EFI_PHYSICAL_ADDRESS PhysicalStart; - UINT64 NumberOfBytes; -} ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR; + @return Return the core position +**/ UINTN ArmPlatformGetCorePosition ( IN UINTN MpId ); +/** + Return a non-zero value if the callee is the primary core + + This function returns a non-zero value if the callee is the primary core. + The primary core is the core responsible to initialize the hardware and run UEFI. + This function might be called from assembler before any stack is set. + + @return Return a non-zero value if the callee is the primary core. + +**/ +UINTN +ArmPlatformIsPrimaryCore ( + IN UINTN MpId + ); + +/** + Return the MpId of the primary core + + This function returns the MpId of the primary core. + This function might be called from assembler before any stack is set. + + @return Return the MpId of the primary core + +**/ +UINTN +ArmPlatformGetPrimaryCoreMpId ( + VOID + ); + /** Return the current Boot Mode @@ -60,26 +84,31 @@ ArmPlatformGetBootMode ( ); /** - Initialize controllers that must setup in the normal world + First platform specific function to be called in the PEI phase - This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei - in the PEI phase. + This function is actually the first function called by the PrePi + or PrePeiCore modules. It allows to retrieve arguments passed to + the UEFI firmware through the CPU registers. + + This function might be written into assembler as no stack are set + when the function is invoked. **/ -RETURN_STATUS -ArmPlatformInitialize ( - IN UINTN MpId +VOID +ArmPlatformPeiBootAction ( + VOID ); /** - Initialize the system (or sometimes called permanent) memory + Initialize controllers that must setup in the normal world - This memory is generally represented by the DRAM. + This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei + in the PEI phase. **/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID +RETURN_STATUS +ArmPlatformInitialize ( + IN UINTN MpId ); /**