Skip to content
  • Lev Kujawski's avatar
    fd8a68ad
    hw/block/hd-geometry: Do not override specified bios-chs-trans · fd8a68ad
    Lev Kujawski authored
    For small disk images (<4 GiB), QEMU and SeaBIOS default to the
    LARGE/ECHS disk translation method, but it is not uncommon for other
    BIOS software to use LBA in these cases as well.  Some operating
    system boot loaders (e.g., NT 4) do not handle LARGE translations
    outside of fixed configurations.  See, e.g., Q154052:
    
    "When starting an x86 based computer, Ntdetect.com retrieves and
    stores Interrupt 13 information. . . If the disk controller is using a
    32 sector/64 head translation scheme, this boundary will be 1 GB. If
    the controller uses 63 sector/255 head translation [AUTHOR: i.e.,
    LBA], the limit will be 4 GB."
    
    To accommodate these situations, hd_geometry_guess() now follows the
    disk translation specified by the user even when the ATA disk geometry
    is guessed.
    
    hd_geometry_guess():
    * Only set the disk translation when translation is AUTO.
    * Show the soon-to-be active translation (*ptrans) in the trace rather
      than what was guessed.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/56
    Buglink: https://bugs.launchpad.net/qemu/+bug/1745312
    
    
    
    Signed-off-by: default avatarLev Kujawski <lkujaw@member.fsf.org>
    Message-Id: <20220707204045.999544-1-lkujaw@member.fsf.org>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    fd8a68ad
    hw/block/hd-geometry: Do not override specified bios-chs-trans
    Lev Kujawski authored
    For small disk images (<4 GiB), QEMU and SeaBIOS default to the
    LARGE/ECHS disk translation method, but it is not uncommon for other
    BIOS software to use LBA in these cases as well.  Some operating
    system boot loaders (e.g., NT 4) do not handle LARGE translations
    outside of fixed configurations.  See, e.g., Q154052:
    
    "When starting an x86 based computer, Ntdetect.com retrieves and
    stores Interrupt 13 information. . . If the disk controller is using a
    32 sector/64 head translation scheme, this boundary will be 1 GB. If
    the controller uses 63 sector/255 head translation [AUTHOR: i.e.,
    LBA], the limit will be 4 GB."
    
    To accommodate these situations, hd_geometry_guess() now follows the
    disk translation specified by the user even when the ATA disk geometry
    is guessed.
    
    hd_geometry_guess():
    * Only set the disk translation when translation is AUTO.
    * Show the soon-to-be active translation (*ptrans) in the trace rather
      than what was guessed.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/56
    Buglink: https://bugs.launchpad.net/qemu/+bug/1745312
    
    
    
    Signed-off-by: default avatarLev Kujawski <lkujaw@member.fsf.org>
    Message-Id: <20220707204045.999544-1-lkujaw@member.fsf.org>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading