On Tue, Jan 30, 2024 at 10:34:33PM +0300, ValdikSS via Grub-devel wrote: > Increase the value from 63 to speed up reading process. > > This commit increases two limits: the low-level int 13h reading code > and a high-level reading code with disk cache. > The disk cache imposes an overall limitation of a higher-layer reading > code. The original comment regarding 16K is incorrect, it was > 512<<6 = 32768, and now it is 512<<7 = 65536. > > According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA > read using IBM/MS INT13 Extensions is 127 sectors due to the > limitations of some BIOSes. > GRUB [already enforced][3] the limit, but it was no-op due to other > constraints. This value is also used in [syslinux][4]. > > As we're now reading up to 127 sectors of 512 bytes, we need to be able > to store in the cache up to 65024 bytes. Without this change, GRUB > wouldn't try to read more than 64 sectors at once > (even if the lower reading layer allows it). > > [1]: > https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive > [2]: > https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode > [3]: > https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430 > [4]: > https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349 > > Signed-off-by: ValdikSS <i...@valdikss.org.ru>
Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel