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