6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2016 Nexenta Systems, Inc.
26 */
27
28 #ifndef _SYS_BOOTCONF_H
29 #define _SYS_BOOTCONF_H
30
31
32 /*
33 * Boot time configuration information objects
34 */
35
36 #include <sys/types.h>
37 #include <sys/bootregs.h> /* for struct bop_regs */
38 #include <sys/bootstat.h>
39 #include <sys/dirent.h> /* for struct dirent */
40 #include <sys/memlist.h>
41 #include <sys/obpdefs.h>
42 #include <sys/varargs.h>
43 #include <net/if.h> /* for IFNAMSIZ */
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /*
50 * Boot property names
51 */
52 #define BP_CPU_APICID_ARRAY "cpu_apicid_array"
53 #define BP_LGRP_SLIT_ENABLE "lgrp_slit_enable"
54 #define BP_LGRP_SRAT_ENABLE "lgrp_srat_enable"
55 #define BP_LGRP_MSCT_ENABLE "lgrp_msct_enable"
56 #define BP_LGRP_TOPO_LEVELS "lgrp_topo_levels"
57
58 /*
59 * masks to hand to bsys_alloc memory allocator
60 * XXX These names shouldn't really be srmmu derived.
61 */
62 #define BO_NO_ALIGN 0x00001000
63
64 /* flags for BOP_EALLOC */
65 #define BOPF_X86_ALLOC_CLIENT 0x001
66 #define BOPF_X86_ALLOC_REAL 0x002
67 #define BOPF_X86_ALLOC_IDMAP 0x003
68 #define BOPF_X86_ALLOC_PHYS 0x004
226 extern char *dhcack;
227 extern int dhcacklen;
228 extern char dhcifname[IFNAMSIZ];
229 extern char *netdev_path;
230
231 extern void bop_no_more_mem(void);
232
233 /*PRINTFLIKE2*/
234 extern void bop_printf(void *, const char *, ...)
235 __KPRINTFLIKE(2);
236 extern void vbop_printf(void *, const char *, va_list);
237
238 /*PRINTFLIKE1*/
239 extern void bop_panic(const char *, ...)
240 __KPRINTFLIKE(1) __NORETURN;
241 #pragma rarely_called(bop_panic)
242
243 extern void boot_prop_finish(void);
244
245 extern int bootprop_getval(const char *, u_longlong_t *);
246
247 /*
248 * Back door to fakebop.c to get physical memory allocated.
249 * 64 bit data types are fixed for 32 bit PAE use.
250 */
251 extern paddr_t do_bop_phys_alloc(uint64_t, uint64_t);
252
253 extern int do_bsys_getproplen(bootops_t *, const char *);
254 extern int do_bsys_getprop(bootops_t *, const char *, void *);
255 extern int do_bsys_getproptype(bootops_t *, const char *);
256
257 #endif /* _KERNEL && !_BOOT */
258
259 #ifdef __cplusplus
260 }
261 #endif
262
263 #endif /* _SYS_BOOTCONF_H */
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2016 Nexenta Systems, Inc.
26 * Copyright 2019, Joyent, Inc.
27 */
28
29 #ifndef _SYS_BOOTCONF_H
30 #define _SYS_BOOTCONF_H
31
32
33 /*
34 * Boot time configuration information objects
35 */
36
37 #include <sys/types.h>
38 #include <sys/bootregs.h> /* for struct bop_regs */
39 #include <sys/bootstat.h>
40 #include <sys/dirent.h> /* for struct dirent */
41 #include <sys/memlist.h>
42 #include <sys/obpdefs.h>
43 #include <sys/varargs.h>
44 #include <net/if.h> /* for IFNAMSIZ */
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 #define BP_MAX_STRLEN 32
51
52 /*
53 * Boot property names
54 */
55 #define BP_CPU_APICID_ARRAY "cpu_apicid_array"
56 #define BP_LGRP_SLIT_ENABLE "lgrp_slit_enable"
57 #define BP_LGRP_SRAT_ENABLE "lgrp_srat_enable"
58 #define BP_LGRP_MSCT_ENABLE "lgrp_msct_enable"
59 #define BP_LGRP_TOPO_LEVELS "lgrp_topo_levels"
60
61 /*
62 * masks to hand to bsys_alloc memory allocator
63 * XXX These names shouldn't really be srmmu derived.
64 */
65 #define BO_NO_ALIGN 0x00001000
66
67 /* flags for BOP_EALLOC */
68 #define BOPF_X86_ALLOC_CLIENT 0x001
69 #define BOPF_X86_ALLOC_REAL 0x002
70 #define BOPF_X86_ALLOC_IDMAP 0x003
71 #define BOPF_X86_ALLOC_PHYS 0x004
229 extern char *dhcack;
230 extern int dhcacklen;
231 extern char dhcifname[IFNAMSIZ];
232 extern char *netdev_path;
233
234 extern void bop_no_more_mem(void);
235
236 /*PRINTFLIKE2*/
237 extern void bop_printf(void *, const char *, ...)
238 __KPRINTFLIKE(2);
239 extern void vbop_printf(void *, const char *, va_list);
240
241 /*PRINTFLIKE1*/
242 extern void bop_panic(const char *, ...)
243 __KPRINTFLIKE(1) __NORETURN;
244 #pragma rarely_called(bop_panic)
245
246 extern void boot_prop_finish(void);
247
248 extern int bootprop_getval(const char *, u_longlong_t *);
249 extern int bootprop_getstr(const char *, char *, size_t);
250
251 /*
252 * Back door to fakebop.c to get physical memory allocated.
253 * 64 bit data types are fixed for 32 bit PAE use.
254 */
255 extern paddr_t do_bop_phys_alloc(uint64_t, uint64_t);
256
257 extern int do_bsys_getproplen(bootops_t *, const char *);
258 extern int do_bsys_getprop(bootops_t *, const char *, void *);
259 extern int do_bsys_getproptype(bootops_t *, const char *);
260
261 #endif /* _KERNEL && !_BOOT */
262
263 #ifdef __cplusplus
264 }
265 #endif
266
267 #endif /* _SYS_BOOTCONF_H */
|