]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/GenericBdsLib/InternalBdsLib.h
Clean up to update the reference of the these macros:
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / InternalBdsLib.h
1 /** @file
2 BDS library definition, include the file and data structure
3
4 Copyright (c) 2004 - 2008, Intel Corporation. <BR>
5 All rights reserved. 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 <PiDxe.h>
19
20 #include <IndustryStandard/Pci22.h>
21
22 #include <Protocol/BlockIo.h>
23 #include <Protocol/LoadedImage.h>
24 #include <Protocol/Cpu.h>
25 #include <Protocol/SimpleFileSystem.h>
26 #include <Protocol/DebugPort.h>
27 #include <Protocol/DevicePath.h>
28 #include <Protocol/SimpleTextIn.h>
29 #include <Protocol/LegacyBios.h>
30 #include <Protocol/SimpleTextOut.h>
31 #include <Protocol/SimpleNetwork.h>
32 #include <Protocol/DevicePathToText.h>
33 #include <Protocol/FirmwareVolume2.h>
34 #include <Protocol/PciIo.h>
35 #include <Protocol/AcpiS3Save.h>
36 #include <Protocol/Performance.h>
37 #include <Protocol/FirmwareVolumeDispatch.h>
38 #include <Protocol/OEMBadging.h>
39 #include <Protocol/ConsoleControl.h>
40 #include <Protocol/GraphicsOutput.h>
41 #include <Protocol/UgaDraw.h>
42 #include <Protocol/HiiFont.h>
43 #include <Protocol/HiiImage.h>
44
45
46 #include <Guid/MemoryTypeInformation.h>
47 #include <Guid/FileInfo.h>
48 #include <Guid/GlobalVariable.h>
49 #include <Guid/PcAnsi.h>
50 #include <Guid/ShellFile.h>
51 #include <Guid/GenericPlatformVariable.h>
52 #include <Guid/Bmp.h>
53
54 #include <Library/PrintLib.h>
55 #include <Library/DebugLib.h>
56 #include <Library/BaseMemoryLib.h>
57 #include <Library/UefiBootServicesTableLib.h>
58 #include <Library/UefiLib.h>
59 #include <Library/MemoryAllocationLib.h>
60 #include <Library/DxeServicesTableLib.h>
61 #include <Library/UefiRuntimeServicesTableLib.h>
62 #include <Library/HobLib.h>
63 #include <Library/BaseLib.h>
64 #include <Library/DevicePathLib.h>
65 #include <Library/PerformanceLib.h>
66 #include <Library/PcdLib.h>
67 #include <Library/IfrSupportLib.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
74 #define PERFORMANCE_SIGNATURE SIGNATURE_32 ('P', 'e', 'r', 'f')
75 #define PERF_TOKEN_SIZE 28
76 #define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)
77 #define PERF_PEI_ENTRY_MAX_NUM 50
78
79 typedef struct {
80 CHAR8 Token[PERF_TOKEN_SIZE];
81 UINT32 Duration;
82 } PERF_DATA;
83
84 typedef struct {
85 UINT64 BootToOs;
86 UINT64 S3Resume;
87 UINT32 S3EntryNum;
88 PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];
89 UINT64 CpuFreq;
90 UINT64 BDSRaw;
91 UINT32 Count;
92 UINT32 Signiture;
93 } PERF_HEADER;
94
95 /**
96
97 Allocates a block of memory and writes performance data of booting into it.
98 OS can processing these record.
99
100 **/
101 VOID
102 WriteBootToOsPerformanceData (
103 VOID
104 );
105
106 #endif // _BDS_LIB_H_