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