grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] disk: use maximum number of sectors for LBA


From: ValdikSS
Subject: Re: [PATCH 0/2] disk: use maximum number of sectors for LBA
Date: Fri, 6 Oct 2023 21:34:26 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:78.5.0) Gecko/20100101, Thunderbird/78.5.0

On 05.10.2023 20:53, Vladimir 'phcoder' Serbinenko wrote:
This has a very high risk of breaking existing configs. "Specification allows" doesn't mean that real-world BIOSes actually react well to it. Some BIOS may read just reads 63 instead of 127 sectors and we end up with garbage in this case. I fill it shouldn't come into release. After it we can discuss.

I've checked syslinux code, they also use 127 sector reads in LBA mode.
https://github.com/geneC/syslinux/blob/5e426532210bb830d2d7426eb8d8c154d9dfcba6/core/fs/diskio_bios.c#L349

GRUB has this limit as well, but it is not applied due to other constraints.
https://github.com/rhboot/grub2/blob/10f8ffc133553209ec1ddaadc6f4a8a25d3dea4e/grub-core/disk/i386/pc/biosdisk.c#L434

What can change my mind:
1) Proof that windows does such calls

Windows XP **bootloader** uses single-sector reads with int 13h to read the kernel (just checked with qemu). But the kernel seem to use direct IDE controller method reading.

If you believe that 127 sectors could break things, then this patch could be ignored. It provides only marginal speed-up vs 63 sectors.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]