X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPlatformPkg%2FInclude%2FLibrary%2FArmPlatformLib.h;h=cd87743eba521fd097c04fd0ac49ce1691b9203b;hb=40b0b23ed34f48c26d711d3e4613a4bb35eeadff;hp=b58ddd5d3fa59307ecd8b6b5134d257cfc5d744d;hpb=bebda7ceec3d3024c76b3c2ed0c9b4e502a13d61;p=mirror_edk2.git diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index b58ddd5d3f..cd87743eba 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -1,15 +1,9 @@ /** @file -* -* Copyright (c) 2011-2013, 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. -* + + Copyright (c) 2011-2013, ARM Limited. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ #ifndef _ARMPLATFORMLIB_H_ @@ -20,26 +14,13 @@ // #include // -// The protocols, PPI and GUID defintions for this module +// The protocols, PPI and GUID definitions for this module // #include #include #include -/** - This structure is used to describe a region of the EFI memory map - - 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. - -**/ -typedef struct { - EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; - EFI_PHYSICAL_ADDRESS PhysicalStart; - UINT64 NumberOfBytes; -} ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR; - /** Return the core position from the value of its MpId register @@ -51,7 +32,7 @@ typedef struct { **/ UINTN ArmPlatformGetCorePosition ( - IN UINTN MpId + IN UINTN MpId ); /** @@ -66,7 +47,21 @@ ArmPlatformGetCorePosition ( **/ UINTN ArmPlatformIsPrimaryCore ( - IN UINTN MpId + 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 ); /** @@ -83,26 +78,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 ); /** @@ -117,7 +117,7 @@ ArmPlatformInitializeSystemMemory ( **/ VOID ArmPlatformGetVirtualMemoryMap ( - OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap + OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ); /**