]>
Commit | Line | Data |
---|---|---|
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 | |
cf1d4549 JY |
17 | #include <Library/DebugLib.h>\r |
18 | #include <Library/PcdLib.h>\r | |
f86b9293 LG |
19 | #include <Library/FspWrapperApiLib.h>\r |
20 | #include <Library/FspWrapperPlatformLib.h>\r | |
21 | #include <Guid/FspHeaderFile.h>\r | |
cf1d4549 JY |
22 | \r |
23 | /**\r | |
24 | This interface disables temporary memory in SEC Phase.\r | |
25 | **/\r | |
26 | VOID\r | |
27 | EFIAPI\r | |
28 | SecPlatformDisableTemporaryMemory (\r | |
29 | VOID\r | |
30 | )\r | |
31 | {\r | |
32 | EFI_STATUS Status;\r | |
33 | VOID *TempRamExitParam;\r | |
34 | FSP_INFO_HEADER *FspHeader;\r | |
35 | \r | |
36 | FspHeader = FspFindFspHeader (PcdGet32(PcdFspmBaseAddress));\r | |
37 | if (FspHeader == NULL) {\r | |
38 | return ;\r | |
39 | }\r | |
40 | \r | |
41 | DEBUG((DEBUG_INFO, "SecPlatformDisableTemporaryMemory enter\n"));\r | |
42 | \r | |
f86b9293 LG |
43 | TempRamExitParam = UpdateTempRamExitParam ();\r |
44 | Status = CallTempRamExit (TempRamExitParam);\r | |
cf1d4549 JY |
45 | DEBUG((DEBUG_INFO, "TempRamExit status: 0x%x\n", Status));\r |
46 | ASSERT_EFI_ERROR(Status);\r | |
47 | \r | |
48 | return ;\r | |
49 | }\r |