]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
Add BootlogoOnly feature in BDS for BGRT
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / GenericBdsLib / InternalBdsLib.h
1 /** @file
2 BDS library definition, include the file and data structure
3
4 Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _INTERNAL_BDS_LIB_H_
16 #define _INTERNAL_BDS_LIB_H_
17
18 #include <FrameworkDxe.h>
19
20 #include <IndustryStandard/Pci.h>
21 #include <IndustryStandard/PeImage.h>
22
23 #include <Protocol/BlockIo.h>
24 #include <Protocol/LoadedImage.h>
25 #include <Protocol/Cpu.h>
26 #include <Protocol/SimpleFileSystem.h>
27 #include <Protocol/LoadFile.h>
28 #include <Protocol/DebugPort.h>
29 #include <Protocol/DevicePath.h>
30 #include <Protocol/SimpleTextIn.h>
31 #include <Protocol/LegacyBios.h>
32 #include <Protocol/SimpleTextOut.h>
33 #include <Protocol/SimpleNetwork.h>
34 #include <Protocol/DevicePathToText.h>
35 #include <Protocol/FirmwareVolume2.h>
36 #include <Protocol/PciIo.h>
37 #include <Protocol/AcpiS3Save.h>
38 #include <Protocol/OEMBadging.h>
39 #include <Protocol/GraphicsOutput.h>
40 #include <Protocol/UgaDraw.h>
41 #include <Protocol/HiiFont.h>
42 #include <Protocol/HiiImage.h>
43 #include <Protocol/UsbIo.h>
44 #include <Protocol/BootLogo.h>
45
46 #include <Guid/MemoryTypeInformation.h>
47 #include <Guid/FileInfo.h>
48 #include <Guid/GlobalVariable.h>
49 #include <Guid/PcAnsi.h>
50 #include <Guid/Performance.h>
51 #include <Guid/BdsLibHii.h>
52 #include <Guid/HdBootVariable.h>
53 #include <Guid/LastEnumLang.h>
54
55 #include <Library/PrintLib.h>
56 #include <Library/DebugLib.h>
57 #include <Library/BaseMemoryLib.h>
58 #include <Library/UefiBootServicesTableLib.h>
59 #include <Library/UefiLib.h>
60 #include <Library/MemoryAllocationLib.h>
61 #include <Library/DxeServicesTableLib.h>
62 #include <Library/UefiRuntimeServicesTableLib.h>
63 #include <Library/HobLib.h>
64 #include <Library/BaseLib.h>
65 #include <Library/DevicePathLib.h>
66 #include <Library/PerformanceLib.h>
67 #include <Library/PcdLib.h>
68 #include <Library/PeCoffGetEntryPointLib.h>
69 #include <Library/GenericBdsLib.h>
70 #include <Library/TimerLib.h>
71 #include <Library/PcdLib.h>
72 #include <Library/DxeServicesLib.h>
73 #include <Library/ReportStatusCodeLib.h>
74
75 #if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)
76 #if defined (MDE_CPU_EBC)
77 //
78 // Uefi specification only defines the default boot file name for IA32, X64
79 // and IPF processor, so need define boot file name for EBC architecture here.
80 //
81 #define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI"
82 #else
83 #error "Can not determine the default boot file name for unknown processor type!"
84 #endif
85 #endif
86
87 /**
88
89 Allocates a block of memory and writes performance data of booting into it.
90 OS can processing these record.
91
92 **/
93 VOID
94 WriteBootToOsPerformanceData (
95 VOID
96 );
97
98 /**
99 Get the headers (dos, image, optional header) from an image
100
101 @param Device SimpleFileSystem device handle
102 @param FileName File name for the image
103 @param DosHeader Pointer to dos header
104 @param Hdr The buffer in which to return the PE32, PE32+, or TE header.
105
106 @retval EFI_SUCCESS Successfully get the machine type.
107 @retval EFI_NOT_FOUND The file is not found.
108 @retval EFI_LOAD_ERROR File is not a valid image file.
109
110 **/
111 EFI_STATUS
112 EFIAPI
113 BdsLibGetImageHeader (
114 IN EFI_HANDLE Device,
115 IN CHAR16 *FileName,
116 OUT EFI_IMAGE_DOS_HEADER *DosHeader,
117 OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr
118 );
119
120 /**
121 This routine adjust the memory information for different memory type and
122 save them into the variables for next boot.
123 **/
124 VOID
125 BdsSetMemoryTypeInformationVariable (
126 VOID
127 );
128
129 #endif // _BDS_LIB_H_