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