xref: /onnv-gate/usr/src/uts/intel/sys/bootinfo.h (revision 9940:82fa1538a908)
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 /*
23*9940SVikram.Hegde@Sun.COM  * Copyright 2009 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 #ifdef	__cplusplus
313446Smrj extern "C" {
323446Smrj #endif
333446Smrj 
343446Smrj /*
353446Smrj  * The 32-bit kernel loader code needs to build several structures that the
363446Smrj  * kernel is expecting. They will contain native sized pointers for the
373446Smrj  * target kernel.
383446Smrj  */
393446Smrj 
403446Smrj #if defined(_BOOT_TARGET_amd64)
413446Smrj 
423446Smrj typedef uint64_t native_ptr_t;
433446Smrj 
443446Smrj #elif defined(_BOOT_TARGET_i386)
453446Smrj 
463446Smrj typedef uint32_t native_ptr_t;
473446Smrj 
483446Smrj #elif defined(_KERNEL)
493446Smrj 
503446Smrj typedef void *native_ptr_t;
513446Smrj 
523446Smrj #endif
533446Smrj 
543446Smrj struct boot_memlist {
553446Smrj 	uint64_t	addr;
563446Smrj 	uint64_t	size;
573446Smrj 	native_ptr_t	next;
583446Smrj 	native_ptr_t	prev;
593446Smrj };
603446Smrj 
613446Smrj /*
623446Smrj  * The kernel needs to know how to find its modules.
633446Smrj  */
643446Smrj struct boot_modules {
653446Smrj 	native_ptr_t	bm_addr;
663446Smrj 	uint32_t	bm_size;
673446Smrj 	uint32_t	bm_padding;
683446Smrj };
693446Smrj 
703446Smrj /*
713446Smrj  *
723446Smrj  */
733446Smrj #pragma pack(1)
743446Smrj struct xboot_info {
753446Smrj 	uint64_t	bi_next_paddr;	/* next physical address not used */
763446Smrj 	native_ptr_t	bi_next_vaddr;	/* next virtual address not used */
773446Smrj 	native_ptr_t	bi_cmdline;
783446Smrj 	native_ptr_t	bi_phys_install;
79*9940SVikram.Hegde@Sun.COM 	native_ptr_t	bi_rsvdmem;
803489Sjosephb 	native_ptr_t	bi_pcimem;
813446Smrj 	native_ptr_t	bi_modules;
823446Smrj 	uint32_t	bi_module_cnt;
833446Smrj 	uint32_t	bi_use_largepage;	/* MMU uses large pages */
843446Smrj 	uint32_t	bi_use_pae;	/* MMU uses PAE mode (8 byte PTES) */
853446Smrj 	uint32_t	bi_use_nx;	/* MMU uses NX bit in PTEs */
863446Smrj 	uint32_t	bi_use_pge;	/* MMU uses Page Global Enable */
873446Smrj 	native_ptr_t	bi_pt_window;
883446Smrj 	native_ptr_t	bi_pte_to_pt_window;
893446Smrj 	native_ptr_t	bi_kseg_size;	/* size used for kernel nucleus pages */
903446Smrj 	uint64_t	bi_top_page_table;
915084Sjohnlev #if defined(__xpv)
925084Sjohnlev 	native_ptr_t	bi_xen_start_info;
935084Sjohnlev 	native_ptr_t	bi_shared_info;		/* VA for shared_info */
945084Sjohnlev #else
953446Smrj 	native_ptr_t	bi_mb_info;
965084Sjohnlev #endif
973446Smrj };
983446Smrj #pragma pack()
993446Smrj 
1003446Smrj #ifdef	__cplusplus
1013446Smrj }
1023446Smrj #endif
1033446Smrj 
1043446Smrj #endif	/* _SYS_BOOTINFO_H */
105