mirror of https://github.com/ipxe/ipxe.git
Add INT 13,41 (extensions installation check). LILO's MBR now uses
linear calls to load the MS-DOS boot sector in my test setup.pull/1/head
parent
f25731d08f
commit
295e11b2b0
|
@ -27,6 +27,8 @@ struct block_device;
|
||||||
#define INT13_WRITE_SECTORS 0x03
|
#define INT13_WRITE_SECTORS 0x03
|
||||||
/** Get drive parameters */
|
/** Get drive parameters */
|
||||||
#define INT13_GET_PARAMETERS 0x08
|
#define INT13_GET_PARAMETERS 0x08
|
||||||
|
/** Extensions installation check */
|
||||||
|
#define INT13_EXTENSION_CHECK 0x41
|
||||||
/** Extended read */
|
/** Extended read */
|
||||||
#define INT13_EXTENDED_READ 0x42
|
#define INT13_EXTENDED_READ 0x42
|
||||||
/** Extended write */
|
/** Extended write */
|
||||||
|
@ -151,6 +153,20 @@ struct int13_disk_parameters {
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup int13exts INT 13 extension flags
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Extended disk access functions supported */
|
||||||
|
#define INT13_EXTENSION_LINEAR 0x01
|
||||||
|
/** Removable drive functions supported */
|
||||||
|
#define INT13_EXTENSION_REMOVABLE 0x02
|
||||||
|
/** EDD functions supported */
|
||||||
|
#define INT13_EXTENSION_EDD 0x04
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
extern void register_int13_drive ( struct int13_drive *drive );
|
extern void register_int13_drive ( struct int13_drive *drive );
|
||||||
extern void unregister_int13_drive ( struct int13_drive *drive );
|
extern void unregister_int13_drive ( struct int13_drive *drive );
|
||||||
extern int int13_boot ( unsigned int drive );
|
extern int int13_boot ( unsigned int drive );
|
||||||
|
|
|
@ -267,6 +267,27 @@ static int int13_get_parameters ( struct int13_drive *drive,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* INT 13, 41 - Extensions installation check
|
||||||
|
*
|
||||||
|
* @v drive Emulated drive
|
||||||
|
* @v bx 0x55aa
|
||||||
|
* @ret bx 0xaa55
|
||||||
|
* @ret cx Extensions API support bitmap
|
||||||
|
* @ret status Status code
|
||||||
|
*/
|
||||||
|
static int int13_extension_check ( struct int13_drive *drive __unused,
|
||||||
|
struct i386_all_regs *ix86 ) {
|
||||||
|
if ( ix86->regs.bx == 0x55aa ) {
|
||||||
|
DBG ( "INT 13 extensions installation check\n" );
|
||||||
|
ix86->regs.bx = 0xaa55;
|
||||||
|
ix86->regs.cx = INT13_EXTENSION_LINEAR;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return INT13_STATUS_INVALID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INT 13, 42 - Extended read
|
* INT 13, 42 - Extended read
|
||||||
*
|
*
|
||||||
|
@ -357,6 +378,9 @@ static void int13 ( struct i386_all_regs *ix86 ) {
|
||||||
case INT13_GET_PARAMETERS:
|
case INT13_GET_PARAMETERS:
|
||||||
status = int13_get_parameters ( drive, ix86 );
|
status = int13_get_parameters ( drive, ix86 );
|
||||||
break;
|
break;
|
||||||
|
case INT13_EXTENSION_CHECK:
|
||||||
|
status = int13_extension_check ( drive, ix86 );
|
||||||
|
break;
|
||||||
case INT13_EXTENDED_READ:
|
case INT13_EXTENDED_READ:
|
||||||
status = int13_extended_read ( drive, ix86 );
|
status = int13_extended_read ( drive, ix86 );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue