]> git.proxmox.com Git - mirror_edk2.git/blame - CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
CorebootPayloadPkg: Add coreboot PlatfromBootManagerLib implementation
[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
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12**/\r
13\r
14#ifndef _PLATFORM_BOOT_MANAGER_H\r
15#define _PLATFORM_BOOT_MANAGER_H\r
16\r
17#include <PiDxe.h>\r
18#include <Protocol/LoadedImage.h>\r
19\r
20#include <Library/DebugLib.h>\r
21#include <Library/BaseMemoryLib.h>\r
22#include <Library/UefiBootServicesTableLib.h>\r
23#include <Library/UefiRuntimeServicesTableLib.h>\r
24#include <Library/MemoryAllocationLib.h>\r
25#include <Library/BaseLib.h>\r
26#include <Library/UefiRuntimeServicesTableLib.h>\r
27#include <Library/UefiLib.h>\r
28#include <Library/UefiBootManagerLib.h>\r
29#include <Library/PcdLib.h>\r
30#include <Library/DevicePathLib.h>\r
31#include <Library/HiiLib.h>\r
32#include <Library/PrintLib.h>\r
33#include <Library/DxeServicesLib.h>\r
34#include <Library/BootLogoLib.h>\r
35\r
36\r
37typedef struct {\r
38 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
39 UINTN ConnectType;\r
40} PLATFORM_CONSOLE_CONNECT_ENTRY;\r
41\r
42extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];\r
43\r
44#define gEndEntire \\r
45 { \\r
46 END_DEVICE_PATH_TYPE,\\r
47 END_ENTIRE_DEVICE_PATH_SUBTYPE,\\r
48 END_DEVICE_PATH_LENGTH,\\r
49 0\\r
50 }\r
51\r
52#define CONSOLE_OUT BIT0\r
53#define CONSOLE_IN BIT1\r
54#define STD_ERROR BIT2\r
55\r
56typedef struct {\r
57 VENDOR_DEVICE_PATH VendorDevicePath;\r
58 UINT32 Instance;\r
59} WIN_NT_VENDOR_DEVICE_PATH_NODE;\r
60\r
61//\r
62// Below is the platform console device path\r
63//\r
64typedef struct {\r
65 VENDOR_DEVICE_PATH NtBus;\r
66 WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;\r
67 UART_DEVICE_PATH Uart;\r
68 VENDOR_DEVICE_PATH TerminalType;\r
69 EFI_DEVICE_PATH_PROTOCOL End;\r
70} NT_ISA_SERIAL_DEVICE_PATH;\r
71\r
72typedef struct {\r
73 VENDOR_DEVICE_PATH NtBus;\r
74 WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;\r
75 EFI_DEVICE_PATH_PROTOCOL End;\r
76} NT_PLATFORM_GOP_DEVICE_PATH;\r
77\r
78/**\r
79 Use SystemTable Conout to stop video based Simple Text Out consoles from going\r
80 to the video device. Put up LogoFile on every video device that is a console.\r
81\r
82 @param[in] LogoFile File name of logo to display on the center of the screen.\r
83\r
84 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
85 @retval EFI_UNSUPPORTED Logo not found\r
86\r
87**/\r
88EFI_STATUS\r
89PlatformBootManagerEnableQuietBoot (\r
90 IN EFI_GUID *LogoFile\r
91);\r
92\r
93/**\r
94 Use SystemTable Conout to turn on video based Simple Text Out consoles. The\r
95 Simple Text Out screens will now be synced up with all non video output devices\r
96\r
97 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r
98\r
99**/\r
100EFI_STATUS\r
101PlatformBootManagerDisableQuietBoot (\r
102 VOID\r
103);\r
104\r
105/**\r
106 Show progress bar with title above it. It only works in Graphics mode.\r
107\r
108 @param TitleForeground Foreground color for Title.\r
109 @param TitleBackground Background color for Title.\r
110 @param Title Title above progress bar.\r
111 @param ProgressColor Progress bar color.\r
112 @param Progress Progress (0-100)\r
113 @param PreviousValue The previous value of the progress.\r
114\r
115 @retval EFI_STATUS Success update the progress bar\r
116\r
117**/\r
118EFI_STATUS\r
119PlatformBootManagerShowProgress (\r
120 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,\r
121 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,\r
122 IN CHAR16 *Title,\r
123 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,\r
124 IN UINTN Progress,\r
125 IN UINTN PreviousValue\r
126);\r
127\r
128#endif // _PLATFORM_BOOT_MANAGER_H\r