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

5795 Commits

Author SHA1 Message Date
Michael Brown 3b783d7fd2 [ipv6] Expose IPv6 settings acquired through NDP
Expose the IPv6 address (or prefix) as ${ip6}, the prefix length as
${len6}, and the router address as ${gateway6}.

Originally-implemented-by: Hannes Reinecke <hare@suse.de>
Originally-implemented-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-19 00:13:00 +01:00
Michael Brown ee54ab5be6 [ipv6] Allow settings to comprise arbitrary subsets of NDP options
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-19 00:13:00 +01:00
Michael Brown 0ac874242b [settings] Correctly mortalise autovivified child settings blocks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-19 00:13:00 +01:00
Michael Brown 129206f476 [ipv6] Rename ipv6_scope to dhcpv6_scope
The settings scope ipv6_scope refers specifically to IPv6 settings
that have a corresponding DHCPv6 option.  Rename to dhcpv6_scope to
more accurately reflect this purpose.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-16 12:42:08 +01:00
Michael Brown ecfc81d76f [settings] Create space for IPv6 in settings display order
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-15 17:39:49 +01:00
Michael Brown c53a209a42 [ipv6] Perform SLAAC only during autoconfiguration
We currently perform IPv6 stateless address autoconfiguration (SLAAC)
in response to any router advertisement with the relevant flags set.
This can result in the local IPv6 source address changing midway
through a TCP connection, since our connections bind only to a local
port number and do not store a local network address.

In addition, this behaviour for SLAAC is inconsistent with that for
DHCPv4 and stateful DHCPv6, both of which will be performed only as a
result of an explicit autoconfiguration action (e.g. via the default
autoboot sequence, or the "ifconf" command).

Fix by ignoring router advertisements arriving outside the context of
an ongoing autoconfiguration attempt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-15 15:58:47 +01:00
Michael Brown 517d234031 [intel] Remove duplicate intelvf_mbox_queues() function
Commit db34436 ("[intel] Strip spurious VLAN tags received by virtual
function NICs") accidentally introduced two copies of the
intel[x]vf_mbox_queues() function.  Remove the unintended copy.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-14 13:51:07 +01:00
Michael Brown db3443608f [intel] Strip spurious VLAN tags received by virtual function NICs
The physical function may be configured to transparently insert a VLAN
tag into all transmitted packets.  Unfortunately, it does not
equivalently strip this same VLAN tag from all received packets.  This
behaviour may be observed in some Amazon EC2 instances with Enhanced
Networking enabled: transmissions work as expected but all packets
received by iPXE appear to have a spurious VLAN tag.

We can configure the receive queue to strip VLAN tags via the
RXDCTL.VME bit.  We need to find out from the PF driver whether or not
we should do so.

There exists a "get queue configuration" mailbox message which
contains a field labelled IXGBE_VF_TRANS_VLAN in the Linux driver.

A comment in the Linux PF driver describes this field as "notify VF of
need for VLAN tag stripping, and correct queue".  It will be filled
with a non-zero value if the PF is enforcing the use of a single VLAN
tag.  It will also be filled with a non-zero value if the PF is using
multiple traffic classes.

The Linux VF driver seems to treat this field as being simply the
number of traffic classes, and gives it no VLAN-related
interpretation.  The Linux VF driver instead handles the VLAN tag
stripping by simply assuming that any unrecognised VLAN tag ought to
be silently dropped.

We choose to strip and ignore the VLAN tag if the IXGBE_VF_TRANS_VLAN
field has a non-zero value.

Reported-by: Leonid Vasetsky <leonidv@velostrata.com>
Tested-by: Leonid Vasetsky <leonidv@velostrata.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-12 09:14:41 +01:00
Michael Brown 45dd627689 [ipv4] Send gratuitous ARPs whenever a new IPv4 address is applied
In a busy network (such as a public cloud), IPv4 addresses may be
recycled rapidly.  When this happens, unidirectional traffic (such as
UDP syslog) will succeed, but bidirectional traffic (such as TCP
connections) may fail due to stale ARP cache entries on other nodes.
The remote ARP cache expiry timeout is likely to exceed iPXE's
connection timeout, meaning that boot attempts can fail before the
problem is automatically resolved.

Fix by sending gratuitous ARPs whenever an IPv4 address is changed, to
attempt to update stale remote ARP cache entries.  Note that this is
not a guaranteed fix, since ARP is an unreliable protocol.

We avoid sending gratuitous ARPs unconditionally, since otherwise any
unrelated settings change (e.g. "set dns 192.168.0.1") would cause
unexpected gratuitous ARPs to be sent.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-12 09:01:01 +01:00
Lukas Grossar 23c275bd1e [intel] Add PCI device ID for I219-V/LM
Signed-off-by: Lukas Grossar <lukas.grossar@adfinis-sygroup.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-12 05:51:10 +01:00
Michael Brown df85901768 [acpi] Allow time for ACPI power off to take effect
The ACPI power off sequence may not take effect immediately.  Delay
for one second, to eliminate potentially confusing log messages such
as "Could not power off: Error 0x43902001 (http://ipx".

Reported-by: Leonid Vasetsky <leonidv@velostrata.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-11 21:23:03 +01:00
Michael Brown e19c0a8fd2 [acpi] Add support for ACPI power off
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-11 14:05:18 +01:00
Michael Brown 74222cd2c1 [rng] Check for functioning RTC interrupt
On some platforms (observed in a small subset of Microsoft Azure
(Hyper-V) virtual machines), the RTC appears to be incapable of
generating an interrupt via the legacy PIC.  The RTC status registers
show that a periodic interrupt has been asserted, but the PIC IRR
shows that IRQ8 remains inactive.

On such systems, iPXE will currently freeze during the "iPXE
initialising devices..." message.

Work around this problem by checking that RTC interrupts are being
raised before returning from rtc_entropy_enable().  If no interrupt is
seen within 100ms, then we assume that the RTC interrupt mechanism is
broken.  In these circumstances, iPXE will continue to initialise but
any subsequent attempt to generate entropy will fail.  In particular,
HTTPS connections will fail with an error indicating that no entropy
is available.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-10 20:42:53 +01:00
Laszlo Ersek d6817943d1 [efi] Install the HII config access protocol on a child of the SNP handle
In edk2, there are several drivers that associate HII forms (and
corresponding config access protocol instances) with each individual
network device.  (In this context, "network device" means the EFI
handle on which the SNP protocol is installed, and on which the device
path ending with the MAC() node is installed also.)  Such edk2 drivers
are, for example: Ip4Dxe, HttpBootDxe, VlanConfigDxe.

In UEFI, any given handle can carry at most one instance of a specific
protocol (see e.g. the specification of the InstallProtocolInterface()
boot service).  This implies that the class of drivers mentioned above
can't install their EFI_HII_CONFIG_ACCESS_PROTOCOL instances on the
SNP handle directly -- they would conflict with each other.
Accordingly, each of those edk2 drivers creates a "private" child
handle under the SNP handle, and installs its config access protocol
(and corresponding HII package list) on its child handle.

The device path for the child handle is traditionally derived by
appending a Hardware Vendor Device Path node after the MAC() node.
The VenHw() nodes in question consist of a GUID (by definition), and
no trailing data (by choice).  The purpose of these VenHw() nodes is
only that all the child nodes can be uniquely identified by device
path.

At the moment iPXE does not follow this pattern.  It doesn't run into
a conflict when it installs its EFI_HII_CONFIG_ACCESS_PROTOCOL
directly on the SNP handle, but that's only because iPXE is the sole
driver not following the pattern.  This behavior seems risky (one
might call it a "latent bug"); better align iPXE with the edk2 custom.

Cc: Michael Brown <mcb30@ipxe.org>
Cc: Gary Lin <glin@suse.com>
Cc: Ladi Prosek <lprosek@redhat.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13494/focus=13532
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ladi Prosek <lprosek@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-08 14:16:32 +01:00
Michael Brown 5430465185 [profile] Allow profiling to be globally enabled or disabled
As with assertions, profiling is enabled for objects built with any
debug level (including an explicit debug level of zero).

Allow profiling to be globally enabled or disabled by adding PROFILE=1
or PROFILE=0 respectively to the build command line.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-05 13:49:51 +01:00
Michael Brown 46719f2264 [libc] Allow assertions to be globally enabled or disabled
Assertions are enabled for objects built with any debug level
(including an explicit debug level of zero).  It is sometimes useful
to be able to enable assertions across all objects; this currently
requires manually hacking include/assert.h.

Allow assertions to be globally enabled by adding ASSERT=1 to the
build command line.  For example:

  make bin/8086100e.mrom ASSERT=1

Similarly, allow assertions to be globally disabled by adding ASSERT=0
to the build command line.  If no ASSERT=... is specified on the
build command line, then only objects mentioned in DEBUG=... will have
assertions enabled (as is currently the case).

Note than globally enabling assertions imposes a relatively heavy
runtime penalty, primarily due to the various sanity checks performed
by list_add(), list_for_each_entry(), etc.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-05 13:28:51 +01:00
Michael Brown 6e1ce52d14 [debug] Allow debug messages to be initially disabled at runtime
Extend the DEBUG=... syntax to allow debug messages to be compiled in
but disabled by default.  For example:

  make bin/undionly.kpxe DEBUG=netdevice:3:1

would compile in the messages as for DEBUG=netdevice:3, but would set
the debug level mask so that only the DEBUG=netdevice:1 messages would
be displayed.

This allows for external code to selectively enable the additional
debug messages at runtime, without being overwhelmed by unwanted
initial noise.  For example, a developer of a new protocol may want to
temporarily enable tracing of all packets received: this can be done
by building with DEBUG=netdevice:3:1 and using

  // temporarily enable per-packet messages
  DBG_ENABLE_OBJECT ( netdevice, DBGLVL_EXTRA );
  ...
  // disable per-packet messages
  DBG_DISABLE_OBJECT ( netdevice, DBGLVL_EXTRA );

Note that unlike the usual DBG_ENABLE() and DBG_DISABLE() macros,
DBG_ENABLE_OBJECT() and DBG_DISABLE_OBJECT() will not be removed via
dead code elimination if debugging is disabled in the specified
object.  In particular, this means that using either of these macros
will always result in a symbol reference to the specified object.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-05 12:34:15 +01:00
Michael Brown e2c0a20d60 [debug] Allow per-object runtime enabling/disabling of debug messages
The DBG_ENABLE() and DBG_DISABLE() macros currently affect the debug
level of all objects that were built with debugging enabled.  This is
undesirable, since it is common to use different debug levels in each
object.

Make the debug level mask a per-object variable.  DBG_ENABLE() and
DBG_DISABLE() now control only the debug level for the containing
object (which is consistent with the intended usage across the
existing codebase).  DBG_ENABLE_OBJECT() and DBG_DISABLE_OBJECT() may
be used to control the debug level for a specified object.  For
example:

  // Enable DBG() messages from tcpip.c
  DBG_ENABLE_OBJECT ( tcpip, DBGLVL_LOG );

Note that the existence of debug messages continues to be gated by the
DEBUG=... list specified on the build command line.  If an object was
built without the relevant debug level, then DBG_ENABLE_OBJECT() will
have no effect on that object at runtime (other than to explicitly
drag in the object via a symbol reference).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-05 10:27:22 +01:00
Michael Brown 55f7a675d6 [iscsi] Treat redirection failures as fatal
Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 16:20:07 +01:00
Michael Brown 89c6db838f [downloader] Treat redirection failures as fatal
Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 16:20:01 +01:00
Michael Brown 5e2a7481ad [xfer] Send intf_close() if redirection fails
A redirection failure is fatal, but provides no opportunity for the
caller of xfer_[v]redirect() to report the failure since the interface
will already have been disconnected.  Fix by sending intf_close() from
within the default xfer_vredirect() handler.

Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 16:14:46 +01:00
Michael Brown aeb6203811 [dhcp] Automatically generate vendor class identifier string
The vendor class identifier strings in DHCP_ARCH_VENDOR_CLASS_ID are
out of sync with the (correct) client architecture values in
DHCP_ARCH_CLIENT_ARCHITECTURE.

Fix by removing all definitions of DHCP_ARCH_VENDOR_CLASS_ID, and
instead generating the vendor class identifier string automatically
based on DHCP_ARCH_CLIENT_ARCHITECTURE and DHCP_ARCH_CLIENT_NDI.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 15:07:05 +01:00
Michael Brown d7f1834b5e [dhcpv6] Include vendor class identifier option in DHCPv6 requests
RFC3315 defines DHCPv6 option 16 (vendor class identifier) but does
not define any direct relationship with the roughly equivalent DHCPv4
option 60.

The PXE specification predates IPv6, and the UEFI specification is
expectedly vague on the subject.  Examination of the reference EDK2
codebase suggests that the DHCPv6 vendor class identifier will be
formatted in accordance with RFC3315, using a single vendor-class-data
item in which the opaque-data field is the string as would appear in
DHCPv4 option 60.

RFC3315 requires the vendor class identifier to specify an IANA
enterprise number, as a way of disambiguating the vendor-class-data
namespace.  The EDK2 code uses the value 343, described as:

    // TODO: IANA TBD: temporarily using Intel's

Since this "TODO" has been present since at least 2010, it is probably
safe to assume that it has now become a de facto standard.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 14:08:26 +01:00
Michael Brown fda8916c83 [dhcpv6] Include RFC5970 client architecture options in DHCPv6 requests
RFC5970 defines DHCPv6 options 61 (client system architecture type)
and 62 (client network interface identifier), with contents equivalent
to DHCPv4 options 93 and 94 respectively.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 13:18:49 +01:00
Michael Brown 3d9f094022 [dhcp] Allow for variable encapsulation of architecture-specific options
DHCPv4 and DHCPv6 share some values in common for the architecture-
specific options (such as the client system architecture type), but
use different encapsulations: DHCPv4 has a single byte for the option
length while DHCPv6 has a 16-bit field for the option length.

Move the containing DHCP_OPTION() and related wrappers from the
individual dhcp_arch.h files to dhcp.c, thus allowing for the
architecture-specific values to be reused in dhcpv6.c.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 13:15:05 +01:00
Michael Brown 3bb61c33c2 [pxe] Disable interrupts on the PIC before starting NBP
Some BIOSes (observed with an HP Gen9) seem to spuriously enable
interrupts at the PIC.  This causes problems with NBPs such as GRUB
which use the UNDI API (thereby enabling interrupts on the NIC)
without first hooking an interrupt service routine.  In this
situation, the interrupt will end up being handled by the default BIOS
ISR, which will typically just send an EOI and return.  Since nothing
in this handler causes the NIC to deassert the interrupt, this will
result in an interrupt storm.

Entertainingly, some BIOSes are immune to this problem because the
default ISR sends the EOI only to the slave PIC; this effectively
disables the interrupt.

Work around this problem by disabling the interrupt on the PIC before
invoking the PXE NBP.  An NBP that expects to make use of interrupts
will need to be configuring the PIC anyway, so it is probably safe to
assume that it will explicitly reenable the interrupt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-03 12:52:20 +01:00
Michael Brown c22da4b8ba [bios] Do not enable interrupts when printing to the console
There seems to be no reason for the sti/cli pair used around each call
to INT 10.  Remove these instructions, so that printing debug messages
from within an ISR does not temporarily reenable interrupts.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-03 12:50:19 +01:00
Michael Brown c9f6a86059 [efi] Fix uninitialised data in HII IFR structures
The HII IFR structures are allocated via realloc() rather than
zalloc(), and so are not automatically zeroed.  This results in the
presence of uninitialised and invalid data, causing crashes elsewhere
in the UEFI firmware.

Fix by explicitly zeroing the newly allocated portion of any IFR
structure in efi_ifr_op().

Debugged-by: Laszlo Ersek <lersek@redhat.com>
Debugged-by: Gary Lin <glin@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-29 15:17:12 +01:00
Michael Brown 0418631918 [thunderx] Fix compilation with older versions of gcc
Remove redundant duplicate typedef which causes a build failure on
older gcc versions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-22 12:07:55 +01:00
Michael Brown 632e57f0f3 [efi] Do not copy garbage bytes into SNP device path MAC address
The SNP device path includes the network device's MAC address within
the MAC_ADDR_DEVICE_PATH.MacAddress field.  We check that the
link-layer address will fit within this field, and then perform the
copy using the length of the destination buffer.

At 32 bytes, the MacAddress field is actually larger than the current
maximum iPXE link-layer address.  The copy therefore overflows the
source buffer, resulting in trailing garbage bytes being appended to
the device path's MacAddress.  This is invisible in debug messages,
since the DevicePathToText protocol will render only the length
implied by the interface type.

Fix by copying only the actual length of the link-layer address (which
we have already verified will not overflow the destination buffer).

Debugged-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-22 09:07:20 +01:00
Michael Brown 694c18addc [efi] Report failures to stop the EFI timer tick event
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-20 16:08:17 +01:00
Michael Brown c9176878ef [smsc75xx] Allow up to 100ms for reset to complete
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-20 14:26:37 +01:00
Ladi Prosek 040aa980d6 [virtio] Fix virtio-pci logging
iPXE debug logging doesn't support %u.  This commit replaces it with
%d in virtio-pci debug format strings.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-20 14:23:53 +01:00
Ladi Prosek fbbc895442 [virtio] Renumber virtio_pci_region flags
Some of the regions may end up being unmapped, either because they are
optional or because the attempt to map them has failed.  Region types
starting at 0 didn't make it easy to test for this condition.

This commit bumps all valid region types up by 1 with 0 having the
implicit 'unmapped' meaning.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-20 14:20:21 +01:00
Michael Brown 25ae251dd9 [thunderx] Retrieve base MAC address via EFI_THUNDER_CONFIG_PROTOCOL
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-18 19:28:38 +01:00
Michael Brown 8f0bec4346 [efi] Include VLAN in SNP device path if applicable
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-18 18:45:18 +01:00
Christian Nilsson ec992b97c2 [intel] Add PCI device ID for another I219-LM
Tested-by: Kuniyasu Suzaki <k.suzaki@aist.go.jp>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-16 11:42:24 +01:00
Michael Brown cf52436c71 [thunderx] Fix channel configuration for VNICs 1-7
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-15 20:32:06 +01:00
Michael Brown 4775dd3835 [thunderx] Add driver for Cavium ThunderX SoC NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 18:41:26 +01:00
Michael Brown 3c61e11fe1 [cmdline] Add "ntp" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 15:57:16 +01:00
Michael Brown fce6117ad9 [ntp] Add simple NTP client
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 15:55:49 +01:00
Michael Brown e6111c1517 [time] Allow system clock to be adjusted at runtime
Provide a mechanism to allow an arbitrary adjustment to be applied to
all subsequent calls to time().

Note that the underlying clock source (e.g. the RTC clock) will not be
changed; only the time as reported within iPXE will be affected.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 15:29:05 +01:00
Leendert van Doorn 02d5cfff22 [tg3] Add missing memory barrier
ARM64 has a weaker memory order model than x86.  The missing memory
barrier caused phy initialization notification to be delayed beyond
the link-wait timeout (15 secs).

Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 15:14:43 +01:00
Michael Brown 188789eb3c [tcp] Send TCP keepalives on idle established connections
In some circumstances, intermediate devices may lose state in a way
that temporarily prevents the successful delivery of packets from a
TCP peer.  For example, a firewall may drop a NAT forwarding table
entry.

Since iPXE spends most of its time downloading files (and hence purely
receiving data, sending only TCP ACKs), this can easily happen in a
situation in which there is no reason for iPXE's TCP stack to generate
any retransmissions.  The temporary loss of connectivity can therefore
effectively become permanent.

Work around this problem by sending TCP keepalives after a period of
inactivity on an established connection.

TCP keepalives usually send a single garbage byte in sequence number
space that has already been ACKed by the peer.  Since we do not need
to elicit a response from the peer, we instead send pure ACKs (with no
garbage data) in order to keep the transmit code path simple.

Originally-implemented-by: Ladi Prosek <lprosek@redhat.com>
Debugged-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 09:58:32 +01:00
Leendert van Doorn 5c2a959a72 [tg3] Fix address truncation bug on 64-bit machines
Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-10 15:45:19 +01:00
Michael Brown b42e71921f [http] Accept headers with no whitespace following the colon
Reported-by: Raphael Cohn <raphael.cohn@stormmq.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-09 12:27:04 +01:00
Michael Brown f76210961c [pci] Support systems with multiple PCI root bridges
Extend the 16-bit PCI bus:dev.fn address to a 32-bit seg🚌dev.fn
address, assuming a segment value of zero in contexts where multiple
segments are unsupported by the underlying data structures (e.g. in
the iBFT or BOFM tables).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-09 09:36:28 +01:00
Michael Brown 2c197517f2 [libc] Always use a non-zero seed for the (non-crypto) RNG
The non-cryptographic RNG implemented by random() has the property
that a seed value of zero will result in a generated sequence of
all-zero values.  This situation can arise if currticks() returns zero
at start of day.

Work around this problem by falling back to a fixed non-zero seed if
necessary.

This has no effect on the separate DRBG used by cryptographic code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-09 08:44:32 +01:00
Vinson Lee f6e8b800be [build] Remove nested "my" declaration
Fix build error with perl >= 5.23.2:

  Can't redeclare "my" in "my" at ./util/parserom.pl line 160

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-03 18:09:54 +01:00
Michael Brown aa4b038c70 [efi] Expose DHCP packets via the Apple NetBoot protocol
Mac OS X uses non-standard EFI protocols to obtain the DHCP packets
from the UEFI firmware.

Originally-implemented-by: Michael Kuron <m.kuron@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-05-29 13:10:14 +01:00