]>
Commit | Line | Data |
---|---|---|
123e9f62 RN |
1 | /**@file\r |
2 | Head file for BDS Platform specific code\r | |
3 | \r | |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT 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 | |
703da8b4 | 18 | #include <IndustryStandard/Bmp.h>\r |
123e9f62 | 19 | #include <Guid/WinNtSystemConfig.h>\r |
8f227c2f | 20 | #include <Protocol/GenericMemoryTest.h>\r |
123e9f62 RN |
21 | #include <Protocol/WinNtThunk.h>\r |
22 | #include <Protocol/WinNtIo.h>\r | |
23 | #include <Protocol/LoadedImage.h>\r | |
703da8b4 RN |
24 | #include <Protocol/UgaDraw.h>\r |
25 | #include <Protocol/GraphicsOutput.h>\r | |
26 | #include <Protocol/OEMBadging.h>\r | |
27 | #include <Protocol/BootLogo.h>\r | |
123e9f62 RN |
28 | \r |
29 | #include <Library/DebugLib.h>\r | |
30 | #include <Library/BaseMemoryLib.h>\r | |
31 | #include <Library/UefiBootServicesTableLib.h>\r | |
32 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
33 | #include <Library/MemoryAllocationLib.h>\r | |
34 | #include <Library/BaseLib.h>\r | |
35 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
36 | #include <Library/UefiLib.h>\r | |
37 | #include <Library/UefiBootManagerLib.h>\r | |
38 | #include <Library/PcdLib.h>\r | |
39 | #include <Library/DevicePathLib.h>\r | |
703da8b4 RN |
40 | #include <Library/HiiLib.h>\r |
41 | #include <Library/PrintLib.h>\r | |
42 | #include <Library/DxeServicesLib.h>\r | |
123e9f62 RN |
43 | \r |
44 | \r | |
45 | typedef struct {\r | |
46 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
47 | UINTN ConnectType;\r | |
48 | } PLATFORM_CONSOLE_CONNECT_ENTRY;\r | |
49 | \r | |
50 | extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];\r | |
51 | \r | |
52 | #define gEndEntire \\r | |
53 | { \\r | |
54 | END_DEVICE_PATH_TYPE,\\r | |
55 | END_ENTIRE_DEVICE_PATH_SUBTYPE,\\r | |
56 | END_DEVICE_PATH_LENGTH,\\r | |
57 | 0\\r | |
58 | }\r | |
59 | \r | |
60 | #define CONSOLE_OUT BIT0\r | |
61 | #define CONSOLE_IN BIT1\r | |
62 | #define STD_ERROR BIT2\r | |
63 | \r | |
64 | typedef struct {\r | |
65 | VENDOR_DEVICE_PATH VendorDevicePath;\r | |
66 | UINT32 Instance;\r | |
67 | } WIN_NT_VENDOR_DEVICE_PATH_NODE;\r | |
68 | \r | |
69 | //\r | |
70 | // Below is the platform console device path\r | |
71 | //\r | |
72 | typedef struct {\r | |
73 | VENDOR_DEVICE_PATH NtBus;\r | |
74 | WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;\r | |
75 | UART_DEVICE_PATH Uart;\r | |
76 | VENDOR_DEVICE_PATH TerminalType;\r | |
77 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
78 | } NT_ISA_SERIAL_DEVICE_PATH;\r | |
79 | \r | |
80 | typedef struct {\r | |
81 | VENDOR_DEVICE_PATH NtBus;\r | |
82 | WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;\r | |
83 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
84 | } NT_PLATFORM_GOP_DEVICE_PATH;\r | |
85 | \r | |
703da8b4 RN |
86 | /**\r |
87 | Use SystemTable Conout to stop video based Simple Text Out consoles from going\r | |
88 | to the video device. Put up LogoFile on every video device that is a console.\r | |
89 | \r | |
90 | @param[in] LogoFile File name of logo to display on the center of the screen.\r | |
91 | \r | |
92 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r | |
93 | @retval EFI_UNSUPPORTED Logo not found\r | |
94 | \r | |
95 | **/\r | |
96 | EFI_STATUS\r | |
97 | PlatformBootManagerEnableQuietBoot (\r | |
98 | IN EFI_GUID *LogoFile\r | |
99 | );\r | |
100 | \r | |
101 | /**\r | |
102 | Use SystemTable Conout to turn on video based Simple Text Out consoles. The \r | |
103 | Simple Text Out screens will now be synced up with all non video output devices\r | |
104 | \r | |
105 | @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r | |
106 | \r | |
107 | **/\r | |
108 | EFI_STATUS\r | |
109 | PlatformBootManagerDisableQuietBoot (\r | |
110 | VOID\r | |
111 | );\r | |
112 | \r | |
113 | /**\r | |
114 | Perform the memory test base on the memory test intensive level,\r | |
115 | and update the memory resource.\r | |
116 | \r | |
117 | @param Level The memory test intensive level.\r | |
118 | \r | |
119 | @retval EFI_STATUS Success test all the system memory and update\r | |
120 | the memory resource\r | |
121 | \r | |
122 | **/\r | |
123 | EFI_STATUS\r | |
124 | PlatformBootManagerMemoryTest (\r | |
125 | IN EXTENDMEM_COVERAGE_LEVEL Level\r | |
126 | );\r | |
127 | \r | |
128 | /**\r | |
129 | \r | |
130 | Show progress bar with title above it. It only works in Graphics mode.\r | |
131 | \r | |
132 | \r | |
133 | @param TitleForeground Foreground color for Title.\r | |
134 | @param TitleBackground Background color for Title.\r | |
135 | @param Title Title above progress bar.\r | |
136 | @param ProgressColor Progress bar color.\r | |
137 | @param Progress Progress (0-100)\r | |
138 | @param PreviousValue The previous value of the progress.\r | |
139 | \r | |
140 | @retval EFI_STATUS Success update the progress bar\r | |
141 | \r | |
142 | **/\r | |
143 | EFI_STATUS\r | |
144 | PlatformBootManagerShowProgress (\r | |
145 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,\r | |
146 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,\r | |
147 | IN CHAR16 *Title,\r | |
148 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,\r | |
149 | IN UINTN Progress,\r | |
150 | IN UINTN PreviousValue\r | |
151 | );\r | |
152 | \r | |
123e9f62 | 153 | #endif // _PLATFORM_BOOT_MANAGER_H\r |