]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/GenericBdsLib/InternalBdsLib.h
Remove over specific guid gEfiHobListGuid
[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
39 #include <Guid/MemoryTypeInformation.h>
40 #include <Guid/FileInfo.h>
41 #include <Guid/GlobalVariable.h>
42 #include <Guid/PcAnsi.h>
43 #include <Guid/ShellFile.h>
44 #include <Guid/GenericPlatformVariable.h>
45
46 #include <Library/PrintLib.h>
47 #include <Library/DebugLib.h>
48 #include <Library/BaseMemoryLib.h>
49 #include <Library/UefiBootServicesTableLib.h>
50 #include <Library/UefiLib.h>
51 #include <Library/MemoryAllocationLib.h>
52 #include <Library/DxeServicesTableLib.h>
53 #include <Library/UefiRuntimeServicesTableLib.h>
54 #include <Library/HobLib.h>
55 #include <Library/BaseLib.h>
56 #include <Library/DevicePathLib.h>
57 #include <Library/PerformanceLib.h>
58 #include <Library/PcdLib.h>
59 #include <Library/IfrSupportLib.h>
60 #include <Library/PeCoffGetEntryPointLib.h>
61 #include <Library/GenericBdsLib.h>
62 #include <Library/TimerLib.h>
63
64 #define PERFORMANCE_SIGNATURE EFI_SIGNATURE_32 ('P', 'e', 'r', 'f')
65 #define PERF_TOKEN_SIZE 28
66 #define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)
67 #define PERF_PEI_ENTRY_MAX_NUM 50
68
69 typedef struct {
70 CHAR8 Token[PERF_TOKEN_SIZE];
71 UINT32 Duration;
72 } PERF_DATA;
73
74 typedef struct {
75 UINT64 BootToOs;
76 UINT64 S3Resume;
77 UINT32 S3EntryNum;
78 PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];
79 UINT64 CpuFreq;
80 UINT64 BDSRaw;
81 UINT32 Count;
82 UINT32 Signiture;
83 } PERF_HEADER;
84
85 /**
86
87 Allocates a block of memory and writes performance data of booting into it.
88 OS can processing these record.
89
90 **/
91 VOID
92 WriteBootToOsPerformanceData (
93 VOID
94 );
95
96 #endif // _BDS_LIB_H_