summaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 14:33:24 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 14:33:24 +0000
commit33f002714be2ed58ed05ae3870d5ea6915df4b47 (patch)
tree6b5f907e0c0b42bc6ca4222f1e14462be5e30c1a /hw/fdc.c
parent3e98dc8ec6af89c7f4f1e006b979eb405b431629 (diff)
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index e5f46d086e..d6897654df 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -382,7 +382,7 @@ struct fdctrl_t {
uint8_t cur_drv;
uint8_t bootsel;
/* Command FIFO */
- uint8_t fifo[FD_SECTOR_LEN];
+ uint8_t *fifo;
uint32_t data_pos;
uint32_t data_len;
uint8_t data_state;
@@ -598,6 +598,11 @@ fdctrl_t *fdctrl_init (qemu_irq irq, int dma_chann, int mem_mapped,
fdctrl = qemu_mallocz(sizeof(fdctrl_t));
if (!fdctrl)
return NULL;
+ fdctrl->fifo = qemu_memalign(512, FD_SECTOR_LEN);
+ if (fdctrl->fifo == NULL) {
+ qemu_free(fdctrl);
+ return NULL;
+ }
fdctrl->result_timer = qemu_new_timer(vm_clock,
fdctrl_result_timer, fdctrl);