]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecTempRamDone.c
IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Convert ASM to NASM
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / SecFspWrapperPlatformSecLibSample / SecTempRamDone.c
CommitLineData
cf1d4549
JY
1/** @file\r
2 Sample to provide SecTemporaryRamDone function.\r
3\r
4 Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php.\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiPei.h>\r
16\r
17#include <Ppi/TemporaryRamDone.h>\r
18\r
19#include <Library/BaseMemoryLib.h>\r
20#include <Library/DebugLib.h>\r
21#include <Library/PcdLib.h>\r
22#include <Library/DebugAgentLib.h>\r
23#include <Library/FspPlatformInfoLib.h>\r
24#include <Library/FspApiLib.h>\r
25\r
26/**\r
27This interface disables temporary memory in SEC Phase.\r
28**/\r
29VOID\r
30EFIAPI\r
31SecPlatformDisableTemporaryMemory (\r
32 VOID\r
33 )\r
34{\r
35 EFI_STATUS Status;\r
36 VOID *TempRamExitParam;\r
37 FSP_INFO_HEADER *FspHeader;\r
38\r
39 FspHeader = FspFindFspHeader (PcdGet32(PcdFspmBaseAddress));\r
40 if (FspHeader == NULL) {\r
41 return ;\r
42 }\r
43\r
44 DEBUG((DEBUG_INFO, "SecPlatformDisableTemporaryMemory enter\n"));\r
45\r
46 TempRamExitParam = GetTempRamExitParam ();\r
47 Status = CallTempRamExit (FspHeader, TempRamExitParam);\r
48 DEBUG((DEBUG_INFO, "TempRamExit status: 0x%x\n", Status));\r
49 ASSERT_EFI_ERROR(Status);\r
50\r
51 return ;\r
52}\r