]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/GenericBdsLib/InternalBdsLib.h
Clean up GenericBdsLib library Instance.
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / InternalBdsLib.h
CommitLineData
897f0eee 1/** @file\r
2 BDS library definition, include the file and data structure\r
3\r
4Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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 <PiDxe.h>\r
19\r
20#include <IndustryStandard/Pci22.h>\r
21\r
22#include <Protocol/BlockIo.h>\r
23#include <Protocol/LoadedImage.h>\r
24#include <Protocol/Cpu.h>\r
25#include <Protocol/SimpleFileSystem.h>\r
26#include <Protocol/DebugPort.h>\r
27#include <Protocol/DevicePath.h>\r
28#include <Protocol/SimpleTextIn.h>\r
29#include <Protocol/LegacyBios.h>\r
30#include <Protocol/SimpleTextOut.h>\r
31#include <Protocol/SimpleNetwork.h>\r
32#include <Protocol/DevicePathToText.h>\r
33#include <Protocol/FirmwareVolume2.h>\r
34#include <Protocol/PciIo.h>\r
35#include <Protocol/AcpiS3Save.h>\r
36#include <Protocol/Performance.h>\r
37#include <Protocol/FirmwareVolumeDispatch.h>\r
38\r
39#include <Guid/MemoryTypeInformation.h>\r
40#include <Guid/FileInfo.h>\r
41#include <Guid/GlobalVariable.h>\r
42#include <Guid/PcAnsi.h>\r
43#include <Guid/ShellFile.h>\r
44#include <Guid/HobList.h>\r
45#include <Guid/GenericPlatformVariable.h>\r
46\r
47#include <Library/PrintLib.h>\r
48#include <Library/DebugLib.h>\r
49#include <Library/BaseMemoryLib.h>\r
50#include <Library/UefiBootServicesTableLib.h>\r
51#include <Library/UefiLib.h>\r
52#include <Library/MemoryAllocationLib.h>\r
53#include <Library/DxeServicesTableLib.h>\r
54#include <Library/UefiRuntimeServicesTableLib.h>\r
55#include <Library/HobLib.h>\r
56#include <Library/BaseLib.h>\r
57#include <Library/DevicePathLib.h>\r
58#include <Library/PerformanceLib.h>\r
59#include <Library/PcdLib.h>\r
60#include <Library/IfrSupportLib.h>\r
61#include <Library/PeCoffGetEntryPointLib.h>\r
62#include <Library/GenericBdsLib.h>\r
63#include <Library/TimerLib.h>\r
64\r
65#include "BmMachine.h"\r
66\r
67#define PERFORMANCE_SIGNATURE EFI_SIGNATURE_32 ('P', 'e', 'r', 'f')\r
68#define PERF_TOKEN_SIZE 28\r
69#define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)\r
70#define PERF_PEI_ENTRY_MAX_NUM 50\r
71\r
72typedef struct {\r
73 CHAR8 Token[PERF_TOKEN_SIZE];\r
74 UINT32 Duration;\r
75} PERF_DATA;\r
76\r
77typedef struct {\r
78 UINT64 BootToOs;\r
79 UINT64 S3Resume;\r
80 UINT32 S3EntryNum;\r
81 PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];\r
82 UINT64 CpuFreq;\r
83 UINT64 BDSRaw;\r
84 UINT32 Count;\r
85 UINT32 Signiture;\r
86} PERF_HEADER;\r
87\r
11ef23f9 88/**\r
89\r
90 Allocates a block of memory and writes performance data of booting into it.\r
91 OS can processing these record.\r
92 \r
93**/\r
897f0eee 94VOID\r
95WriteBootToOsPerformanceData (\r
96 VOID\r
97 );\r
98\r
99#endif // _BDS_LIB_H_\r