]> git.proxmox.com Git - mirror_edk2.git/blob - Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.h
Nt32Pkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Nt32Pkg / Library / PlatformBootManagerLib / PlatformBootManager.h
1 /**@file
2 Head file for BDS Platform specific code
3
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef _PLATFORM_BOOT_MANAGER_H
9 #define _PLATFORM_BOOT_MANAGER_H
10
11 #include <PiDxe.h>
12 #include <Guid/WinNtSystemConfig.h>
13 #include <Protocol/GenericMemoryTest.h>
14 #include <Protocol/WinNtThunk.h>
15 #include <Protocol/WinNtIo.h>
16 #include <Protocol/LoadedImage.h>
17 #include <Protocol/FirmwareVolume2.h>
18
19 #include <Library/DebugLib.h>
20 #include <Library/BaseMemoryLib.h>
21 #include <Library/UefiBootServicesTableLib.h>
22 #include <Library/UefiRuntimeServicesTableLib.h>
23 #include <Library/MemoryAllocationLib.h>
24 #include <Library/BaseLib.h>
25 #include <Library/UefiRuntimeServicesTableLib.h>
26 #include <Library/UefiLib.h>
27 #include <Library/UefiBootManagerLib.h>
28 #include <Library/PcdLib.h>
29 #include <Library/DevicePathLib.h>
30 #include <Library/HiiLib.h>
31 #include <Library/PrintLib.h>
32 #include <Library/DxeServicesLib.h>
33 #include <Library/BootLogoLib.h>
34
35
36 typedef struct {
37 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
38 UINTN ConnectType;
39 } PLATFORM_CONSOLE_CONNECT_ENTRY;
40
41 extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];
42
43 #define gEndEntire \
44 { \
45 END_DEVICE_PATH_TYPE,\
46 END_ENTIRE_DEVICE_PATH_SUBTYPE,\
47 END_DEVICE_PATH_LENGTH,\
48 0\
49 }
50
51 #define CONSOLE_OUT BIT0
52 #define CONSOLE_IN BIT1
53 #define STD_ERROR BIT2
54
55 typedef struct {
56 VENDOR_DEVICE_PATH VendorDevicePath;
57 UINT32 Instance;
58 } WIN_NT_VENDOR_DEVICE_PATH_NODE;
59
60 //
61 // Below is the platform console device path
62 //
63 typedef struct {
64 VENDOR_DEVICE_PATH NtBus;
65 WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;
66 UART_DEVICE_PATH Uart;
67 VENDOR_DEVICE_PATH TerminalType;
68 EFI_DEVICE_PATH_PROTOCOL End;
69 } NT_ISA_SERIAL_DEVICE_PATH;
70
71 typedef struct {
72 VENDOR_DEVICE_PATH NtBus;
73 WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;
74 EFI_DEVICE_PATH_PROTOCOL End;
75 } NT_PLATFORM_GOP_DEVICE_PATH;
76
77 /**
78 Use SystemTable Conout to stop video based Simple Text Out consoles from going
79 to the video device. Put up LogoFile on every video device that is a console.
80
81 @param[in] LogoFile File name of logo to display on the center of the screen.
82
83 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
84 @retval EFI_UNSUPPORTED Logo not found
85
86 **/
87 EFI_STATUS
88 PlatformBootManagerEnableQuietBoot (
89 IN EFI_GUID *LogoFile
90 );
91
92 /**
93 Use SystemTable Conout to turn on video based Simple Text Out consoles. The
94 Simple Text Out screens will now be synced up with all non video output devices
95
96 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
97
98 **/
99 EFI_STATUS
100 PlatformBootManagerDisableQuietBoot (
101 VOID
102 );
103
104 /**
105 Perform the memory test base on the memory test intensive level,
106 and update the memory resource.
107
108 @param Level The memory test intensive level.
109
110 @retval EFI_STATUS Success test all the system memory and update
111 the memory resource
112
113 **/
114 EFI_STATUS
115 PlatformBootManagerMemoryTest (
116 IN EXTENDMEM_COVERAGE_LEVEL Level
117 );
118
119 /**
120
121 Show progress bar with title above it. It only works in Graphics mode.
122
123
124 @param TitleForeground Foreground color for Title.
125 @param TitleBackground Background color for Title.
126 @param Title Title above progress bar.
127 @param ProgressColor Progress bar color.
128 @param Progress Progress (0-100)
129 @param PreviousValue The previous value of the progress.
130
131 @retval EFI_STATUS Success update the progress bar
132
133 **/
134 EFI_STATUS
135 PlatformBootManagerShowProgress (
136 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,
137 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,
138 IN CHAR16 *Title,
139 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,
140 IN UINTN Progress,
141 IN UINTN PreviousValue
142 );
143
144 #endif // _PLATFORM_BOOT_MANAGER_H