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