]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFspWrapperPkg/FspInitPei/SecFspInitDone.c
Update IntelFspPkg according to FSP1.1.
[mirror_edk2.git] / IntelFspWrapperPkg / FspInitPei / SecFspInitDone.c
... / ...
CommitLineData
1/** @file\r
2 Install FspInitDone PPI and GetFspHobList API.\r
3\r
4 Copyright (c) 2014, 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\r
16#include "SecMain.h"\r
17\r
18FSP_INIT_DONE_PPI gFspInitDonePpi = {\r
19 FspInitDoneGetFspHobList\r
20};\r
21\r
22/**\r
23 Return Hob list produced by FSP.\r
24\r
25 @param[in] PeiServices The pointer to the PEI Services Table.\r
26 @param[in] This The pointer to this instance of this PPI.\r
27 @param[out] FspHobList The pointer to Hob list produced by FSP.\r
28\r
29 @return EFI_SUCCESS FReturn Hob list produced by FSP successfully.\r
30**/\r
31EFI_STATUS\r
32EFIAPI\r
33FspInitDoneGetFspHobList (\r
34 IN CONST EFI_PEI_SERVICES **PeiServices,\r
35 IN FSP_INIT_DONE_PPI *This,\r
36 OUT VOID **FspHobList\r
37 )\r
38{\r
39 VOID *TopOfTemporaryRamPpi;\r
40 EFI_STATUS Status;\r
41\r
42 Status = (*PeiServices)->LocatePpi (\r
43 PeiServices,\r
44 &gTopOfTemporaryRamPpiGuid,\r
45 0,\r
46 NULL,\r
47 (VOID **) &TopOfTemporaryRamPpi\r
48 );\r
49 if (EFI_ERROR (Status)) {\r
50 return EFI_NOT_FOUND;\r
51 }\r
52\r
53 *FspHobList = (VOID *)(UINTN)(*(UINT32 *)((UINTN)TopOfTemporaryRamPpi - sizeof(UINT32)));\r
54\r
55 return EFI_SUCCESS;\r
56}\r
57\r