]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | BDS library definition, include the file and data structure\r | |
3 | \r | |
4 | Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r | |
5 | All rights reserved. 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 | #ifndef _INTERNAL_BDS_LIB_H_\r | |
16 | #define _INTERNAL_BDS_LIB_H_\r | |
17 | \r | |
18 | #include <FrameworkDxe.h>\r | |
19 | \r | |
20 | #include <IndustryStandard/Pci.h>\r | |
21 | #include <IndustryStandard/PeImage.h>\r | |
22 | \r | |
23 | #include <Protocol/BlockIo.h>\r | |
24 | #include <Protocol/LoadedImage.h>\r | |
25 | #include <Protocol/Cpu.h>\r | |
26 | #include <Protocol/SimpleFileSystem.h>\r | |
27 | #include <Protocol/DebugPort.h>\r | |
28 | #include <Protocol/DevicePath.h>\r | |
29 | #include <Protocol/SimpleTextIn.h>\r | |
30 | #include <Protocol/LegacyBios.h>\r | |
31 | #include <Protocol/SimpleTextOut.h>\r | |
32 | #include <Protocol/SimpleNetwork.h>\r | |
33 | #include <Protocol/DevicePathToText.h>\r | |
34 | #include <Protocol/FirmwareVolume2.h>\r | |
35 | #include <Protocol/PciIo.h>\r | |
36 | #include <Protocol/AcpiS3Save.h>\r | |
37 | #include <Protocol/OEMBadging.h>\r | |
38 | #include <Protocol/GraphicsOutput.h>\r | |
39 | #include <Protocol/UgaDraw.h>\r | |
40 | #include <Protocol/HiiFont.h>\r | |
41 | #include <Protocol/HiiImage.h>\r | |
42 | \r | |
43 | #include <Guid/MemoryTypeInformation.h>\r | |
44 | #include <Guid/FileInfo.h>\r | |
45 | #include <Guid/GlobalVariable.h>\r | |
46 | #include <Guid/PcAnsi.h>\r | |
47 | #include <Guid/Performance.h>\r | |
48 | \r | |
49 | #include <Library/PrintLib.h>\r | |
50 | #include <Library/DebugLib.h>\r | |
51 | #include <Library/BaseMemoryLib.h>\r | |
52 | #include <Library/UefiBootServicesTableLib.h>\r | |
53 | #include <Library/UefiLib.h>\r | |
54 | #include <Library/MemoryAllocationLib.h>\r | |
55 | #include <Library/DxeServicesTableLib.h>\r | |
56 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
57 | #include <Library/HobLib.h>\r | |
58 | #include <Library/BaseLib.h>\r | |
59 | #include <Library/DevicePathLib.h>\r | |
60 | #include <Library/PerformanceLib.h>\r | |
61 | #include <Library/PcdLib.h>\r | |
62 | #include <Library/PeCoffGetEntryPointLib.h>\r | |
63 | #include <Library/GenericBdsLib.h>\r | |
64 | #include <Library/TimerLib.h>\r | |
65 | #include <Library/PcdLib.h>\r | |
66 | #include <Library/DxeServicesLib.h>\r | |
67 | \r | |
68 | #if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)\r | |
69 | #if defined (MDE_CPU_EBC)\r | |
70 | //\r | |
71 | // Uefi specification only defines the default boot file name for IA32, X64\r | |
72 | // and IPF processor, so need define boot file name for EBC architecture here.\r | |
73 | //\r | |
74 | #define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI"\r | |
75 | #else\r | |
76 | #error "Can not determine the default boot file name for unknown processor type!"\r | |
77 | #endif\r | |
78 | #endif\r | |
79 | \r | |
80 | /**\r | |
81 | \r | |
82 | Allocates a block of memory and writes performance data of booting into it.\r | |
83 | OS can processing these record.\r | |
84 | \r | |
85 | **/\r | |
86 | VOID\r | |
87 | WriteBootToOsPerformanceData (\r | |
88 | VOID\r | |
89 | );\r | |
90 | \r | |
91 | /**\r | |
92 | Get the headers (dos, image, optional header) from an image\r | |
93 | \r | |
94 | @param Device SimpleFileSystem device handle\r | |
95 | @param FileName File name for the image\r | |
96 | @param DosHeader Pointer to dos header\r | |
97 | @param Hdr The buffer in which to return the PE32, PE32+, or TE header.\r | |
98 | \r | |
99 | @retval EFI_SUCCESS Successfully get the machine type.\r | |
100 | @retval EFI_NOT_FOUND The file is not found.\r | |
101 | @retval EFI_LOAD_ERROR File is not a valid image file.\r | |
102 | \r | |
103 | **/\r | |
104 | EFI_STATUS\r | |
105 | EFIAPI\r | |
106 | BdsLibGetImageHeader (\r | |
107 | IN EFI_HANDLE Device,\r | |
108 | IN CHAR16 *FileName,\r | |
109 | OUT EFI_IMAGE_DOS_HEADER *DosHeader,\r | |
110 | OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr\r | |
111 | );\r | |
112 | \r | |
113 | #endif // _BDS_LIB_H_\r |