bootops.c revision 30f5cf21f0e4186919b67ac48223d09ca110f8fe
/*
* 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/bootconf.h>
#include "standalloc.h"
#include "bootprop.h"
#include "util.h"
#include "biosint.h"
#include "debug.h"
/* Misc memlist stuff */
extern void update_memlist(char *, char *, struct memlist **);
/*ARGSUSED*/
static caddr_t
{
return (bkmem_alloc(size));
}
/*ARGSUSED*/
static caddr_t
int flags)
{
/* sanity check */
if (size == 0)
return ((caddr_t)0);
if (flags == BOPF_X86_ALLOC_IDMAP ||
flags == BOPF_X86_ALLOC_PHYS) {
/* align to PAGESIZE */
switch (flags) {
case BOPF_X86_ALLOC_IDMAP:
/*NOTREACHED*/
case BOPF_X86_ALLOC_PHYS:
/*NOTREACHED*/
}
}
}
/*ARGSUSED*/
static void
{
}
void
install_memlistptrs(void)
{
/* allocate boot_mem structure */
dprintf("physinstalledp = 0x%p\n",
dprintf("pfreelistp = 0x%p\n",
dprintf("ppcimemp = 0x%p\n",
}
/*ARGSUSED*/
static void
{
}
/*
*/
/*ARGSUSED*/
static void
{
printf("bkern_doint: int = 0x%x, ax 0x%x, dx 0x%x\n",
printf("bios_doint ret = %d, ax 0x%x, dx 0x%x\n",
}
{
/* reduced bootops BO_VERSION == 11 ... */
BO_VERSION, /* "major" version number */
0, /* memlist pointers */
bkern_alloc, /* G.P. memory allocator */
bkern_free, /* G.P. memory release */
bgetproplen, /* proplen */
bgetprop, /* getprop */
bnextprop, /* nextprop */
bkern_printf, /* limited printf for kobj */
bkern_doint, /* biosint */
};
void
setup_bootops(void)
{
/*
* Initialize the bootops struct and establish a pointer to it ("bop")
* for use by standalone clients.
*/
if (verbosemode)
printf("setup bootops\n");
}