xref: /titanic_41/usr/src/uts/intel/sys/bootinfo.h (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
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 2007 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_BOOTINFO_H
28 #define	_SYS_BOOTINFO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * The 32-bit kernel loader code needs to build several structures that the
38  * kernel is expecting. They will contain native sized pointers for the
39  * target kernel.
40  */
41 
42 #if defined(_BOOT_TARGET_amd64)
43 
44 typedef uint64_t native_ptr_t;
45 
46 #elif defined(_BOOT_TARGET_i386)
47 
48 typedef uint32_t native_ptr_t;
49 
50 #elif defined(_KERNEL)
51 
52 typedef void *native_ptr_t;
53 
54 #endif
55 
56 struct boot_memlist {
57 	uint64_t	addr;
58 	uint64_t	size;
59 	native_ptr_t	next;
60 	native_ptr_t	prev;
61 };
62 
63 /*
64  * The kernel needs to know how to find its modules.
65  */
66 struct boot_modules {
67 	native_ptr_t	bm_addr;
68 	uint32_t	bm_size;
69 	uint32_t	bm_padding;
70 };
71 
72 /*
73  *
74  */
75 #pragma pack(1)
76 struct xboot_info {
77 	uint64_t	bi_next_paddr;	/* next physical address not used */
78 	native_ptr_t	bi_next_vaddr;	/* next virtual address not used */
79 	native_ptr_t	bi_cmdline;
80 	native_ptr_t	bi_phys_install;
81 	native_ptr_t	bi_pcimem;
82 	native_ptr_t	bi_modules;
83 	uint32_t	bi_module_cnt;
84 	uint32_t	bi_use_largepage;	/* MMU uses large pages */
85 	uint32_t	bi_use_pae;	/* MMU uses PAE mode (8 byte PTES) */
86 	uint32_t	bi_use_nx;	/* MMU uses NX bit in PTEs */
87 	uint32_t	bi_use_pge;	/* MMU uses Page Global Enable */
88 	native_ptr_t	bi_pt_window;
89 	native_ptr_t	bi_pte_to_pt_window;
90 	native_ptr_t	bi_kseg_size;	/* size used for kernel nucleus pages */
91 	uint64_t	bi_top_page_table;
92 #if defined(__xpv)
93 	native_ptr_t	bi_xen_start_info;
94 	native_ptr_t	bi_shared_info;		/* VA for shared_info */
95 #else
96 	native_ptr_t	bi_mb_info;
97 #endif
98 };
99 #pragma pack()
100 
101 #ifdef	__cplusplus
102 }
103 #endif
104 
105 #endif	/* _SYS_BOOTINFO_H */
106