[syslinux] Measuring boot time

Gene Cumm gene.cumm at gmail.com
Sat Oct 10 12:22:21 PDT 2015


> ----- Original Message -----
> From: Gene Cumm <gene.cumm at gmail.com>
> To: Tal Lubko <tallubko at yahoo.com>
> Cc: For discussion of Syslinux and tftp-hpa <syslinux at zytor.com>; Geert Stappers <stappers at stappers.nl>
> Sent: Tuesday, October 6, 2015 1:15 PM
> Subject: Re: [syslinux] Measuring boot time
>
> On Mon, Oct 5, 2015 at 5:08 PM, Geert Stappers via Syslinux
> <syslinux at zytor.com> wrote:
>> On Mon, Oct 05, 2015 at 08:36:17PM +0000, Tal Lubko via Syslinux wrote:
>>> Hi
>>> Some time ago I wrote this mailing list about some extra time that it
>>> takes for my system to boot
>>
>> And meanwhile there where many, many e-mail on this mailinglist.
>> So thank you for bringing another (good) reason to reply _below_ the text.
>
> This becomes more evident when you attempt to read the mailing list
> archive.  It reads like a clean story.  Conversation view helps
> subscribers (like mysefl) but it's still easier to read _in_ the
> context.
>
>>> and I don't know where it came from.
>>
>> Yes, please elaborate.
>>
>>
>>> I'm using a custom BIOS which loads at 1 second and now I've found out
>>> that it takes for the bootloader and OS an extra 1 second to load when
>>> keyboard is disconnected.I got from the BIOS engineer the following
>>> explanation and steps to take:
>
>>> In syslinux make sure that it doesn???t use the KBC at all.
>>> KBC functions will timeout when a KBC is not present.
>>> GATEA20 (address line A20 wrap around 8086 compatibility gate) must
>>> not be controlled by KBC as first option. No menu stuff or something
>>> needing keyboard should be used.
>
> This makes a lot of sense.  Systems without a keyboard and/or keyboard
> controller are relatively rare although it feels like increasing in
> popularity.  I merged a commit resolving a similar issue for EFI last
> month.
>
>
>>> The GATEA20 should be enabled as follows:
>>>
>>> 1) Test if A20 is already enabled. If enabled goto 7.
>>> 2) Do BIOS int 0x15 function 0x2401 to enable GATEA20.
>>> 3) Test if A20 is enabled. If enabled go to 7.
>>> 4) Do port 0x92 (FASTA20) enable.
>>> 5) Test if A20 is enabled. If enabled go to 7.
>>> 6) Error!!
>>> 7) A20 is enabled. Done.
>
>>> However, I'm not sure what's the best way to do that.I've seen that
>>> there is GATEA20 related code only in GPXE branch but I'm not using
>>> GPXE.
>
>>> Any suggestions?
>>
>> Another BIOS???
>
> If this is the BIOS engineer's answer, I'm lead to believe the
> attempts to drain the keyboard controller's buffer are slowing you
> down.  This code would be early in execution and could be ASM or C.
>
> --
> -Gene



On Fri, Oct 9, 2015 at 10:37 AM, Tal Lubko <tallubko at yahoo.com> wrote:
> Hi Gene
>
> Thanks for your help.
> I haven't found quoted reply option in Yahoo mail.
> Maybe its time to switch to another mail provider...

Or how you connect to Yahoo.

> Can you point to the commit you've submitted (the one you've wrote about)?

73bb3701

> I found the following file core/pm.inc which deals with the a20 gate.
> I've deleted a20_kbc, .kbc_wait and .kbc_wait_loop.

What did you observe when you did so?

> According to documentation there its purpose is to "Enable the keyboard controller A20 gate".
> I don't think that this are the attempts to drain the keyboard controller's buffer (which is why there is slow down according to what you said).

I'm guessing the part about enabling A20 is that some old hardware
didn't initialize the keyboard properly and this was done to allow
some input.

> Can you point me out to where it is done?
> I think it may be the function bios_pollchar in core/conio.c but I'm not sure.

If I recall, it's in the Linux kernel loader or some loader common
code or it's just before the "boot:" prompt appears.  It's been a
while since I looked and don't immediately recall where.

> If it is OK I have another question.
> In order to measure BIOS up time and SYSLINUX up time I need of course to take a sample at the bootloader beginning.
> What is the bootloader beginning?

The jump to the bootloader at 0000:7C00 in core/diskstart.inc for SYSLINUX.

> I take it in the com32 module I've written but it probably being called after some initialization is already done.
>
> Thanks again for your help.

-- 
-Gene


More information about the Syslinux mailing list