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/intel/sys/bootconf.h
+++ new/usr/src/uts/intel/sys/bootconf.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
20 20 */
21 21
22 22 /*
23 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 * Copyright 2016 Nexenta Systems, Inc.
26 26 */
27 27
28 28 #ifndef _SYS_BOOTCONF_H
29 29 #define _SYS_BOOTCONF_H
30 30
31 31
32 32 /*
33 33 * Boot time configuration information objects
34 34 */
35 35
36 36 #include <sys/types.h>
37 37 #include <sys/bootregs.h> /* for struct bop_regs */
38 38 #include <sys/bootstat.h>
39 39 #include <sys/dirent.h> /* for struct dirent */
40 40 #include <sys/memlist.h>
41 41 #include <sys/obpdefs.h>
42 42 #include <net/if.h> /* for IFNAMSIZ */
43 43
44 44 #ifdef __cplusplus
45 45 extern "C" {
46 46 #endif
47 47
48 48 /*
49 49 * Boot property names
50 50 */
51 51 #define BP_CPU_APICID_ARRAY "cpu_apicid_array"
52 52 #define BP_LGRP_SLIT_ENABLE "lgrp_slit_enable"
53 53 #define BP_LGRP_SRAT_ENABLE "lgrp_srat_enable"
54 54 #define BP_LGRP_MSCT_ENABLE "lgrp_msct_enable"
55 55 #define BP_LGRP_TOPO_LEVELS "lgrp_topo_levels"
56 56
57 57 /*
58 58 * masks to hand to bsys_alloc memory allocator
59 59 * XXX These names shouldn't really be srmmu derived.
60 60 */
61 61 #define BO_NO_ALIGN 0x00001000
62 62
63 63 /* flags for BOP_EALLOC */
64 64 #define BOPF_X86_ALLOC_CLIENT 0x001
65 65 #define BOPF_X86_ALLOC_REAL 0x002
66 66 #define BOPF_X86_ALLOC_IDMAP 0x003
67 67 #define BOPF_X86_ALLOC_PHYS 0x004
68 68
69 69 /* return values for the newer bootops */
70 70 #define BOOT_SUCCESS 0
71 71 #define BOOT_FAILURE (-1)
72 72
73 73 /* top of boot scratch memory: 15 MB; multiboot loads at 16 MB */
74 74 #define MAGIC_PHYS 0xF00000
75 75
76 76 /*
77 77 * We pass a ptr to the space that boot has been using
78 78 * for its memory lists.
79 79 */
80 80 struct bsys_mem {
81 81 struct memlist *physinstalled; /* amt of physmem installed */
82 82 struct memlist *rsvdmem; /* amt of bios reserved mem */
83 83 struct memlist *physavail; /* amt of physmem avail for use */
84 84 struct memlist *virtavail; /* amt of virtmem avail for use */
85 85 struct memlist *pcimem; /* amt of pcimem avail for use */
86 86 uint_t extent; /* number of bytes in the space */
87 87 };
88 88
89 89 /*
90 90 * Warning: Changing BO_VERSION blows compatibility between booters
91 91 * and older kernels. If you want to change the struct bootops,
92 92 * please consider adding new stuff to the end and using the
93 93 * "bootops-extensions" mechanism described below.
94 94 */
95 95 #define BO_VERSION 10 /* bootops interface revision # */
96 96
97 97 typedef struct bootops {
98 98 /*
99 99 * the ubiquitous version number
100 100 */
101 101 uint_t bsys_version;
102 102
103 103 /*
104 104 * the area containing boot's memlists
105 105 */
106 106 struct bsys_mem *boot_mem;
107 107
108 108 /*
109 109 * have boot allocate size bytes at virthint
110 110 */
111 111 caddr_t (*bsys_alloc)(struct bootops *, caddr_t virthint, size_t size,
112 112 int align);
113 113
114 114 /*
115 115 * free size bytes allocated at virt - put the
116 116 * address range back onto the avail lists.
117 117 */
118 118 void (*bsys_free)(struct bootops *, caddr_t virt, size_t size);
119 119
120 120 /*
121 121 * to find the size of the buffer to allocate
122 122 */
123 123 int (*bsys_getproplen)(struct bootops *, const char *);
124 124
125 125 /*
126 126 * get the value associated with this name
127 127 */
128 128 int (*bsys_getprop)(struct bootops *, const char *, void *);
129 129
130 130 /*
131 131 * get the name of the next property in succession
132 132 * from the standalone
133 133 */
134 134 char *(*bsys_nextprop)(struct bootops *, char *prevprop);
135 135
136 136 /*
137 137 * print formatted output
138 138 */
139 139 void (*bsys_printf)(struct bootops *, const char *, ...);
140 140
141 141 /*
142 142 * Do a real mode interrupt
143 143 */
144 144 void (*bsys_doint)(struct bootops *, int, struct bop_regs *);
145 145
146 146 /*
147 147 * Enhanced version of bsys_alloc().
148 148 */
149 149 caddr_t (*bsys_ealloc)(struct bootops *, caddr_t virthint, size_t size,
150 150 int align, int flags);
151 151
152 152 /* end of bootops which exist if (bootops-extensions >= 1) */
153 153 } bootops_t;
154 154
155 155 #define BOP_GETVERSION(bop) ((bop)->bsys_version)
156 156 #define BOP_ALLOC(bop, virthint, size, align) \
157 157 ((bop)->bsys_alloc)(bop, virthint, size, align)
158 158 #define BOP_FREE(bop, virt, size) ((bop)->bsys_free)(bop, virt, size)
159 159 #define BOP_GETPROPLEN(bop, name) ((bop)->bsys_getproplen)(bop, name)
160 160 #define BOP_GETPROP(bop, name, buf) ((bop)->bsys_getprop)(bop, name, buf)
161 161 #define BOP_NEXTPROP(bop, prev) ((bop)->bsys_nextprop)(bop, prev)
162 162 #define BOP_DOINT(bop, intnum, rp) ((bop)->bsys_doint)(bop, intnum, rp)
163 163 #define BOP_EALLOC(bop, virthint, size, align, flags)\
164 164 ((bop)->bsys_ealloc)(bop, virthint, size, align, flags)
165 165
166 166 #define BOP_PUTSARG(bop, msg, arg) ((bop)->bsys_printf)(bop, msg, arg)
167 167
168 168 #if defined(_KERNEL) && !defined(_BOOT)
169 169
170 170 /*
171 171 * Boot configuration information
172 172 */
173 173
174 174 #define BO_MAXFSNAME 16
175 175 #define BO_MAXOBJNAME 256
176 176
177 177 struct bootobj {
178 178 char bo_fstype[BO_MAXFSNAME]; /* vfs type name (e.g. nfs) */
179 179 char bo_name[BO_MAXOBJNAME]; /* name of object */
180 180 int bo_flags; /* flags, see below */
181 181 int bo_size; /* number of blocks */
182 182 struct vnode *bo_vp; /* vnode of object */
183 183 char bo_devname[BO_MAXOBJNAME];
184 184 char bo_ifname[BO_MAXOBJNAME];
185 185 int bo_ppa;
186 186 };
187 187
188 188 /*
189 189 * flags
190 190 */
191 191 #define BO_VALID 0x01 /* all information in object is valid */
192 192 #define BO_BUSY 0x02 /* object is busy */
193 193
194 194 extern struct bootobj rootfs;
195 195 extern struct bootobj swapfile;
196 196
197 197 extern char obp_bootpath[BO_MAXOBJNAME];
198 198
199 199 extern void *gfx_devinfo_list;
200 200
201 201 extern dev_t getrootdev(void);
202 202 extern void getfsname(char *, char *, size_t);
203 203 extern int loadrootmodules(void);
204 204
205 205 extern int strplumb(void);
206 206 extern int strplumb_load(void);
207 207 extern char *strplumb_get_netdev_path(void);
208 208
209 209 extern void consconfig(void);
210 210 extern void release_bootstrap(void);
211 211
212 212 extern void param_check(void);
213 213 extern int octet_to_hexascii(const void *, uint_t, char *, uint_t *);
214 214
215 215 extern int dhcpinit(void);
216 216
217 217 extern struct bootops *bootops;
218 218 extern int netboot;
219 219 extern int swaploaded;
220 220 extern int modrootloaded;
221 221 extern char kern_bootargs[];
222 222 extern char kern_bootfile[];
223 223 extern char *kobj_module_path;
224 224 extern char *default_path;
225 225 extern char *dhcack;
226 226 extern int dhcacklen;
227 227 extern char dhcifname[IFNAMSIZ];
228 228 extern char *netdev_path;
229 229
230 230 extern void bop_no_more_mem(void);
231 231
232 232 /*PRINTFLIKE2*/
233 233 extern void bop_printf(struct bootops *, const char *, ...)
234 234 __KPRINTFLIKE(2);
235 235
236 236 /*PRINTFLIKE1*/
237 237 extern void bop_panic(const char *, ...)
238 238 __KPRINTFLIKE(1) __NORETURN;
239 239 #pragma rarely_called(bop_panic)
240 240
241 241 extern void boot_prop_finish(void);
242 242
|
↓ open down ↓ |
242 lines elided |
↑ open up ↑ |
243 243 extern int bootprop_getval(const char *, u_longlong_t *);
244 244
245 245 /*
246 246 * Back door to fakebop.c to get physical memory allocated.
247 247 * 64 bit data types are fixed for 32 bit PAE use.
248 248 */
249 249 extern paddr_t do_bop_phys_alloc(uint64_t, uint64_t);
250 250
251 251 extern int do_bsys_getproplen(bootops_t *, const char *);
252 252 extern int do_bsys_getprop(bootops_t *, const char *, void *);
253 +extern int do_bsys_getproptype(bootops_t *, const char *);
253 254
254 255 #endif /* _KERNEL && !_BOOT */
255 256
256 257 #ifdef __cplusplus
257 258 }
258 259 #endif
259 260
260 261 #endif /* _SYS_BOOTCONF_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX