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