\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
Copyright (c) 2016 HP Development Company, L.P.\r
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2021, 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
-\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
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
//\r
STATIC EFI_HANDLE mMmCpuHandle = NULL;\r
\r
+/** Returns the HOB data for the matching HOB GUID.\r
+\r
+ @param [in] HobList Pointer to the HOB list.\r
+ @param [in] HobGuid The GUID for the HOB.\r
+ @param [out] HobData Pointer to the HOB data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
+ @retval EFI_NOT_FOUND Could not find HOB with matching GUID.\r
+**/\r
EFI_STATUS\r
GetGuidedHobData (\r
IN VOID *HobList,\r
{\r
EFI_HOB_GUID_TYPE *Hob;\r
\r
- if (!HobList || !HobGuid || !HobData)\r
+ if ((HobList == NULL) || (HobGuid == NULL) || (HobData == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
+ }\r
\r
Hob = GetNextGuidHob (HobGuid, HobList);\r
- if (!Hob)\r
+ if (Hob == NULL) {\r
return EFI_NOT_FOUND;\r
+ }\r
\r
*HobData = GET_GUID_HOB_DATA (Hob);\r
- if (!HobData)\r
+ if (*HobData == NULL) {\r
return EFI_NOT_FOUND;\r
+ }\r
\r
return EFI_SUCCESS;\r
}\r
\r
+/** Entry point for the Standalone MM CPU driver.\r
+\r
+ @param [in] ImageHandle Unused. Not actual image handle.\r
+ @param [in] SystemTable Pointer to MM System table.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+ @retval EFI_NOT_FOUND Failed to find the HOB for the CPU\r
+ driver endpoint descriptor.\r
+**/\r
EFI_STATUS\r
StandaloneMmCpuInitialize (\r
- IN EFI_HANDLE ImageHandle, // not actual imagehandle\r
+ IN EFI_HANDLE ImageHandle, // not actual imagehandle\r
IN EFI_MM_SYSTEM_TABLE *SystemTable // not actual systemtable\r
)\r
{\r