]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/GenericBdsLib/InternalBdsLib.h
UEFI HII: Merge UEFI HII support changes from branch.
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / InternalBdsLib.h
1 /** @file
2
3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 InternalBdsLib.h
15
16 Abstract:
17
18 BDS library definition, include the file and data structure
19
20
21 **/
22
23 #ifndef _INTERNAL_BDS_LIB_H_
24 #define _INTERNAL_BDS_LIB_H_
25
26 #include <PiDxe.h>
27
28 #include <IndustryStandard/Pci22.h>
29
30 #include <Protocol/BlockIo.h>
31 #include <Protocol/LoadedImage.h>
32 #include <Protocol/Cpu.h>
33 #include <Protocol/SimpleFileSystem.h>
34 #include <Protocol/DebugPort.h>
35 #include <Protocol/DevicePath.h>
36 #include <Protocol/SimpleTextIn.h>
37 #include <Protocol/LegacyBios.h>
38 #include <Protocol/SimpleTextOut.h>
39 #include <Protocol/SimpleNetwork.h>
40 #include <Protocol/DevicePathToText.h>
41 #include <Protocol/FirmwareVolume2.h>
42 #include <Protocol/PciIo.h>
43 #include <Protocol/AcpiS3Save.h>
44 #include <Protocol/Performance.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/ShellFile.h>
51 #include <Guid/HobList.h>
52 #include <Guid/GenericPlatformVariable.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
72 #include "BmMachine.h"
73
74 #include "R8Lib.h"
75
76 #define PERFORMANCE_SIGNATURE EFI_SIGNATURE_32 ('P', 'e', 'r', 'f')
77 #define PERF_TOKEN_SIZE 28
78 #define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)
79 #define PERF_PEI_ENTRY_MAX_NUM 50
80
81 typedef struct {
82 CHAR8 Token[PERF_TOKEN_SIZE];
83 UINT32 Duration;
84 } PERF_DATA;
85
86 typedef struct {
87 UINT64 BootToOs;
88 UINT64 S3Resume;
89 UINT32 S3EntryNum;
90 PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];
91 UINT64 CpuFreq;
92 UINT64 BDSRaw;
93 UINT32 Count;
94 UINT32 Signiture;
95 } PERF_HEADER;
96
97 VOID
98 WriteBootToOsPerformanceData (
99 VOID
100 );
101
102 #endif // _BDS_LIB_H_