]>
Commit | Line | Data |
---|---|---|
804405e7 | 1 | /*++\r |
2 | \r | |
f9b8ab56 HT |
3 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
804405e7 | 5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | UnixStuff.c\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Tiano PEIM to abstract construction of firmware volume in a Unix environment.\r | |
19 | \r | |
20 | Revision History\r | |
21 | \r | |
22 | --*/\r | |
23 | \r | |
24 | #include "PiPei.h"\r | |
25 | #include <Ppi/UnixThunk.h>\r | |
26 | #include <Library/DebugLib.h>\r | |
27 | #include <Library/PeimEntryPoint.h>\r | |
28 | #include <Library/HobLib.h>\r | |
29 | #include <Library/PeiServicesLib.h>\r | |
30 | #include <Library/PeiServicesTablePointerLib.h>\r | |
31 | \r | |
32 | EFI_STATUS\r | |
33 | EFIAPI\r | |
34 | PeimInitializeUnixStuff (\r | |
f053287d | 35 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
36 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
804405e7 | 37 | )\r |
38 | /*++\r | |
39 | \r | |
40 | Routine Description:\r | |
41 | \r | |
42 | Perform a call-back into the SEC simulator to get Unix Stuff\r | |
43 | \r | |
44 | Arguments:\r | |
45 | \r | |
46 | PeiServices - General purpose services available to every PEIM.\r | |
47 | \r | |
48 | Returns:\r | |
49 | \r | |
50 | None\r | |
51 | \r | |
52 | --*/\r | |
53 | // TODO: FfsHeader - add argument and description to function comment\r | |
54 | {\r | |
55 | EFI_STATUS Status;\r | |
56 | EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r | |
57 | PEI_UNIX_THUNK_PPI *PeiUnixService;\r | |
58 | VOID *Ptr;\r | |
59 | \r | |
60 | DEBUG ((EFI_D_ERROR, "Unix Stuff PEIM Loaded\n"));\r | |
61 | \r | |
62 | Status = (**PeiServices).LocatePpi (\r | |
63 | PeiServices,\r | |
64 | &gPeiUnixThunkPpiGuid, // GUID\r | |
65 | 0, // INSTANCE\r | |
66 | &PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR\r | |
67 | (VOID **)&PeiUnixService // PPI\r | |
68 | );\r | |
69 | ASSERT_EFI_ERROR (Status);\r | |
70 | \r | |
71 | Ptr = PeiUnixService->UnixThunk ();\r | |
72 | \r | |
73 | BuildGuidDataHob (\r | |
74 | &gEfiUnixThunkProtocolGuid, // Guid\r | |
75 | &Ptr, // Buffer\r | |
76 | sizeof (VOID *) // Sizeof Buffer\r | |
77 | );\r | |
78 | return Status;\r | |
79 | }\r |