/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/controlregs.h>
#include <sys/bootconf.h>
#include <sys/bootregs.h>
#include <sys/bootconf.h>
#include <sys/biosdisk.h>
#if defined(__xpv)
#include <sys/hypervisor.h>
#endif
extern int prom_debug;
/* hard code realmode memory address for now */
#ifdef DEBUG
int biosdebug = 0;
if (biosdebug) \
#else
#endif
static int bios_check_extension_present(uchar_t);
static int get_dev_params(uchar_t);
#if !defined(__xpv)
void
{
int got_devparams = 0;
int got_first_block = 0;
int extensions;
if (dobiosdev == 0)
return;
if (!drive_present(drivenum))
continue;
/*
* no need to get the device parameters or read the first block
* because we'll never install onto this device.
*/
continue;
got_devparams = 1;
else
got_devparams = 0;
/* retry */
}
if (got_devparams || got_first_block) {
devi = ddi_root_node();
sizeof (biosdev_data_t));
}
}
}
#endif
static int
{
/* make sure we have extension support */
dprintf(("bios_check_extension_present int13 fn 41 "
return (0);
}
dprintf(("bios_check_extension_present get device parameters "
return (0);
}
return (1);
}
static int
{
int i;
int index;
dprintf(("In get_dev_params\n"));
/*
* We cannot use bzero here as we're initializing data
* at an address below kernel base.
*/
for (i = 0; i < sizeof (*bufp); i++)
dprintf(("EDD FAILED on drive eflag = %x ah= %x\n",
return (0);
}
/*
* Some compilers turn a structure copy into a call
* to memcpy. Since we are copying data below kernel
* base intentionally, and memcpy asserts that's not
* the case, we do the copy manually here.
*/
for (i = 0; i < sizeof (*bufp); i++)
return (1);
}
static int
{
dprintf(("drive not present drivenum %x eflag %x ah %x\n",
return (0);
}
return (1);
}
static void
{
int status;
status));
}
/* Get first block */
static int
{
int i, index;
/* es:bx is buf address */
return (0);
}
for (i = 0; i < 512; i++)
return (1);
}
static int
{
int i;
dprintf(("In is_eltorito\n"));
/*
* We cannot use bzero here as we're initializing data
* at an address below kernel base.
*/
for (i = 0; i < sizeof (*bufp); i++)
dprintf(("fn 0x4b01 FAILED on drive "
"eflags=%x ah=%x drivenum=%x\n",
return (0);
}
if (prom_debug)
return (1);
}