xref: /titanic_51/usr/src/uts/intel/sys/bootinfo.h (revision ae115bc77f6fcde83175c75b4206dc2e50747966)
1*ae115bc7Smrj /*
2*ae115bc7Smrj  * CDDL HEADER START
3*ae115bc7Smrj  *
4*ae115bc7Smrj  * The contents of this file are subject to the terms of the
5*ae115bc7Smrj  * Common Development and Distribution License (the "License").
6*ae115bc7Smrj  * You may not use this file except in compliance with the License.
7*ae115bc7Smrj  *
8*ae115bc7Smrj  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*ae115bc7Smrj  * or http://www.opensolaris.org/os/licensing.
10*ae115bc7Smrj  * See the License for the specific language governing permissions
11*ae115bc7Smrj  * and limitations under the License.
12*ae115bc7Smrj  *
13*ae115bc7Smrj  * When distributing Covered Code, include this CDDL HEADER in each
14*ae115bc7Smrj  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*ae115bc7Smrj  * If applicable, add the following below this CDDL HEADER, with the
16*ae115bc7Smrj  * fields enclosed by brackets "[]" replaced with your own identifying
17*ae115bc7Smrj  * information: Portions Copyright [yyyy] [name of copyright owner]
18*ae115bc7Smrj  *
19*ae115bc7Smrj  * CDDL HEADER END
20*ae115bc7Smrj  */
21*ae115bc7Smrj 
22*ae115bc7Smrj /*
23*ae115bc7Smrj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*ae115bc7Smrj  * Use is subject to license terms.
25*ae115bc7Smrj  */
26*ae115bc7Smrj 
27*ae115bc7Smrj #ifndef	_SYS_BOOTINFO_H
28*ae115bc7Smrj #define	_SYS_BOOTINFO_H
29*ae115bc7Smrj 
30*ae115bc7Smrj #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*ae115bc7Smrj 
32*ae115bc7Smrj #ifdef	__cplusplus
33*ae115bc7Smrj extern "C" {
34*ae115bc7Smrj #endif
35*ae115bc7Smrj 
36*ae115bc7Smrj /*
37*ae115bc7Smrj  * The 32-bit kernel loader code needs to build several structures that the
38*ae115bc7Smrj  * kernel is expecting. They will contain native sized pointers for the
39*ae115bc7Smrj  * target kernel.
40*ae115bc7Smrj  */
41*ae115bc7Smrj 
42*ae115bc7Smrj #if defined(_BOOT_TARGET_amd64)
43*ae115bc7Smrj 
44*ae115bc7Smrj typedef uint64_t native_ptr_t;
45*ae115bc7Smrj 
46*ae115bc7Smrj #elif defined(_BOOT_TARGET_i386)
47*ae115bc7Smrj 
48*ae115bc7Smrj typedef uint32_t native_ptr_t;
49*ae115bc7Smrj 
50*ae115bc7Smrj #elif defined(_KERNEL)
51*ae115bc7Smrj 
52*ae115bc7Smrj typedef void *native_ptr_t;
53*ae115bc7Smrj 
54*ae115bc7Smrj #endif
55*ae115bc7Smrj 
56*ae115bc7Smrj struct boot_memlist {
57*ae115bc7Smrj 	uint64_t	addr;
58*ae115bc7Smrj 	uint64_t	size;
59*ae115bc7Smrj 	native_ptr_t	next;
60*ae115bc7Smrj 	native_ptr_t	prev;
61*ae115bc7Smrj };
62*ae115bc7Smrj 
63*ae115bc7Smrj /*
64*ae115bc7Smrj  * The kernel needs to know how to find its modules.
65*ae115bc7Smrj  */
66*ae115bc7Smrj struct boot_modules {
67*ae115bc7Smrj 	native_ptr_t	bm_addr;
68*ae115bc7Smrj 	uint32_t	bm_size;
69*ae115bc7Smrj 	uint32_t	bm_padding;
70*ae115bc7Smrj };
71*ae115bc7Smrj 
72*ae115bc7Smrj /*
73*ae115bc7Smrj  *
74*ae115bc7Smrj  */
75*ae115bc7Smrj #pragma pack(1)
76*ae115bc7Smrj struct xboot_info {
77*ae115bc7Smrj 	uint64_t	bi_next_paddr;	/* next physical address not used */
78*ae115bc7Smrj 	native_ptr_t	bi_next_vaddr;	/* next virtual address not used */
79*ae115bc7Smrj 	native_ptr_t	bi_cmdline;
80*ae115bc7Smrj 	native_ptr_t	bi_phys_install;
81*ae115bc7Smrj 	native_ptr_t	bi_modules;
82*ae115bc7Smrj 	uint32_t	bi_module_cnt;
83*ae115bc7Smrj 	uint32_t	bi_use_largepage;	/* MMU uses large pages */
84*ae115bc7Smrj 	uint32_t	bi_use_pae;	/* MMU uses PAE mode (8 byte PTES) */
85*ae115bc7Smrj 	uint32_t	bi_use_nx;	/* MMU uses NX bit in PTEs */
86*ae115bc7Smrj 	uint32_t	bi_use_pge;	/* MMU uses Page Global Enable */
87*ae115bc7Smrj 	native_ptr_t	bi_pt_window;
88*ae115bc7Smrj 	native_ptr_t	bi_pte_to_pt_window;
89*ae115bc7Smrj 	native_ptr_t	bi_kseg_size;	/* size used for kernel nucleus pages */
90*ae115bc7Smrj 	uint64_t	bi_top_page_table;
91*ae115bc7Smrj 	native_ptr_t	bi_mb_info;
92*ae115bc7Smrj };
93*ae115bc7Smrj #pragma pack()
94*ae115bc7Smrj 
95*ae115bc7Smrj #ifdef	__cplusplus
96*ae115bc7Smrj }
97*ae115bc7Smrj #endif
98*ae115bc7Smrj 
99*ae115bc7Smrj #endif	/* _SYS_BOOTINFO_H */
100