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

3600 Commits

Author SHA1 Message Date
Masroor Vettuparambil aa69bf84d2 [vxge] Add support for new function mode "multi-function 8 Direct IO"
Support a new function mode "multi-function 8 Direct IO" which is used
in ESX Direct I/O configuration.

Update driver version to 3.5.0.1

Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@exar.com>
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@exar.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 11:17:18 +00:00
Michael Brown 2288241942 [liba20] Rename libflat to liba20
libflat no longer has anything to do with flat real mode; it handles
only the A20 gate.  Update library name to match.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-26 23:28:57 +00:00
Michael Brown 7f2d0f12ad [libflat] Remove now-obsolete flatten_real_mode call
Flat real mode will have been set up as a side-effect of the
protected-mode call invoked during install_block() for .text16.early;
there is no need to do so explicitly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-26 23:28:45 +00:00
Michael Brown a84e15234a [prefix] Use 16-bit protected mode for access to high memory
Flat real mode works perfectly on real hardware, but seems to cause
problems for some hypervisors.  Revert to using 16-bit protected mode
(and returning to real mode with 4GB limits, so as not to break PMM
BIOSes).

Allow the code specific to the .mrom format to continue to assume that
flat real mode works, since this format is specific to real hardware.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-26 23:24:44 +00:00
Michael Brown 21d6f9cd8e [contrib] Specify boot order in bochsrc.txt
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-26 23:24:44 +00:00
Michael Brown 785335996f [hermon] Indicate that device does not support interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:25:09 +00:00
Michael Brown 3a9f0e0f84 [infiniband] Indicate that device does not support interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:24:53 +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 66caec3f00 [netdevice] Allow devices to indicate that interrupts are not supported
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:16:11 +00:00
Michael Brown 7bf37147b3 [pci] Auto-resize VPD fields used for non-volatile storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:56 +00:00
Michael Brown e67c79b856 [pci] Add ability to resize a VPD field
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:55 +00:00
Michael Brown 267ef31791 [pci] Allow pci_vpd_init() return status to be ignored
Most xxx_init() functions are void functions with no failure cases.
Allow pci_vpd_init() to be used in the same way.  (Subsequent calls to
pci_vpd_read() etc. will fail if pci_vpd_init() fails.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:55 +00:00
Michael Brown 17d28f4877 [nvo] Allow resizing of non-volatile stored option blocks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:48 +00:00
Michael Brown 1651d4f6d7 [nvo] Remove the non-volatile options fragment list
Since its implementation several years ago, no driver has used a
fragment list containing more than a single fragment.  Simplify the
NVO core and the drivers that use it by removing the whole concept of
the fragment list, and using a simple (address,length) pair instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown 8f8b55f187 [nvs] Allow for non-volatile storage devices without block boundaries
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown 17b6a3c506 [dhcp] Allow use of custom reallocation functions for DHCP option blocks
Allow functions other than realloc() to be used to reallocate DHCP
option block data, and specify the reallocation function at the time
of calling dhcpopt_init().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown 310d46c1ed [dhcp] Rename length fields for DHCP options
Rename "len" to "used_len" and "max_len" to "alloc_len".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-10 03:39:26 +00:00
Michael Brown 6cee8904d1 [dhcp] Remove redundant length fields in struct dhcp_packet
The max_len field is never used, and the len field is used only by
dhcp_tx().  Remove these two fields, and perform the necessary trivial
calculation in dhcp_tx() instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-10 03:39:26 +00:00
Michael Brown dc462e8b3b [hermon] Fix incorrectly-padded sense_port structure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-24 01:10:26 +00:00
Alex Williamson c080de1a60 [igbvf] Add igbvf driver
Driver for Intel 82576 based virtual functions, based on Intel source
code available at:

    http://sourceforge.net/projects/e1000  (igbvf-1.0.7)

Based on initial port from Eric Keller <ekeller@princeton.edu>.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-16 03:58:42 +00:00
Michael Brown 708c5060b9 [dhcp] Use Ethernet-compatible chaddr, if possible
For IPoIB, we currently use the hardware address (i.e. the eight-byte
GUID) as the DHCP chaddr.  This works, but some PXE servers (notably
Altiris RDP) refuse to respond if the chaddr field is anything other
than six bytes in length.

We already have the notion of an Ethernet-compatible link-layer
address, which is used in the iBFT (the design of which similarly
fails to account for non-Ethernet link layers).  Use this as the first
preferred alternative to the actual link-layer address when
constructing the DHCP chaddr field.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-15 18:46:19 +00:00
Michael Brown b9aeb439e2 [pxe] Improve pxe_udp 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 iPXE.

Bring the pxe_udp debug messages up to normal iPXE standards.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-15 15:30:21 +00:00
Michael Brown 94cdad9c0e [iscsi] Include both DNS addresses in iBFT, if available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 15:35:02 +00:00
Michael Brown cb838cc419 [settings] Add fetch_ipv4_array_setting()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 15:34:12 +00:00
Michael Brown 66531a5918 [debug] Add DBG_MD5() and related macros
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:13:31 +00:00
Michael Brown 9252fead9a [legal] Add missing copyright header and FILE_LICENCE macro
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:12:59 +00:00
Michael Brown ea0fcb9460 [fnrec] Enhance function recording
Enhance the information collected by the function recorder to include
the call site and entry/exit counts.  This allows fnrec.pl to produce
a call tree such as:

    step (from core/getkey.c:46 = 0x17e90) {
      ref_increment (from core/process.c:93 = 0x73ec) { }
      net_step (from core/process.c:96 = 0x73f1) {
        net_poll (from net/netdevice.c:741 = 0xbce6) {
          netdev_poll (from net/netdevice.c:700 = 0xbc58) { }
          netdev_rx_dequeue (from net/netdevice.c:709 = 0xbc65) { }
        }
      }
      ref_decrement (from core/process.c:96 = 0x73f9) { }
    }

Note that inlined functions are reported, confusingly, as extra calls
to the *containing* function.  Minimise this confusion by adding the
attribute "no_instrument_function" to all functions declared as
inline.  (Static functions that have been inlined autonomously by gcc
will still be problematic, but these are far fewer in number.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:11:27 +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 a4bb95599c [cmdline] Add "reboot" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:08:39 +00:00
Michael Brown 88b9b776cf [r8169] Disabling IRQs should not also acknowledge the IRQs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:07:30 +00:00
Shao Miller 3b51710156 [legal] Add FILE_LICENCE macro to some GPL-v2-or-later files
Changes were made to files where the licence text within the files
themselves confirms that the files are GPL version 2 or later.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-03 23:38:15 +00:00
Shao Miller 79a3799c41 [legal] Add FILE_LICENCE macro to some GPL-v2 files
Changes were made to files where the licence text within the files
themselves confirms that the files are GPL version 2.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-03 23:23:35 +00:00
Michael Brown 87723a0f11 [libflat] Test A20 gate without switching to flat real mode
Use the real-mode address ffff:0010 to access the linear address
0x100000, and so test whether or not the A20 gate is enabled without
requiring a switch into flat real mode (or some other addressing
mode).

This speeds up CPU mode transitions, and also avoids breaking the NBP
from IBM's Tivoli Provisioning Manager for Operating System
Deployment.  This NBP makes some calls to iPXE in VM86 mode rather
than true real mode and does not correctly emulate our transition into
flat real mode.

Interestingly, Tivoli's VMM *does* allow us to switch into protected
mode (though it patches our GDT so that we execute in ring 1 rather
than ring 0).  However, paging is still disabled and we have a 4GB
segment limit.  Being in ring 1 does not, therefore, restrict us in
any meaningful way; this has been verified by deliberately writing
garbage over Tivoli's own GDT (at address 0x02201010) during a
nominally VM86-mode PXE API call.  It's unclear precisely what
protection this VMM is supposed to be offering.

Suggested-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-03 05:41:09 +00:00
Michael Brown f14a5045d7 [hermon] Work around hardware stripping of VLAN tags
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 18:51:29 +00:00
Michael Brown 5273c2748c [vlan] Expose vlan_find() to network card drivers
Some network cards automatically strip the VLAN header, providing the
VLAN tag via a side channel such as a completion queue entry.  These
cards need to be able to report receive completions directly against
the relevant VLAN device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 18:46:50 +00:00
Michael Brown 51a9e517f2 [vlan] Use "-" instead of "." as separator in VLAN device names
VLAN device names have the form "netX.Y", e.g. "net0.5" for VLAN 5 on
net0.  This use of "." conflicts with the use of "." as the
hierarchical separator in settings block names, with the result that
VLAN device settings cannot be accessed by name.

It would be trivial to treat the VLAN device settings as being a child
of the trunk device settings, but this would cause the VLAN device
settings to be applied to the trunk device: for example, setting
"net0.5/ip" would then apply the IP address to both net0.5 and net0.

Fix by changing the VLAN device name to use "-" instead of ".": the
VLAN device "net0.5" is now "net0-5".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 17:15:52 +00:00
Michael Brown 67b45186a5 [settings] Apply settings block name in register_settings()
Pass the settings block name as a parameter to register_settings(),
rather than defining it with settings_init() (and then possibly
changing it by directly manipulating settings->name).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 16:35:00 +00:00
Michael Brown de6a59470b [iscsi] Disambiguate the common EINVAL cases
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 01:23:50 +00:00
Michael Brown 34dab1007c [dns] Disambiguate "no nameserver" and "no DNS record" errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 00:47:09 +00:00
Michael Brown b8f721123b [hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM
pptx and pfctx should not be set together, nor should pprx and pfcrx.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-29 17:18:49 +00:00
Michael Brown 930f009bfa [script] Remove "Aborting on <line>" message
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-29 14:38:03 +00:00
Michael Brown 7bebe9579e [cmdline] Match user expectations for &&, ||, goto, and exit
The && and || operators should be left-associative, since that is how
they are treated in most other languages (including C and Unix
shell).  For example, in the command:

  dhcp net0 && goto dhcp_ok || echo No DHCP on net0

if the "dhcp net0" fails then the "echo" should be executed.

After an "exit" or a successful "goto", further commands on the same
line should never be executed.  For example:

  goto somewhere && echo This should never be printed
  exit 0 && echo This should never be printed
  exit 1 && echo This should never be printed

An "exit" should cause the current shell or script to terminate and
return the specified exit status to its caller.  For example:

  chain test.ipxe && echo Success || echo Failure
    [in test.ipxe]
    #!ipxe
    exit 0

should echo "Success".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-29 14:19:59 +00:00
Michael Brown 01df5c510f [parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-29 14:18:43 +00:00
Michael Brown 1fcea25c42 [shell] Add "shell" command
The "shell" command allows a script to enter an interactive shell,
which is potentially useful for troubleshooting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-28 21:09:33 +00:00
Arkadiusz Miskiewicz 719f2d793c [build] Really use __builtin_offsetof() when available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-28 18:28:15 +00:00
Michael Brown 795793b3a4 [build] Use __builtin_offsetof() when available
Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to
treat our offsetof() implementation as not being a compile-time
constant.  Fix by using __builtin_offsetof() when available.  (As with
the original offsetof() macro, this code is copied from the Linux
kernel's stddef.h.)

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-28 17:28:52 +00:00
Michael Brown aa1c59ccff [hermon] Enable priority flow control on the FCoE priority
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-27 20:38:35 +00:00
Michael Brown 54ec712ebe [fcoe] Use only the first instance of a FIP descriptor
Almost all FIP packets contain at most one instance of each
descriptor.  A VLAN notification may contain multiple VLAN
descriptors.  The FCoE specification does not provide any guidance
regarding prioritisation of VLANs, so we may choose to arbitrarily
choose the first listed VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-27 16:04:57 +00:00
Michael Brown c5c0a27b68 [vlan] Treat VLAN 0 as valid
VLAN headers are allowed to contain a VLAN tag of zero, indicating
that the header specifies only a priority and that the packet does not
belong to any VLAN.  The easiest way to handle this is to treat VLAN 0
as being a normal VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-27 16:04:57 +00:00