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