]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecPlatformInformation.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / SecFspWrapperPlatformSecLibSample / SecPlatformInformation.c
index b879080dfac2bd57390e184d2656c2ec3a8a58ab..1406d0f2acf61b29fda3fd6d2520dccb7b7ce1e3 100644 (file)
@@ -2,13 +2,7 @@
   Sample to provide SecPlatformInformation function.\r
 \r
   Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\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
@@ -34,9 +28,9 @@
 EFI_STATUS\r
 EFIAPI\r
 SecPlatformInformation (\r
-  IN CONST EFI_PEI_SERVICES                     **PeiServices,\r
-  IN OUT   UINT64                               *StructureSize,\r
-     OUT   EFI_SEC_PLATFORM_INFORMATION_RECORD  *PlatformInformationRecord\r
+  IN CONST EFI_PEI_SERVICES                  **PeiServices,\r
+  IN OUT   UINT64                            *StructureSize,\r
+  OUT   EFI_SEC_PLATFORM_INFORMATION_RECORD  *PlatformInformationRecord\r
   )\r
 {\r
   UINT32      *Bist;\r
@@ -53,7 +47,7 @@ SecPlatformInformation (
                              &gTopOfTemporaryRamPpiGuid,\r
                              0,\r
                              NULL,\r
-                             (VOID **) &TopOfTemporaryRamPpi\r
+                             (VOID **)&TopOfTemporaryRamPpi\r
                              );\r
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
@@ -65,18 +59,18 @@ SecPlatformInformation (
   // This routine copies the BIST information to the buffer pointed by\r
   // PlatformInformationRecord for output.\r
   //\r
-  TopOfTemporaryRam = (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof (UINT32);\r
-  TopOfTemporaryRam -= sizeof(UINT32) * 2;\r
-  Count             = *((UINT32 *)(UINTN) (TopOfTemporaryRam - sizeof (UINT32)));\r
-  Size              = Count * sizeof (IA32_HANDOFF_STATUS);\r
+  TopOfTemporaryRam  = (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof (UINT32);\r
+  TopOfTemporaryRam -= sizeof (UINT32) * 2;\r
+  Count              = *((UINT32 *)(UINTN)(TopOfTemporaryRam - sizeof (UINT32)));\r
+  Size               = Count * sizeof (IA32_HANDOFF_STATUS);\r
 \r
-  if ((*StructureSize) < (UINT64) Size) {\r
+  if ((*StructureSize) < (UINT64)Size) {\r
     *StructureSize = Size;\r
     return EFI_BUFFER_TOO_SMALL;\r
   }\r
 \r
-  *StructureSize  = Size;\r
-  Bist            = (UINT32 *) (TopOfTemporaryRam - sizeof (UINT32) - Size);\r
+  *StructureSize = Size;\r
+  Bist           = (UINT32 *)(TopOfTemporaryRam - sizeof (UINT32) - Size);\r
 \r
   CopyMem (PlatformInformationRecord, Bist, Size);\r
 \r