bootconf.h revision ae115bc77f6fcde83175c75b4206dc2e50747966
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_BOOTCONF_H
#define _SYS_BOOTCONF_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Boot time configuration information objects
*/
#include <sys/bootstat.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* masks to hand to bsys_alloc memory allocator
* XXX These names shouldn't really be srmmu derived.
*/
#define BO_NO_ALIGN 0x00001000
/* flags for BOP_EALLOC */
#define BOPF_X86_ALLOC_CLIENT 0x001
#define BOPF_X86_ALLOC_REAL 0x002
#define BOPF_X86_ALLOC_IDMAP 0x003
#define BOPF_X86_ALLOC_PHYS 0x004
/* return values for the newer bootops */
#define BOOT_SUCCESS 0
#define BOOT_FAILURE (-1)
/* top of boot scratch memory: 15 MB; multiboot loads at 16 MB */
#define MAGIC_PHYS 0xF00000
/*
* We pass a ptr to the space that boot has been using
* for its memory lists.
*/
struct bsys_mem {
};
/*
* Warning: Changing BO_VERSION blows compatibility between booters
* and older kernels. If you want to change the struct bootops,
* please consider adding new stuff to the end and using the
* "bootops-extensions" mechanism described below.
*/
typedef struct bootops {
/*
* the ubiquitous version number
*/
/*
* the area containing boot's memlists
*/
/*
* have boot allocate size bytes at virthint
*/
int align);
/*
* free size bytes allocated at virt - put the
* address range back onto the avail lists.
*/
/*
* to find the size of the buffer to allocate
*/
/*
* get the value associated with this name
*/
/*
* get the name of the next property in succession
* from the standalone
*/
/*
* print formatted output
*/
void (*bsys_printf)(struct bootops *, char *, ...);
/*
* Do a real mode interrupt
*/
/*
* Enhanced version of bsys_alloc().
*/
/* end of bootops which exist if (bootops-extensions >= 1) */
} bootops_t;
/*
* Boot configuration information
*/
#define BO_MAXFSNAME 16
#define BO_MAXOBJNAME 256
struct bootobj {
int bo_flags; /* flags, see below */
int bo_size; /* number of blocks */
char bo_devname[BO_MAXOBJNAME];
char bo_ifname[BO_MAXOBJNAME];
int bo_ppa;
};
/*
* flags
*/
extern char obp_bootpath[BO_MAXOBJNAME];
extern char svm_bootpath[BO_MAXOBJNAME];
extern char zfs_bootpath[BO_MAXOBJNAME];
extern dev_t getrootdev(void);
extern int loadrootmodules(void);
extern int strplumb(void);
extern int strplumb_load(void);
extern char *strplumb_get_netdev_path(void);
extern void consconfig(void);
extern void release_bootstrap(void);
extern void param_check(void);
extern int dhcpinit(void);
/*
* XXX The memlist stuff belongs in a header of its own
*/
extern int check_boot_version(int);
extern int netboot;
extern int swaploaded;
extern int modrootloaded;
extern char kern_bootargs[];
extern char *kobj_module_path;
extern char *default_path;
extern char *dhcack;
extern int dhcacklen;
extern char *netdev_path;
extern void bop_no_more_mem(void);
/*PRINTFLIKE2*/
extern void bop_printf(struct bootops *, char *, ...)
__KPRINTFLIKE(2);
/*PRINTFLIKE1*/
extern void bop_panic(char *, ...)
__KPRINTFLIKE(1);
extern void boot_prop_finish(void);
/*
* Back door to fakebop.c to get physical memory allocated.
* 64 bit data types are fixed for 32 bit PAE use.
*/
#endif /* _KERNEL && !_BOOT */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_BOOTCONF_H */