Add LBA 64bit support for reads beyond 2TB.

When booting from a >2TB drive/filesystem, it's possible what the
kernel/bootloader may be updated and written out at an LBA address
beyond what is normally accessible by the READ(10) SCSI commands.
If this happens to the kernel grub will fail to boot the kernel
as it will call into the BIOS with an LBA address >2TB, and the
BIOS will return an error. Per the SCSI spec, >2TB drives should
return 0XFFFFFFFF, and a READ CAPACITY(16) command should be issued
to determine the full size of the drive, READ(16) commands can then
be used in order to read data at LBA addresses beyond 2TB (64 bit
LBA addresses)

Signed-off-by: Max Tottenham <mtottenh@akamai.com>
Message-ID: <20240125150050.3775834-2-mtottenh@akamai.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2 files changed
tree: b272a5171b796d9e34a793be56611b3afc41ac16
  1. docs/
  2. scripts/
  3. src/
  4. vgasrc/
  5. .gitignore
  6. COPYING
  7. COPYING.LESSER
  8. Makefile
  9. README