X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPlatformPkg%2FInclude%2FLibrary%2FArmPlatformLib.h;h=c74d53506feeba06f4a176c126c8e3a8525f23ac;hp=3f6c1517b0f836c15f3513734a1a0e2be55ead08;hb=d4708314621458e6b4abb58f1629b0f753b17b66;hpb=72647f190167a6f7830dc4cd8991aa6c1859d672 diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index 3f6c1517b0..c74d53506f 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 @@ -59,6 +83,22 @@ ArmPlatformGetBootMode ( VOID ); +/** + First platform specific function to be called 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. + +**/ +VOID +ArmPlatformPeiBootAction ( + VOID + ); + /** Initialize controllers that must setup in the normal world