Print this page
NEX-16819 loader UEFI support
Includes work by Toomas Soome <tsoome@me.com>
Upstream commits:
loader: pxe receive cleanup
9475 libefi: Do not return only if ReceiveFilter
installboot: should support efi system partition
8931 boot1.efi: scan all display modes rather than
loader: spinconsole updates
loader: gfx experiment to try GOP Blt() function.
sha1 build test
loader: add sha1 hash calculation
common/sha1: update for loader build
loader: biosdisk rework
uts: 32-bit kernel FB needs mapping in low memory
uts: add diag-device
uts: boot console mirror with diag-device
uts: enable very early console on ttya
kmdb: add diag-device as input/output device
uts: test VGA memory exclusion from mapping
uts: clear boot mapping and protect boot pages test
uts: add dboot map debug printf
uts: need to release FB pages in release_bootstrap()
uts: add screenmap ioctl
uts: update sys/queue.h
loader: add illumos uts/common to include path
loader: tem/gfx font cleanup
loader: vbe checks
uts: gfx_private set KD_TEXT when KD_RESETTEXT is
uts: gfx 8-bit update
loader: gfx 8-bit fix
loader: always set media size from partition.
uts: MB2 support for 32-bit kernel
loader: x86 should have tem 80x25
uts: x86 should have tem 80x25
uts: font update
loader: font update
uts: tem attributes
loader: tem.c comment added
uts: use font module
loader: add font module
loader: build rules for new font setup
uts: gfx_private update for new font structure
uts: early boot update for new font structure
uts: font update
uts: font build rules update for new fonts
uts: tem update to new font structure
loader: module.c needs to include tem_impl.h
uts: gfx_private 8x16 font rework
uts: make font_lookup public
loader: font rework
uts: font rework
9259 libefi: efi_alloc_and_read should check for PMBR
uts: tem utf-8 support
loader: implement tem utf-8 support
loader: tem should be able to display UTF-8
7784 uts: console input should support utf-8
7796 uts: ldterm default to utf-8
uts: do not reset serial console
uts: set up colors even if tem is not console
uts: add type for early boot properties
uts: gfx_private experiment with drm and vga
uts: gfx_private should use setmode drm callback.
uts: identify FB types and set up gfx_private based
loader: replace gop and vesa with framebuffer
uts: boot needs simple tem to support mdb
uts: boot_keyboard should emit esc sequences for
uts: gfx_private FB showuld be written by line
kmdb: set terminal window size
uts: gfx_private needs to keep track of early boot FB
pnglite: move pnglite to usr/src/common
loader: gfx_fb
ficl-sys: add gfx primitives
loader: add illumos.png logo
ficl: add fb-putimage
loader: add png support
loader: add alpha blending for gfx_fb
loader: use term-drawrect for menu frame
ficl: add simple gfx words
uts: provide fb_info via fbgattr dev_specific array.
uts: gfx_private add alpha blending
uts: update sys/ascii.h
uts: tem OSC support (incomplete)
uts: implement env module support and use data from
uts: tem get colors from early boot data
loader: use crc32 from libstand (libz)
loader: optimize for size
loader: pass tem info to the environment
loader: import tem for loader console
loader: UEFI loader needs to set ISADIR based on
loader: need UEFI32 support
8918 loader.efi: add vesa edid support
uts: tem_safe_pix_clear_prom_output() should only
uts: tem_safe_pix_clear_entire_screen() should use
uts: tem_safe_check_first_time() should query cursor
uts: tem implement cls callback & visual_io v4
uts: gfx_vgatext use block cursor for vgatext
uts: gfx_private implement cls callback & visual_io
uts: gfx_private bitmap framebuffer implementation
uts: early start frame buffer console support
uts: font functions should check the input char
uts: font rendering should support 16/24/32bit depths
uts: use smallest font as fallback default.
uts: update terminal dimensions based on selected
7834 uts: vgatext should use gfx_private
uts: add spacing property to 8859-1.bdf
terminfo: add underline for sun-color
terminfo: sun-color has 16 colors
uts: add font load callback type
loader: do not repeat int13 calls with error 0x20 and
8905 loader: add skein/edonr support
8904 common/crypto: make skein and edonr loader
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Revert "NEX-16819 loader UEFI support"
This reverts commit ec06b9fc617b99234e538bf2e7e4d02a24993e0c.
Reverting due to failures in the zfs-tests and the sharefs-tests
NEX-16819 loader UEFI support
Includes work by Toomas Soome <tsoome@me.com>
Upstream commits:
loader: pxe receive cleanup
9475 libefi: Do not return only if ReceiveFilter
installboot: should support efi system partition
8931 boot1.efi: scan all display modes rather than
loader: spinconsole updates
loader: gfx experiment to try GOP Blt() function.
sha1 build test
loader: add sha1 hash calculation
common/sha1: update for loader build
loader: biosdisk rework
uts: 32-bit kernel FB needs mapping in low memory
uts: add diag-device
uts: boot console mirror with diag-device
uts: enable very early console on ttya
kmdb: add diag-device as input/output device
uts: test VGA memory exclusion from mapping
uts: clear boot mapping and protect boot pages test
uts: add dboot map debug printf
uts: need to release FB pages in release_bootstrap()
uts: add screenmap ioctl
uts: update sys/queue.h
loader: add illumos uts/common to include path
loader: tem/gfx font cleanup
loader: vbe checks
uts: gfx_private set KD_TEXT when KD_RESETTEXT is
uts: gfx 8-bit update
loader: gfx 8-bit fix
loader: always set media size from partition.
uts: MB2 support for 32-bit kernel
loader: x86 should have tem 80x25
uts: x86 should have tem 80x25
uts: font update
loader: font update
uts: tem attributes
loader: tem.c comment added
uts: use font module
loader: add font module
loader: build rules for new font setup
uts: gfx_private update for new font structure
uts: early boot update for new font structure
uts: font update
uts: font build rules update for new fonts
uts: tem update to new font structure
loader: module.c needs to include tem_impl.h
uts: gfx_private 8x16 font rework
uts: make font_lookup public
loader: font rework
uts: font rework
libefi: efi_alloc_and_read should check for PMBR
uts: tem utf-8 support
loader: implement tem utf-8 support
loader: tem should be able to display UTF-8
7784 uts: console input should support utf-8
7796 uts: ldterm default to utf-8
uts: do not reset serial console
uts: set up colors even if tem is not console
uts: add type for early boot properties
uts: gfx_private experiment with drm and vga
uts: gfx_private should use setmode drm callback.
uts: identify FB types and set up gfx_private based
loader: replace gop and vesa with framebuffer
uts: boot needs simple tem to support mdb
uts: boot_keyboard should emit esc sequences for
uts: gfx_private FB showuld be written by line
kmdb: set terminal window size
uts: gfx_private needs to keep track of early boot FB
pnglite: move pnglite to usr/src/common
loader: gfx_fb
ficl-sys: add gfx primitives
loader: add illumos.png logo
ficl: add fb-putimage
loader: add png support
loader: add alpha blending for gfx_fb
loader: use term-drawrect for menu frame
ficl: add simple gfx words
uts: provide fb_info via fbgattr dev_specific array.
uts: gfx_private add alpha blending
uts: update sys/ascii.h
uts: tem OSC support (incomplete)
uts: implement env module support and use data from
uts: tem get colors from early boot data
loader: use crc32 from libstand (libz)
loader: optimize for size
loader: pass tem info to the environment
loader: import tem for loader console
loader: UEFI loader needs to set ISADIR based on
loader: need UEFI32 support
8918 loader.efi: add vesa edid support
uts: tem_safe_pix_clear_prom_output() should only
uts: tem_safe_pix_clear_entire_screen() should use
uts: tem_safe_check_first_time() should query cursor
uts: tem implement cls callback & visual_io v4
uts: gfx_vgatext use block cursor for vgatext
uts: gfx_private implement cls callback & visual_io
uts: gfx_private bitmap framebuffer implementation
uts: early start frame buffer console support
uts: font functions should check the input char
uts: font rendering should support 16/24/32bit depths
uts: use smallest font as fallback default.
uts: update terminal dimensions based on selected
7834 uts: vgatext should use gfx_private
uts: add spacing property to 8859-1.bdf
terminfo: add underline for sun-color
terminfo: sun-color has 16 colors
uts: add font load callback type
loader: do not repeat int13 calls with error 0x20 and
8905 loader: add skein/edonr support
8904 common/crypto: make skein and edonr loader
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/visual_io.h
+++ new/usr/src/uts/common/sys/visual_io.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
|
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 */
21 21
22 22 /*
23 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #ifndef _SYS_VISUAL_IO_H
28 28 #define _SYS_VISUAL_IO_H
29 29
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 30 #ifdef __cplusplus
33 31 extern "C" {
34 32 #endif
35 33
36 34 #define VIOC ('V' << 8)
37 35 #define VIOCF ('F' << 8)
38 36
39 37
40 38 /*
41 39 * Device Identification
42 40 *
43 41 * VIS_GETIDENTIFIER returns an identifier string to uniquely identify
44 42 * a device type used in the Solaris VISUAL environment. The identifier
45 43 * must be unique. We suggest the convention:
46 44 *
47 45 * <companysymbol><devicetype>
48 46 *
49 47 * for example: SUNWcg6
50 48 */
51 49
52 50 #define VIS_MAXNAMELEN 128
53 51
54 52 struct vis_identifier {
55 53 char name[VIS_MAXNAMELEN]; /* <companysymbol><devicename> */
56 54 };
57 55
58 56 #define VIS_GETIDENTIFIER (VIOC | 0)
59 57
60 58
61 59
62 60 /*
63 61 * Hardware Cursor Control
64 62 *
65 63 * Devices with hardware cursors may implement these ioctls in their
66 64 * kernel device drivers.
67 65 */
68 66
69 67
70 68 struct vis_cursorpos {
71 69 short x; /* cursor x coordinate */
72 70 short y; /* cursor y coordinate */
73 71 };
74 72
75 73 struct vis_cursorcmap {
76 74 int version; /* version */
77 75 int reserved;
78 76 unsigned char *red; /* red color map elements */
79 77 unsigned char *green; /* green color map elements */
80 78 unsigned char *blue; /* blue color map elements */
81 79 };
82 80
83 81
84 82 /*
85 83 * These ioctls fetch and set various cursor attributes, using the
86 84 * vis_cursor struct.
87 85 */
88 86
89 87 #define VIS_SETCURSOR (VIOCF|24)
90 88 #define VIS_GETCURSOR (VIOCF|25)
91 89
92 90 struct vis_cursor {
93 91 short set; /* what to set */
94 92 short enable; /* cursor on/off */
95 93 struct vis_cursorpos pos; /* cursor position */
96 94 struct vis_cursorpos hot; /* cursor hot spot */
97 95 struct vis_cursorcmap cmap; /* color map info */
98 96 struct vis_cursorpos size; /* cursor bit map size */
99 97 char *image; /* cursor image bits */
100 98 char *mask; /* cursor mask bits */
101 99 };
102 100
103 101 #define VIS_CURSOR_SETCURSOR 0x01 /* set cursor */
104 102 #define VIS_CURSOR_SETPOSITION 0x02 /* set cursor position */
105 103 #define VIS_CURSOR_SETHOTSPOT 0x04 /* set cursor hot spot */
106 104 #define VIS_CURSOR_SETCOLORMAP 0x08 /* set cursor colormap */
107 105 #define VIS_CURSOR_SETSHAPE 0x10 /* set cursor shape */
108 106
109 107 #define VIS_CURSOR_SETALL (VIS_CURSOR_SETCURSOR | \
110 108 VIS_CURSOR_SETPOSITION | \
111 109 VIS_CURSOR_SETHOTSPOT | \
112 110 VIS_CURSOR_SETCOLORMAP | \
113 111 VIS_CURSOR_SETSHAPE)
114 112
115 113
116 114 /*
117 115 * These ioctls fetch and move the current cursor position, using the
118 116 * vis_cursorposition struct.
119 117 */
120 118
121 119 #define VIS_MOVECURSOR (VIOCF|26)
122 120 #define VIS_GETCURSORPOS (VIOCF|27)
123 121
124 122 /*
125 123 * VIS_SETCMAP:
126 124 * VIS_GETCMAP:
127 125 * Set/Get the indicated color map entries. The index states the first
128 126 * color to be update and count specifies the number of entries to be
129 127 * updated from index. red, green, and blue are arrays of color
130 128 * values. The length of the arrays is count.
131 129 */
132 130 #define VIS_GETCMAP (VIOC|9)
|
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
133 131 #define VIS_PUTCMAP (VIOC|10)
134 132 struct vis_cmap {
135 133 int index; /* Index into colormap to start updating */
136 134 int count; /* Number of entries to update */
137 135 unsigned char *red; /* List of red values */
138 136 unsigned char *green; /* List of green values */
139 137 unsigned char *blue; /* List of blue values */
140 138 };
141 139
142 140
143 -#ifdef _KERNEL
141 +#if defined(_KERNEL) || defined(_BOOT)
144 142 /*
145 143 * The following ioctls are used for communication between the layered
146 144 * device and the framebuffer. The layered driver calls the framebuffer
147 145 * with these ioctls.
148 146 *
149 147 * On machines that don't have a prom, kmdb uses the kernel to display
150 148 * characters. The kernel in turn will use the routines returned by
151 149 * VIS_DEVINIT to ask the framebuffer driver to display the data. The
152 150 * framebuffer driver CANNOT use any DDI services to display this data. It
153 151 * must just dump the data to the framebuffer. In particular, the mutex and
154 152 * copy routines do not work.
155 153 *
156 154 * On machines without a prom, the framebuffer driver must implement all
157 155 * of these ioctls to be a console. On machines with a prom, the
158 156 * framebuffer driver can set vis_devinit.polledio to NULL.
159 157 */
|
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
160 158 typedef short screen_pos_t;
161 159 typedef short screen_size_t;
162 160
163 161 /*
164 162 * Union of pixel depths
165 163 */
166 164 typedef union {
167 165 unsigned char mono; /* one-bit */
168 166 unsigned char four; /* four bit */
169 167 unsigned char eight; /* eight bit */
168 + unsigned char sixteen[2]; /* 16 bit */
170 169 unsigned char twentyfour[3]; /* 24 bit */
171 170 } color_t;
172 171
173 172 /*
174 173 * VIS_DEVINIT:
175 174 * Initialize the framebuffer as a console device. The terminal emulator
176 175 * will provide the following structure to the device driver to be filled in.
177 176 * The driver is expected to fill it in.
178 177 *
179 178 * ioctl(fd, VIS_DEVINIT, struct vis_devinit *)
180 179 */
181 180 #define VIS_DEVINIT (VIOC|1)
182 -#define VIS_CONS_REV 3 /* Console IO interface version */
181 +#define VIS_CONS_REV 4 /* Console IO interface version */
183 182 /* Modes */
184 183 #define VIS_TEXT 0 /* Use text mode when displaying data */
185 184 #define VIS_PIXEL 1 /* Use pixel mode when displaying data */
186 185
187 186 /*
188 187 * VIS_DEVFINI:
189 188 * Tells the framebuffer that it is no longer being used as a console.
190 189 *
191 190 * ioctl(fd, VIS_DEVFINI, unused)
192 191 */
193 192 #define VIS_DEVFINI (VIOC|2)
194 193
195 194 /*
196 195 * VIS_CONSCURSOR:
197 196 * Display/Hide cursor on the screen. The layered driver uses this ioctl to
198 197 * display, hide, and move the cursor on the console. The framebuffer driver
199 198 * is expected to draw a cursor at position (col,row) of size width x height.
200 199 *
201 200 * ioctl(fd, VIS_CONSCURSOR, struct vis_conscursor *)
202 201 */
203 202 #define VIS_CONSCURSOR (VIOC|3)
204 203 /* Cursor action - Either display or hide cursor */
205 204 #define VIS_HIDE_CURSOR 0
206 205 #define VIS_DISPLAY_CURSOR 1
207 206 #define VIS_GET_CURSOR 2
208 207
209 208 /*
210 209 * VIS_CONSDISPLAY:
211 210 * Display data on the framebuffer. The data will be in the form specified
212 211 * by the driver during console initialization (see VIS_CONSDEVINIT above).
213 212 * The driver is expected to display the data at location (row,col). Width
214 213 * and height specify the size of the data.
215 214 *
216 215 * ioctl(fd, VIS_CONSDISPLAY, struct vis_consdisplay *)
217 216 */
218 217
219 218 #define VIS_CONSDISPLAY (VIOC|5)
220 219
221 220 /*
|
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
222 221 * VIS_CONSCOPY:
223 222 * Move data on the framebuffer. Used to scroll the screen by the terminal
224 223 * emulator or to move data by applications. The driver must copy the data
225 224 * specified by the rectangle (s_col,s_row),(e_col,e_row) to the location
226 225 * which starts at (t_col,t_row), handling overlapping copies correctly.
227 226 *
228 227 * ioctl(fd, VIS_CONSCOPY, struct vis_conscopy *)
229 228 */
230 229 #define VIS_CONSCOPY (VIOC|7)
231 230
231 +/*
232 + * VIS_CONSCLEAR:
233 + * Clear the screen using provided color. Used on VIS_PIXEL mode.
234 + *
235 + * ioctl(fd, VIS_CONSCLEAR, struct vis_consclear *)
236 + */
237 +#define VIS_CONSCLEAR (VIOC|8)
238 +
239 +struct vis_consclear {
240 + unsigned char bg_color; /* Background color */
241 +};
242 +
232 243 struct vis_consdisplay {
233 244 screen_pos_t row; /* Row to display data at */
234 245 screen_pos_t col; /* Col to display data at */
235 246 screen_size_t width; /* Width of data */
236 247 screen_size_t height; /* Height of data */
237 248 unsigned char *data; /* Data to display */
238 249 unsigned char fg_color; /* Foreground color */
239 250 unsigned char bg_color; /* Background color */
240 251 };
241 252
242 253 struct vis_conscopy {
243 254 screen_pos_t s_row; /* Starting row */
244 255 screen_pos_t s_col; /* Starting col */
245 256 screen_pos_t e_row; /* Ending row */
246 257 screen_pos_t e_col; /* Ending col */
247 258 screen_pos_t t_row; /* Row to move to */
248 259 screen_pos_t t_col; /* Col to move to */
249 260 };
250 261
251 262 struct vis_conscursor {
252 263 screen_pos_t row; /* Row to display cursor at */
253 264 screen_pos_t col; /* Col to display cursor at */
254 265 screen_size_t width; /* Width of cursor */
255 266 screen_size_t height; /* Height of cursor */
256 267 color_t fg_color; /* Foreground color */
257 268 color_t bg_color; /* Background color */
258 269 short action; /* Hide or show cursor */
259 270 };
260 271
261 272 /*
262 273 * Each software-console-capable frame buffer driver defines its own
263 274 * instance of this (with its own name!) and casts to/from this at the
264 275 * interface with the terminal emulator. These yield somewhat better
265 276 * type checking than "void *".
266 277 */
267 278 struct vis_polledio_arg;
268 279 struct vis_modechg_arg;
269 280
270 281 /*
271 282 * Each software-console-capable frame buffer driver supplies these routines
272 283 * for I/O from "polled" contexts - kmdb, OBP, etc. No system services are
273 284 * available.
274 285 */
275 286 struct vis_polledio {
276 287 struct vis_polledio_arg *arg;
|
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
277 288 void (*display)(struct vis_polledio_arg *, struct vis_consdisplay *);
278 289 void (*copy)(struct vis_polledio_arg *, struct vis_conscopy *);
279 290 void (*cursor)(struct vis_polledio_arg *, struct vis_conscursor *);
280 291 };
281 292
282 293 struct vis_devinit; /* forward decl. for typedef */
283 294
284 295 typedef void (*vis_modechg_cb_t)(struct vis_modechg_arg *,
285 296 struct vis_devinit *);
286 297
298 +typedef uint32_t (*color_map_fn_t)(uint8_t color);
299 +
287 300 struct vis_devinit {
288 301 /*
289 302 * This set of fields are used as parameters passed from the
290 303 * layered framebuffer driver to the terminal emulator.
291 304 */
292 305 int version; /* Console IO interface version */
293 306 screen_size_t width; /* Width of the device */
294 307 screen_size_t height; /* Height of the device */
295 308 screen_size_t linebytes; /* Bytes per scan line */
296 309 int depth; /* Device depth */
310 + color_map_fn_t color_map; /* Color map tem -> fb */
297 311 short mode; /* Mode to use when displaying data */
298 312 struct vis_polledio *polledio; /* Polled output routines */
299 313
300 314 /*
301 315 * The following fields are used as parameters passed from the
302 316 * terminal emulator to the underlying framebuffer driver.
303 317 */
304 318 vis_modechg_cb_t modechg_cb; /* Video mode change callback */
305 319 struct vis_modechg_arg *modechg_arg; /* Mode change cb arg */
306 320 };
307 321
308 -#endif /* _KERNEL */
322 +#endif /* _KERNEL || _BOOT */
309 323
310 324 #ifdef __cplusplus
311 325 }
312 326 #endif
313 327
314 328 #endif /* !_SYS_VISUAL_IO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX