bootconf.h revision fa9e4066f08beec538e775443c5be79dd423fcab
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 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" /* SunOS-4.0 1.7 */
/*
* 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
#define BO_ALIGN_L3 0x00001000
#define BO_ALIGN_L2 0x00040000
#define BO_ALIGN_L1 0x01000000
/*
* We pass a ptr to the space that boot has been using
* for its memory lists.
*/
struct bsys_mem {
};
#define BOOTOPS_ARE_1275(bop) \
typedef struct bootops {
/*
* the ubiquitous version number
*/
/*
* pointer to our parents bootops
*/
struct bootops *bsys_super;
/*
* the area containing boot's memlists (non-LP64 boot)
*/
#ifndef _LP64
#endif
/*
* The entry point to jump to for boot services.
* Pass this routine the array of boot_cell_t's describing the
* service requested.
*/
/*
* print formatted output - PRINTFLIKE1
* here (and maintained) so old kernels can fail with
* an error message rather than something weird.
* not really 'printf' though.
*/
} bootops_t;
int align);
extern void bop_putsarg(struct bootops *, const char *, ...);
/*
* macros and declarations needed by clients of boot to
* call the 1275-like boot interface routines.
*/
typedef unsigned long long boot_cell_t;
/*
* Macros that work in both compilation models, to permit either a
* 1275-like boot service replacement for bootops.
*
* fixed size in all models. Note that some of the types (e.g. off_t)
* change size in the models.
*/
#define boot_int2cell(i) ((boot_cell_t)((int)(i)))
#define boot_uint2cell(u) ((boot_cell_t)((unsigned int)(u)))
#define boot_cell2int(i) ((int)((boot_cell_t)(i)))
#define boot_cell2uint(u) ((unsigned int)((boot_cell_t)(u)))
#define boot_cells2ull(h, l) ((unsigned long long)(boot_cell_t)(l))
#define BOOT_SVC_FAIL (int)(-1)
#define BOOT_SVC_OK (int)(1)
/*
* 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 dev_t getrootdev(void);
extern int loadrootmodules(void);
extern int strplumb(void);
extern int strplumb_load(void);
extern void consconfig(void);
extern int dhcpinit(void);
/* XXX Doesn't belong here */
extern int zsgetspeed(dev_t);
extern void param_check(void);
extern int netboot;
extern int swaploaded;
extern int modrootloaded;
extern char kern_bootargs[];
extern char *default_path;
extern char *dhcack;
extern char *netdev_path;
#endif /* _KERNEL && !_BOOT */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_BOOTCONF_H */