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

28 Commits

Author SHA1 Message Date
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown fa410e0a41 [pxe] Modularise PXE API provision
Use the linker table infrastructure to dispatch PXE API calls to the
relevant function.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-11 02:27:58 +00:00
Michael Brown 61944ed602 [pxe] Tidy up debugging output
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-08 02:56:46 +00:00
Michael Brown faf50e8fa3 [pxe] Check for a valid PXE network device when applicable
Very nasty things can happen if a NULL network device is used.  Check
that pxe_netdev is non-NULL at the applicable entry points, so that
this type of problem gets reported to the caller rather than being
allowed to crash the system.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-08 02:35:23 +00:00
Michael Brown 524349c559 [pxe] Improve pxe_undi debugging messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-14 12:48:15 +00:00
Michael Brown a667bf044a [netdevice] Allow link layer to report broadcast/multicast packets via pull()
Allow the link layer to directly report whether or not a packet is
multicast or broadcast at the time of calling pull(), rather than
relying on heuristics to determine this at a later stage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 18:48:46 +01:00
Michael Brown 0d277724a9 [pxe] Report an IRQ number only if device supports interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-10 18:25:24 +00:00
Michael Brown 025b1cb3f8 [pxe] Report SUPPORTED_IRQ only if device supports interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:18:15 +00:00
Michael Brown f8a82c7d23 [pxe] Set correct PktType in PXENV_UNDI_ISR
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:10:35 +00:00
Michael Brown 0620429785 [pxe] Avoid touching fields that may not exist in PXENV_UNDI_GET_NIC_TYPE
Earlier versions of the PXE specification do not have the SubVendor_ID
and SubDevice_ID fields, and some NBPs may not provide space for them.
Avoid overwriting the contents of these fields, just in case.

This is similar to the problem with the BufferLimit field in
PXENV_GET_CACHED_INFO.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:09:49 +00:00
Michael Brown 69d1e6cf57 [pxe] Use network device receive queue freezing
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-20 16:51:05 +00:00
Michael Brown fb78d086f1 [pxe] Always allow MAX_LL_HEADER_LEN for the link-layer header
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-19 16:08:05 +00:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Michael Brown 9acf442c20 [pxe] Avoid potential interrupt storms when using shared interrupts
Current gPXE code always returns "OURS" in response to
PXENV_UNDI_ISR:START.  This is harmless for non-shared interrupt
lines, and avoids the complexity of trying to determine whether or not
we really did cause the interrupt.  (This is a non-trivial
determination; some drivers don't have interrupt support and hook the
system timer interrupt instead, for example.)

A problem occurs when we have a shared interrupt line, the other
device asserts an interrupt, and the controlling ISR does not chain to
the other device's ISR when we return "OURS".  Under these
circumstances, the other device's ISR never executes, and so the
interrupt remains asserted, causing an interrupt storm.

Work around this by returning "OURS" if and only if our net device's
interrupt is currently recorded as being enabled.  Since we always
disable interrupts as a result of a call to PXENV_UNDI_ISR:START, this
guarantees that we will eventually (on the second call) return "NOT
OURS", allowing the other ISR to be called.  Under normal operation,
including a non-shared interrupt situation, this change will make no
difference since PXENV_UNDI_ISR:START would be called only when
interrupts were enabled anyway.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-23 01:39:52 +00:00
Michael Brown 88e436376c [netdevice] Add netdev_is_open() wrapper function
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-23 00:46:35 +00:00
Michael Brown 4eab5bc8ca [netdevice] Allow the hardware and link-layer addresses to differ in size
IPoIB has a 20-byte link-layer address, of which only eight bytes
represent anything relating to a "hardware address".

The PXE and EFI SNP APIs expect the permanent address to be the same
size as the link-layer address, so fill in the "permanent address"
field with the initial link layer address (as generated by
register_netdev() based upon the real hardware address).
2009-08-12 00:23:38 +01:00
Michael Brown 37a0aab4ff [netdevice] Separate out the concept of hardware and link-layer addresses
The hardware address is an intrinsic property of the hardware, while
the link-layer address can be changed at runtime.  This separation is
exposed via APIs such as PXE and EFI, but is currently elided by gPXE.

Expose the hardware and link-layer addresses as separate properties
within a net device.  Drivers should now fill in hw_addr, which will
be used to initialise ll_addr at the time of calling
register_netdev().
2009-08-12 00:19:14 +01:00
Michael Brown 2b9f7f042c [pxe] Avoid printf format warning on some compilers
Tested-by: Joshua Oreman <oremanj@xenon.get-linux.org>
2009-08-02 22:45:24 +01:00
Michael Brown d09290161e [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocol
IPoIB has a link-layer broadcast address that varies according to the
partition key.  We currently go through several contortions to pretend
that the link-layer address is a fixed constant; by making the
broadcast address a property of the network device rather than the
link-layer protocol it will be possible to simplify IPoIB's broadcast
handling.
2009-07-17 23:02:48 +01:00
Michael Brown c26a38b313 [pxe] Update UNDI transmit count before transmitting packet
It is possible that the UNDI ISR may be triggered before netdev_tx()
returns control to pxenv_undi_transmit().  This means that
pxenv_undi_isr() may see a zero undi_tx_count, and so not check for TX
completions.  This is not a significant problem, since it will check
for TX completions on the next call to pxenv_undi_isr() anyway; it
just means that the NBP will see a spurious IRQ that was apparently
caused by nothing.

Fix by updating the undi_tx_count before calling netdev_tx(), so that
pxenv_undi_isr() can decrement it and report the TX completion.
2009-06-27 16:36:21 +01:00
Michael Brown f186ada2d3 [pxe] Implement PXENV_UNDI_{GET,SET}_MCAST_ADDRESS
Symantec Ghost requires working multicast support.  gPXE configures
all (sufficiently supported) network adapters into "receive all
multicasts" mode, which means that PXENV_UNDI_SET_MCAST_ADDRESS is
actually a no-op, but the current implementation returns
PXENV_STATUS_UNSUPPORTED instead.

Fix by making PXENV_UNDI_SET_MCAST_ADDRESS return success.  For good
measure, also implement PXENV_UNDI_GET_MCAST_ADDRESS, since the
relevant functionality is now exposed by the net device core.

Note that this will silently fail if the gPXE driver for the NIC being
used fails to configure the NIC in "receive all multicasts" mode.
2009-06-27 15:46:06 +01:00
Michael Brown 9580f9d5cd [pxe] Improve pxe_undi debug messages
The PXE debugging messages have remained pretty much unaltered since
Etherboot 5.4, and are now difficult to read in comparison to most of
the rest of gPXE.

Bring the pxe_undi debug messages up to normal gPXE standards.
2009-06-27 14:43:10 +01:00
Michael Brown 4fe1e08a60 [pxe] Fix interoperability with the Symantec (undipd) DOS UNDI driver
The Symantec UNDI DOS driver fails when run on top of gPXE because we
return our interface type as "gPXE" rather than one of the predefined
NDIS interface type strings.

Fix by returning the standard "DIX+802.3" string; this isn't
necessarily always accurate, but it's highly unlikely that anything
trying to use the UNDI API would understand our IPoIB link-layer
pseudo-header anyway.
2009-06-23 22:56:21 +01:00
Michael Brown 0b922595fe [pxe] Fix interoperability with the Intel DOS UNDI driver
The Intel DOS UNDI driver fails when run on top of gPXE because we do
not fill in the ServiceFlags field in PXENV_UNDI_GET_IFACE_INFO.

Fix by filling in the ServiceFlags field with reasonable values
indicating our approximate feature capabilities.
2009-06-23 22:42:55 +01:00
Michael Brown 4f881ae352 [pxe] Fix interoperability with the 3Com DOS UNDI driver
The 3Com DOS UNDI driver fails when run on top of gPXE for two
reasons: firstly because PXENV_UNDI_SET_PACKET_FILTER is unsupported,
and secondly because gPXE enters the NBP without enabling interrupts
on the NIC, and the 3Com driver never calls PXENV_UNDI_OPEN.

Fix by always returning success from PXENV_UNDI_SET_PACKET_FILTER
(which is no worse than the current situation, since we already ignore
the receive packet filter in PXENV_UNDI_OPEN), and by forcibly
enabling interrupts on the NIC within PXENV_UNDI_TRANSMIT.  The latter
is something of a hack, but avoids the need to implement a complete
base-code ISR that we would otherwise need if we were to enter the NBP
with interrupts enabled.
2009-06-23 21:54:50 +01:00
Joshua Oreman eb3ca2a36f [netdevice] Add netdev argument to link-layer push and pull handlers
In order to construct outgoing link-layer frames or parse incoming
ones properly, some protocols (such as 802.11) need more state than is
available in the existing variables passed to the link-layer protocol
handlers. To remedy this, add struct net_device *netdev as the first
argument to each of these functions, so that more information can be
fetched from the link layer-private part of the network device.

Updated all three call sites (netdevice.c, efi_snp.c, pxe_undi.c) and
both implementations (ethernet.c, ipoib.c) of ll_protocol to use the
new argument.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-06-23 10:41:57 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 446b6d5fdd [pxe] Move all PXE files to arch/i386
The initial PXE implementation in Etherboot had the goal of being
architecture-agnostic, but this goal has not been realised.
2008-11-18 22:27:02 +00:00