]> git.proxmox.com Git - mirror_edk2.git/blame - CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
CorebootPayloadPkg: Notify EndOfDxe and install ReadyToLock protocol.
[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
42a8f2ce
MM
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
c46bf81d 35#include <Protocol/SmmAccess2.h>\r
42a8f2ce
MM
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
576a07e4 48 { END_DEVICE_PATH_LENGTH, 0 },\\r
42a8f2ce
MM
49 }\r
50\r
51#define CONSOLE_OUT BIT0\r
52#define CONSOLE_IN BIT1\r
53#define STD_ERROR BIT2\r
54\r
55typedef struct {\r
56 VENDOR_DEVICE_PATH VendorDevicePath;\r
57 UINT32 Instance;\r
58} WIN_NT_VENDOR_DEVICE_PATH_NODE;\r
59\r
60//\r
61// Below is the platform console device path\r
62//\r
63typedef struct {\r
64 VENDOR_DEVICE_PATH NtBus;\r
65 WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;\r
66 UART_DEVICE_PATH Uart;\r
67 VENDOR_DEVICE_PATH TerminalType;\r
68 EFI_DEVICE_PATH_PROTOCOL End;\r
69} NT_ISA_SERIAL_DEVICE_PATH;\r
70\r
71typedef struct {\r
72 VENDOR_DEVICE_PATH NtBus;\r
73 WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;\r
74 EFI_DEVICE_PATH_PROTOCOL End;\r
75} NT_PLATFORM_GOP_DEVICE_PATH;\r
76\r
77/**\r
78 Use SystemTable Conout to stop video based Simple Text Out consoles from going\r
79 to the video device. Put up LogoFile on every video device that is a console.\r
80\r
81 @param[in] LogoFile File name of logo to display on the center of the screen.\r
82\r
83 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
84 @retval EFI_UNSUPPORTED Logo not found\r
85\r
86**/\r
87EFI_STATUS\r
88PlatformBootManagerEnableQuietBoot (\r
89 IN EFI_GUID *LogoFile\r
90);\r
91\r
92/**\r
93 Use SystemTable Conout to turn on video based Simple Text Out consoles. The\r
94 Simple Text Out screens will now be synced up with all non video output devices\r
95\r
96 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r
97\r
98**/\r
99EFI_STATUS\r
100PlatformBootManagerDisableQuietBoot (\r
101 VOID\r
102);\r
103\r
104/**\r
105 Show progress bar with title above it. It only works in Graphics mode.\r
106\r
107 @param TitleForeground Foreground color for Title.\r
108 @param TitleBackground Background color for Title.\r
109 @param Title Title above progress bar.\r
110 @param ProgressColor Progress bar color.\r
111 @param Progress Progress (0-100)\r
112 @param PreviousValue The previous value of the progress.\r
113\r
114 @retval EFI_STATUS Success update the progress bar\r
115\r
116**/\r
117EFI_STATUS\r
118PlatformBootManagerShowProgress (\r
119 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,\r
120 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,\r
121 IN CHAR16 *Title,\r
122 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,\r
123 IN UINTN Progress,\r
124 IN UINTN PreviousValue\r
125);\r
126\r
127#endif // _PLATFORM_BOOT_MANAGER_H\r