xref: /onnv-gate/usr/src/uts/intel/sys/bootinfo.h (revision 5084:7d838c5c0eed)
13446Smrj /*
23446Smrj  * CDDL HEADER START
33446Smrj  *
43446Smrj  * The contents of this file are subject to the terms of the
53446Smrj  * Common Development and Distribution License (the "License").
63446Smrj  * You may not use this file except in compliance with the License.
73446Smrj  *
83446Smrj  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
93446Smrj  * or http://www.opensolaris.org/os/licensing.
103446Smrj  * See the License for the specific language governing permissions
113446Smrj  * and limitations under the License.
123446Smrj  *
133446Smrj  * When distributing Covered Code, include this CDDL HEADER in each
143446Smrj  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
153446Smrj  * If applicable, add the following below this CDDL HEADER, with the
163446Smrj  * fields enclosed by brackets "[]" replaced with your own identifying
173446Smrj  * information: Portions Copyright [yyyy] [name of copyright owner]
183446Smrj  *
193446Smrj  * CDDL HEADER END
203446Smrj  */
213446Smrj 
223446Smrj /*
233446Smrj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
243446Smrj  * Use is subject to license terms.
253446Smrj  */
263446Smrj 
273446Smrj #ifndef	_SYS_BOOTINFO_H
283446Smrj #define	_SYS_BOOTINFO_H
293446Smrj 
303446Smrj #pragma ident	"%Z%%M%	%I%	%E% SMI"
313446Smrj 
323446Smrj #ifdef	__cplusplus
333446Smrj extern "C" {
343446Smrj #endif
353446Smrj 
363446Smrj /*
373446Smrj  * The 32-bit kernel loader code needs to build several structures that the
383446Smrj  * kernel is expecting. They will contain native sized pointers for the
393446Smrj  * target kernel.
403446Smrj  */
413446Smrj 
423446Smrj #if defined(_BOOT_TARGET_amd64)
433446Smrj 
443446Smrj typedef uint64_t native_ptr_t;
453446Smrj 
463446Smrj #elif defined(_BOOT_TARGET_i386)
473446Smrj 
483446Smrj typedef uint32_t native_ptr_t;
493446Smrj 
503446Smrj #elif defined(_KERNEL)
513446Smrj 
523446Smrj typedef void *native_ptr_t;
533446Smrj 
543446Smrj #endif
553446Smrj 
563446Smrj struct boot_memlist {
573446Smrj 	uint64_t	addr;
583446Smrj 	uint64_t	size;
593446Smrj 	native_ptr_t	next;
603446Smrj 	native_ptr_t	prev;
613446Smrj };
623446Smrj 
633446Smrj /*
643446Smrj  * The kernel needs to know how to find its modules.
653446Smrj  */
663446Smrj struct boot_modules {
673446Smrj 	native_ptr_t	bm_addr;
683446Smrj 	uint32_t	bm_size;
693446Smrj 	uint32_t	bm_padding;
703446Smrj };
713446Smrj 
723446Smrj /*
733446Smrj  *
743446Smrj  */
753446Smrj #pragma pack(1)
763446Smrj struct xboot_info {
773446Smrj 	uint64_t	bi_next_paddr;	/* next physical address not used */
783446Smrj 	native_ptr_t	bi_next_vaddr;	/* next virtual address not used */
793446Smrj 	native_ptr_t	bi_cmdline;
803446Smrj 	native_ptr_t	bi_phys_install;
813489Sjosephb 	native_ptr_t	bi_pcimem;
823446Smrj 	native_ptr_t	bi_modules;
833446Smrj 	uint32_t	bi_module_cnt;
843446Smrj 	uint32_t	bi_use_largepage;	/* MMU uses large pages */
853446Smrj 	uint32_t	bi_use_pae;	/* MMU uses PAE mode (8 byte PTES) */
863446Smrj 	uint32_t	bi_use_nx;	/* MMU uses NX bit in PTEs */
873446Smrj 	uint32_t	bi_use_pge;	/* MMU uses Page Global Enable */
883446Smrj 	native_ptr_t	bi_pt_window;
893446Smrj 	native_ptr_t	bi_pte_to_pt_window;
903446Smrj 	native_ptr_t	bi_kseg_size;	/* size used for kernel nucleus pages */
913446Smrj 	uint64_t	bi_top_page_table;
92*5084Sjohnlev #if defined(__xpv)
93*5084Sjohnlev 	native_ptr_t	bi_xen_start_info;
94*5084Sjohnlev 	native_ptr_t	bi_shared_info;		/* VA for shared_info */
95*5084Sjohnlev #else
963446Smrj 	native_ptr_t	bi_mb_info;
97*5084Sjohnlev #endif
983446Smrj };
993446Smrj #pragma pack()
1003446Smrj 
1013446Smrj #ifdef	__cplusplus
1023446Smrj }
1033446Smrj #endif
1043446Smrj 
1053446Smrj #endif	/* _SYS_BOOTINFO_H */
106