VirtualBox

Changeset 47036 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Jul 8, 2013 12:26:47 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87069
Message:

BIOS,DevFdc,DrvBlock: The floppy controller should query the block/host driver for the drive type, or it'll all go real bad if the guest code trusts CMOS/BIOS drive info. Changed the block driver to automatically upgrade the drive type (for fdc and bios/cmos setup only) if the image is larger than the configured drive capacity. Introduced two fake drive types with max capacities, 15.6 MB and 63.5 MB, the first is the max that INT13 can officially access, the second is reinterpreting CL as holding an 8-bit wide sector number and no cylinder bits (which actually seems to be how real bioses work with floppies).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmifs.h

    r46933 r47036  
    894894    /** 2.88MB 3 1/2" floppy drive. */
    895895    PDMBLOCKTYPE_FLOPPY_2_88,
     896    /** Fake drive that can take up to 15.6 MB images.
     897     * C=255, H=2, S=63.  */
     898    PDMBLOCKTYPE_FLOPPY_FAKE_15_6,
     899    /** Fake drive that can take up to 63.5 MB images.
     900     * C=255, H=2, S=255.  */
     901    PDMBLOCKTYPE_FLOPPY_FAKE_63_5,
    896902    /** CDROM drive. */
    897903    PDMBLOCKTYPE_CDROM,
     
    902908} PDMBLOCKTYPE;
    903909
     910/** Check if the given block type is a floppy. */
     911#define PDMBLOCKTYPE_IS_FLOPPY(a_enmType) ( (a_enmType) >= PDMBLOCKTYPE_FLOPPY_360 && (a_enmType) <= PDMBLOCKTYPE_FLOPPY_2_88 )
    904912
    905913/**
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette