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 19:24:11 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:78.5.0) Gecko/20100101, Thunderbird/78.5.0

On 05.10.2023 22:09, Glenn Washburn wrote:
GRUB2 limits number of sectors read at once in LBA mode to the
number reported in CHS disk geometry by BIOS.
This is unnecessary, as IBM/MS INT13 Extensions allows reading
up to 127 sectors in a single call.

Please provide more documentation for this. Wikipedia[1] suggests that
IBM/MS INT13 Extensions allows reading up to 64K sectors in a single
call. But that "some Phoenix BIOSes are limited to a maximum of 127
sectors". So the above seems misleading.

Rephrased as "upper safe value for LBA read". Check v2.


This fixes greatly increased boot times on WYSE C10LE x86 thin
client with Phoenix bios.

See: https://lists.gnu.org/archive/html/grub-devel/2023-07/msg00001.html

First, this seems risky to me to be added for the release.  Why do we
believe that some other bios doesn't have a limit less than 127?

I've checked Wikipedia and OSDev, as well as Russian forum (don't remember which), and tested on two of my old machines with Phoenix and Award BIOS.

syslinux also limits to 127 if EBIOS is detected:

        hard_max_transfer = 63;
        ...
        if (!(oreg.eflags.l & EFLAGS_CF) &&
            oreg.ebx.w[0] == 0xaa55 && (oreg.ecx.b[0] & 1)) {
            ebios = true;
            hard_max_transfer = 127;

https://github.com/geneC/syslinux/blob/5e426532210bb830d2d7426eb8d8c154d9dfcba6/core/fs/diskio_bios.c#L349

That's why I assume it should be safe to enable.


Also, based on reading the email in the link above, am I correct in
concluding that your bios set the CHS values returned in
grub_biosdisk_rw_int13_extensions() from the values in the MBR?

Yes, this is correct.


Glenn

[1]
https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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