diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-05-17 14:24:30 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-05-17 14:24:30 +0000 |
commit | 4da2ba56fe1b5982047a01cd0cc3ed44d3b6952f (patch) | |
tree | f64d31dd09ed71b45fa685a9d6b2754094bf338c /src/VBox/Devices/PC/BIOS/disk.c | |
parent | bae86efb4747592dbfa2c06a845d6a52c7387034 (diff) | |
download | VirtualBox-svn-4da2ba56fe1b5982047a01cd0cc3ed44d3b6952f.tar.gz |
DevACPI: First check input, then take a lock.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@78571 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Devices/PC/BIOS/disk.c')
-rw-r--r-- | src/VBox/Devices/PC/BIOS/disk.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/VBox/Devices/PC/BIOS/disk.c b/src/VBox/Devices/PC/BIOS/disk.c index b2540f3e2e2..84219231d72 100644 --- a/src/VBox/Devices/PC/BIOS/disk.c +++ b/src/VBox/Devices/PC/BIOS/disk.c @@ -161,7 +161,12 @@ int edd_fill_dpt(dpt_t __far *dpt, bio_dsk_t __far *bios_dsk, uint8_t device) dpt->cylinders = bios_dsk->devices[device].pchs.cylinders; dpt->heads = bios_dsk->devices[device].pchs.heads; dpt->spt = bios_dsk->devices[device].pchs.spt; +#if 1 lba = bios_dsk->devices[device].sectors; +#else + // Makes PC DOS 7.1 FDISK32 happy + lba = (uint32_t)dpt->cylinders * dpt->heads * dpt->spt; +#endif dpt->sector_count1 = lba; dpt->sector_count2 = lba >> 32; } @@ -394,10 +399,29 @@ void BIOSCALL int13_harddisk(disk_regs_t r) goto int13_success; break; +#ifdef VBOX_WITH_SCSIz + case 0x06: /* identify SCSI devices */ + if (VBOX_IS_SCSI_DEVICE(device)|| 1) { + BX_INFO("%s: AX=%04x BX=%04x CX=%04x DX=%04x ES=%04x\n", __func__, AX, BX, CX, DX, ES); + BX_INFO("%s: function %02xh detected SCSI drive\n", __func__, GET_AH()); + SET_BH(0); + SET_BL(0); + SET_AL(0x80); + goto int13_success; + } + BX_INFO("%s no SCSI drives, returns fail\n", __func__); + goto int13_fail; + break; +#endif case 0x08: /* read disk drive parameters */ /* Get the logical geometry from internal table. */ +#if 0 + /* Windows 3.1 FastDisk (wdctrl) insists on this */ + nlc = bios_dsk->devices[device].lchs.cylinders - 1; +#else nlc = bios_dsk->devices[device].lchs.cylinders; +#endif nlh = bios_dsk->devices[device].lchs.heads; nlspt = bios_dsk->devices[device].lchs.spt; |