summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-02-06 22:29:07 +0100
committerKevin Wolf <kwolf@redhat.com>2012-02-29 12:48:46 +0100
commitf8d3d128576d2b492c4267083f67671b19edb63a (patch)
tree7325c4fcded8f9ceb6fed3e5681de36838b4dd0b /hw
parenta758f8f415985abc85be1da6d22f0590a74ca23d (diff)
downloadhqemu-f8d3d128576d2b492c4267083f67671b19edb63a.zip
hqemu-f8d3d128576d2b492c4267083f67671b19edb63a.tar.gz
block: add a transfer rate for floppy types
Floppies must be read at a specific transfer rate, depending of its own format. Update floppy description table to include required transfer rate. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fdc.c3
-rw-r--r--hw/pc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index 02ced22..08012f9 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -172,12 +172,13 @@ static void fd_revalidate(FDrive *drv)
{
int nb_heads, max_track, last_sect, ro;
FDriveType drive;
+ FDriveRate rate;
FLOPPY_DPRINTF("revalidate\n");
if (drv->bs != NULL && bdrv_is_inserted(drv->bs)) {
ro = bdrv_is_read_only(drv->bs);
bdrv_get_floppy_geometry_hint(drv->bs, &nb_heads, &max_track,
- &last_sect, drv->drive, &drive);
+ &last_sect, drv->drive, &drive, &rate);
if (nb_heads != 0 && max_track != 0 && last_sect != 0) {
FLOPPY_DPRINTF("User defined disk (%d %d %d)",
nb_heads - 1, max_track, last_sect);
diff --git a/hw/pc.c b/hw/pc.c
index 59a7f39..12c02f2 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -335,6 +335,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
{
int val, nb, nb_heads, max_track, last_sect, i;
FDriveType fd_type[2] = { FDRIVE_DRV_NONE, FDRIVE_DRV_NONE };
+ FDriveRate rate;
BlockDriverState *fd[MAX_FD];
static pc_cmos_init_late_arg arg;
@@ -383,7 +384,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
if (fd[i] && bdrv_is_inserted(fd[i])) {
bdrv_get_floppy_geometry_hint(fd[i], &nb_heads, &max_track,
&last_sect, FDRIVE_DRV_NONE,
- &fd_type[i]);
+ &fd_type[i], &rate);
}
}
}
OpenPOWER on IntegriCloud