biosdisk.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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/controlregs.h>
#include <sys/bootconf.h>
#include <sys/bootregs.h>
#include <sys/bootconf.h>
#include <sys/biosdisk.h>
/* hard code realmode memory address for now */
#define BIOS_RES_BUFFER_ADDR 0x7000
#define BIOSDEV_NUM 8
#define STARTING_DRVNUM 0x80
#ifdef DEBUG
int biosdebug = 0;
if (biosdebug) \
#else
#endif
int dobiosdev = 1;
static int bios_check_extension_present(uchar_t);
static int get_dev_params(uchar_t);
void
{
int got_devparams = 0;
int got_first_block = 0;
if (dobiosdev == 0)
return;
if (!drive_present(drivenum))
continue;
/* retry */
}
if (got_devparams || got_first_block) {
devi = ddi_root_node();
sizeof (biosdev_data_t));
}
}
}
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"));
if (bios_check_extension_present(drivenum) == 0)
return (0);
for (i = 0; i < sizeof (*bufp); i++)
dprintf(("EDD FAILED on drive eflag = %x ah= %x\n",
return (0);
}
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);
}