qemu vl.c hw/omap.c
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Andrzej Zaborowski <balrog> 07/12/04 00:10:35
Modified files:
. : vl.c
hw : omap.c
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.375&r2=1.376
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/omap.c?cvsroot=qemu&r1=1.27&r2=1.28
Quoted 4 lines
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.
This seems the wrong way to solve this problem. The SD emulation should be able to cope with no device being present.
The general case should be a hotplugable interface, with cold-plug interfaces (e.g. IDE harddrives) being the exception.
Paul
Quoted 7 lines · Paul Brook
Quoted 4 lines
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.This seems the wrong way to solve this problem. The SD emulation should be able to cope with no device being present.
The bdrv's represent the concept of "drive" rather than "media", and also in the case the bdrv must be present whenever there is a SD slot, not an SD card (so that monitor command change and eject can be used). I agree that not all machines have an SD slot, as not all machines have a cd-rom drive or floppy drive.
So this needs to be fixed but this commit was a quick fix for the regression from the -drive patch.
Regards
Quoted 6 lines · andrzej zaborowski
Quoted 5 lines · Paul Brook
Quoted 4 lines
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot
with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.
Quoted 8 lines
Quoted 2 lines
This seems the wrong way to solve this problem. The SD emulation should be able to cope with no device being present.
The bdrv's represent the concept of "drive" rather than "media", and also in the case the bdrv must be present whenever there is a SD slot, not an SD card (so that monitor command change and eject can be used). I agree that not all machines have an SD slot, as not all machines have a cd-rom drive or floppy drive.
Right, but I think you're going in the wrong direction. Most scsi interfaces do support hotplug of devices. For USB mass storage the whole controller is hotplug. Pre-allocating all possible devices simply doesn't scale.
Paul
Quoted 16 lines · Paul Brook
Quoted 6 lines · andrzej zaborowski
Quoted 5 lines · Paul Brook
Quoted 4 lines
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot
with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.Quoted 8 lines
Quoted 2 lines
This seems the wrong way to solve this problem. The SD emulation should be able to cope with no device being present.
The bdrv's represent the concept of "drive" rather than "media", and also in the case the bdrv must be present whenever there is a SD slot, not an SD card (so that monitor command change and eject can be used). I agree that not all machines have an SD slot, as not all machines have a cd-rom drive or floppy drive.
Quoted 3 lines
Right, but I think you're going in the wrong direction. Most scsi interfaces do support hotplug of devices. For USB mass storage the whole controller is hotplug. Pre-allocating all possible devices simply doesn't scale.
We don't pre-allocate all possible devices, only the "drives" which are integral part of the machine (as is the case of the SD slot in a Zaurus, soldered to the PCB). New bdrv's can still be added and removed in runtime for hotplugged devices and I have no intetion to change that.
If you want to use the hotplugging-like mechanism for inserting removable media like SD, CD or floppy, that would mean scrapping the whole bdrv_is_removable(), bdrv_is_inserted(), bdrv_media_changed() api.
Regards
Quoted 16 lines · Paul Brook
Quoted 6 lines · andrzej zaborowski
Quoted 5 lines · Paul Brook
Quoted 4 lines
Log message:
Always create an SD bdrv, so that PXA and OMAP boards can boot
with no card inserted again. Eventually SD, CDROM and floppy should all be registered conditionally depending on machine.Quoted 8 lines
Quoted 2 lines
This seems the wrong way to solve this problem. The SD emulation should be able to cope with no device being present.
The bdrv's represent the concept of "drive" rather than "media", and also in the case the bdrv must be present whenever there is a SD slot, not an SD card (so that monitor command change and eject can be used). I agree that not all machines have an SD slot, as not all machines have a cd-rom drive or floppy drive.
Quoted 3 lines
Right, but I think you're going in the wrong direction. Most scsi interfaces do support hotplug of devices. For USB mass storage the whole controller is hotplug. Pre-allocating all possible devices simply doesn't scale.
Hi Paul,
I think Andrzez is doing it correctly.
He only adds an entry in drives_table[] without creating any bdrv (because he doesn't provide file).
Then in omap.c, he creates the device, not the media. And as Palm Tunsgten is the only machine calling omap310_mpu_init(), the device is only created for it. And then he will be able to introduce card (file) in the SD reader.
Laurent
Signature · 3 lines
------------- [email protected] -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke