[syslinux] "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
Patrick Masotta
masottaus at yahoo.com
Wed Mar 2 14:47:54 PST 2016
>
> There are quite a few; primarily we simply cannot make lwIP
> (lpxelinux.0) work without it. However, pxelinux.0 should not depend on
> this.
I'm finding most of the problems on lpxelinux.0
>
>Now, tickful timekeeping is wasteful, but this is a bootloader, and
>functionality is the main concern. The "tickless" version still
>depended on the BIOS tick.
>
Not really, a virtual environment can easily emulate the BIOS_timer at 0x046C
but it has problems emulating a "real" timer interrupt to be hooked...
That's the real problem.
Just testing I have replaced the timing functions
#define BIOS_timer 0x046C // Timer ticks
typedef uint32_t jiffies_t;
extern volatile jiffies_t __jiffies, __ms_timer;
static inline jiffies_t jiffies(void)
{
return (*(volatile uint32_t *)BIOS_timer);
}
typedef uint32_t mstime_t;
typedef int32_t mstimediff_t;
static inline mstime_t ms_timer(void)
{
return ((*(volatile uint32_t *)BIOS_timer) * 55);
}
lpxelinux.0 hangs while legacy works OK.
I think we should not depend on hoking timer interrupts if we want to be compatible with virtual environments.
Best,
Patrick
More information about the Syslinux
mailing list