|
@@ -207,6 +207,22 @@ static int int13_get_parameters ( struct int13_drive *drive,
|
207
|
207
|
return 0;
|
208
|
208
|
}
|
209
|
209
|
|
|
210
|
+/**
|
|
211
|
+ * INT 13, 15 - Get disk type
|
|
212
|
+ *
|
|
213
|
+ * @v drive Emulated drive
|
|
214
|
+ * @ret ah Type code
|
|
215
|
+ * @ret cx:dx Sector count
|
|
216
|
+ * @ret status Status code / disk type
|
|
217
|
+ */
|
|
218
|
+static int int13_get_disk_type ( struct int13_drive *drive,
|
|
219
|
+ struct i386_all_regs *ix86 ) {
|
|
220
|
+ DBG ( "Get disk type\n" );
|
|
221
|
+ ix86->regs.cx = ( drive->cylinders >> 16 );
|
|
222
|
+ ix86->regs.dx = ( drive->cylinders & 0xffff );
|
|
223
|
+ return INT13_DISK_TYPE_HDD;
|
|
224
|
+}
|
|
225
|
+
|
210
|
226
|
/**
|
211
|
227
|
* INT 13, 41 - Extensions installation check
|
212
|
228
|
*
|
|
@@ -348,6 +364,9 @@ static void int13 ( struct i386_all_regs *ix86 ) {
|
348
|
364
|
case INT13_GET_PARAMETERS:
|
349
|
365
|
status = int13_get_parameters ( drive, ix86 );
|
350
|
366
|
break;
|
|
367
|
+ case INT13_GET_DISK_TYPE:
|
|
368
|
+ status = int13_get_disk_type ( drive, ix86 );
|
|
369
|
+ break;
|
351
|
370
|
case INT13_EXTENSION_CHECK:
|
352
|
371
|
status = int13_extension_check ( drive, ix86 );
|
353
|
372
|
break;
|
|
@@ -361,7 +380,7 @@ static void int13 ( struct i386_all_regs *ix86 ) {
|
361
|
380
|
status = int13_get_extended_parameters ( drive, ix86 );
|
362
|
381
|
break;
|
363
|
382
|
default:
|
364
|
|
- DBG ( "Unrecognised INT 13\n" );
|
|
383
|
+ DBG ( "*** Unrecognised INT 13 ***\n" );
|
365
|
384
|
status = -INT13_STATUS_INVALID;
|
366
|
385
|
break;
|
367
|
386
|
}
|