david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

4 Commits

Author SHA1 Message Date
Michael Brown 302f1eeb80 [time] Allow timer to be selected at runtime
Allow the active timer (providing udelay() and currticks()) to be
selected at runtime based on probing during the INIT_EARLY stage of
initialisation.

TICKS_PER_SEC is now a fixed compile-time constant for all builds, and
is independent of the underlying clock tick rate.  We choose the value
1024 to allow multiplications and divisions on seconds to be converted
to bit shifts.

TICKS_PER_MS is defined as 1, allowing multiplications and divisions
on milliseconds to be omitted entirely.  The 2% inaccuracy in this
definition is negligible when using the standard BIOS timer (running
at around 18.2Hz).

TIMER_RDTSC now checks for a constant TSC before claiming to be a
usable timer.  (This timer can be tested in KVM via the command-line
option "-cpu host,+invtsc".)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-01-26 08:17:37 +00:00
Michael Brown 8af8886d0a [stp] Fix incorrectly disambiguated errors
The three nominally-disambiguated ENOTSUP errors accidentally all used
the same error disambiguator, rendering them identical.  Fix by
changing all three values.  We avoid reusing the 0x01 disambiguator
value, since that remains ambiguous in older binaries.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-01-14 12:39:35 +00:00
Michael Brown 94dbfb4374 [stp] Fix interpretaton of hello time
Times in STP packets are expressed in units of 1/256 of a second.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-06-25 17:32:24 +01:00
Michael Brown fb28c4a979 [stp] Add support for detecting Spanning Tree Protocol non-forwarding ports
A fairly common end-user problem is that the default configuration of
a switch may leave the port in a non-forwarding state for a
substantial length of time (tens of seconds) after link up.  This can
cause iPXE to time out and give up attempting to boot.

We cannot force the switch to start forwarding packets sooner, since
any attempt to send a Spanning Tree Protocol bridge PDU may cause the
switch to disable our port (if the switch happens to have the Bridge
PDU Guard feature enabled for the port).

For non-ancient versions of the Spanning Tree Protocol, we can detect
whether or not the port is currently forwarding and use this to inform
the network device core that the link is currently blocked.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-06-25 16:58:38 +01:00