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

2521 Commits

Author SHA1 Message Date
Michael Brown fd0aef9ee1 [prefix] Add PCI bus:dev.fn to ROM product string
This allows multiple gPXE ROMs in a system to be disambiguated at boot
time; the PCI ID will show up in the boot menu for a BBS-compliant BIOS.
2008-05-21 18:43:58 +01:00
Michael Brown 30cd348689 [SMBIOS] Interpret UUIDs as being in network-endian order
Various specification documents disagree about the byte ordering of
UUIDs.  However, SMBIOS seems to use the standard in which everything is
in network-endian order.

This doesn't affect anything sent on the wire; only what gets printed on
the screen when the "uuid" variable is displayed.
2008-05-20 18:41:36 +01:00
Michael Brown 7d01bf663e [libc] Fix isdigit(), islower() and isupper().
From: Stefan Hajnoczi <stefanha@gmail.com>
2008-05-19 16:34:17 +01:00
Michael Brown 78281b09e6 [tg3] Add support for tg3-5721
From: Daniel Mealha Cabrita <dancab@utfpr.edu.br>

I've added tg3-5721 support for gPXE, the patch (against gpxe-0.9.3) is
attached to this message.

This chipset is present in HP ML150 G2 servers (possibly other HP machines
as well).
2008-05-19 16:22:13 +01:00
Michael Brown 1dcc60e5ad [IPv4] Fix multicast address checking
From: Viswanath Krishnamurthy <viswa.krish@gmail.com>

The current ipv4 incorrectly checks the IP address for multicast address.
This causes valid IPv4 unicast address to be trated as multicast address

For e.g if the PXE/tftp server IP address is 192.168.4.XXX where XXX is
224 or greater, it gets treated as multicast address and a ethernet
multicast address is sent out on the wire causing timeouts
2008-05-19 16:19:46 +01:00
Michael Brown 00ed567069 [iSCSI] Offer CHAP authentication only if we have a username and password
Some EMC targets will fail if we advertise that we can authenticate with
CHAP, but the target is configured to allow unauthenticated access to that
target.  We advertise AuthMethod=CHAP,None; the target should (I think)
select AuthMethod=None for unprotected targets.  IETD does this, but an
EMC Celerra NS83 doesn't.

Fix by offering only AuthMethod=None if the user hasn't supplied a
username and password; this means that we won't be offering CHAP
authentication unless the user is expecting to use it (in which case the
target is presumably configured appropriately).

Many thanks to Alessandro Iurlano <alessandro.iurlano@gmail.com> for
reporting and helping to diagnose this problem.
2008-04-24 13:48:29 +01:00
Michael Brown eec9814a0e [Makefile] Quick hack: always define pci_{vendor,device}_id
ROMs will refuse to build unless pci_vendor_id and pci_device_id are
defined.  We probably ought to fix up the Makefile (and the ROM prefix) so
that they're required only for PCI ROMs, but this will do for now.
2008-04-23 16:24:00 +01:00
Michael Brown 3430226d40 [MTNIC] Minor cleanups of vendor-provided driver for Mellanox 10GigE cards
Drivers are not allowed to call printf().  Converted eprintf() to DBG(),
and removed spurious startup banner.

Fixed hardcoded inclusion of little_bswap.h

Use EIO rather than 1 as an error number.
2008-04-22 17:50:30 +01:00
Michael Brown 1ba959c6b3 [NETDEV] Add notion of link state
Add ability for network devices to flag link up/down state to the
networking core.

Autobooting code will now wait for link-up before attempting DHCP.

IPoIB reflects the Infiniband link state as the network device link state
(which is not strictly correct; we also need a succesful IPoIB IPv4
broadcast group join), but is probably more informative.
2008-04-22 17:40:50 +01:00
Michael Brown d72bf13b78 [Infiniband] Fix event queue doorbell ringing on Arbel 2008-04-22 02:18:32 +01:00
Michael Brown c9fb012d4f [Infiniband] Add multiport support for Arbel cards 2008-04-22 01:37:00 +01:00
Michael Brown 35a5836677 [Infiniband] Move event-queue process from driver to Infiniband core 2008-04-21 13:23:11 +01:00
Michael Brown e55bab3ce3 [Hermon] Fix event queue doorbells.
Event queue doorbells must use UAR pages 0-127 depending on event queue
number; other doorbells must use pages 128+ (and we choose to use page
128).
2008-04-18 05:33:39 +01:00
Michael Brown a176a24ac0 [Infiniband] Add preliminary multiple port support for Hermon cards
Infiniband devices no longer block waiting for link-up in
register_ibdev().

Hermon driver needs to create an event queue and poll for link-up events.

Infiniband core needs to reread MAD parameters when link state changes.

IPoIB needs to cope with Infiniband link parameters being only partially
available at probe and open time.
2008-04-18 02:50:48 +01:00
Michael Brown 3475b693b7 [HCI] Display "Not an executable image" when appropriate
PXE is a catch-all image format with no signature checks.  If an
unsupported image file is loaded, it will be treated as a PXE image.  In
most cases, the image will be too large to be loaded as a PXE image (which
has to fit in base memory), so the error returned to the user will be that
the segment could not fit within the memory region.

Add an explicit check to pxe_image.c to reject images larger than base
memory with ENOEXEC.

Add ENOEXEC to the error string table.
2008-04-08 16:28:00 +01:00
Marty Connor fbb6a3fd65 [Drivers-r8169] Add support for newer rtl8169 variants from Hilko Bengen
03-19-2008, Hilko Bengen, Cleanups and fixes for newer cards
(successfully tested with 8110SC-d onboard NIC)
2008-03-31 09:14:23 -04:00
H. Peter Anvin b107637008 [http] gPXE is a HTTP/1.0 client, not a HTTP/1.1 client
gPXE is not compliant with the HTTP/1.1 specification (RFC 2616),
since it lacks support for "Transfer-Encoding: chunked".  gPXE is,
however, compliant with the HTTP/1.0 specification (RFC 1945), which
does not require "Transfer-Encoding: chunked" to be supported.

The only HTTP/1.1 feature that gPXE uses is the "Host:" header, but
servers universally accept that one from HTTP/1.0 clients as an
optional extension (it is obligatory for HTTP/1.1).  gPXE does not,
for example, appear to support connection caching.  Advertising as a
HTTP/1.0 client will typically make the server close the connection
immediately upon sending the last data, which is actually beneficial
if we aren't going to keep the connection alive anyway.
2008-03-31 05:01:08 -07:00
Michael Brown feade5da6e [Settings] Expose SMBIOS via settings API
In particular, expose the system UUID as a setting ("smbios/uuid").
2008-03-28 15:35:06 +00:00
Michael Brown aa74a7d53c [DHCP] Add support for ProxyDHCP requests
The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs
should be issued.  We adapt the following, slightly paranoid approach:

  If an offer contains an IP address, then it is a normal DHCPOFFER.

  If an offer contains an option #60 "PXEClient", then it is a
  ProxyDHCPOFFER.  Note that the same packet can be both a normal
  DHCPOFFER and a ProxyDHCPOFFER.

  After receiving the normal DHCPACK, if we have received a
  ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP
  server on port 4011.  If we time out waiting for a ProxyDHCPACK, we
  treat this as a non-fatal error.
2008-03-27 16:45:15 +00:00
Michael Brown af466aedf1 [Settings] find_child_settings() accepts a NULL parent 2008-03-27 06:07:19 +00:00
Michael Brown 7a4e212fe2 [DHCP] Treat empty fields in DHCP packets as non-existent.
This avoids confusing other code by insisting that we have e.g. a
filename consisting of 128 zero bytes.
2008-03-27 06:06:36 +00:00
Michael Brown 978996cdae [usr] Offer user a second chance to enter the shell on boot failure 2008-03-26 23:16:20 +00:00
Michael Brown 4b267ed713 [libc] Whitespace cleanup in errno.h 2008-03-26 22:57:25 +00:00
H. Peter Anvin d810dc5be2 [PXEXT] Update documentation
Add documentation for the FILE_EXEC and FILE_CHECK_API extension
calls, and update the documentation for the FILE_READ call.
2008-03-26 15:14:55 -07:00
H. Peter Anvin 61ee294875 [PXEXT] Change the PXE return code for EWOULDBLOCK
Change the PXE return code for EWOULDBLOCK from PXENV_STATUS_FAILURE
to PXENV_STATUS_TFTP_OPEN.  This code is only used by the FILE_READ
PXEXT call, and is necessary to distinguish "error" from "no data" in
that call.

(The only other nonblocking call is UDP_READ, where the caller doesn't
care about the distinction, however, gPXE doesn't use EWOULDBLOCK
internally to represent this condition in that code.)
2008-03-26 15:12:19 -07:00
H. Peter Anvin d62e89d776 [PXEXT] Add FILE_API_CHECK API function
Add FILE_API_CHECK to the PXEXT API so the NBP can query the
availability and status of the API.
2008-03-26 15:10:56 -07:00
Michael Brown 83617e5b1c [DHCP] Save precious packet-aligned memory by copying DHCP responses
Copy DHCP responses to a standard malloc()ed buffer, rather than
retaining the I/O buffer that they arrived in.
2008-03-26 12:25:59 +00:00
Michael Brown 96edbd128f [PXEXT] Avoid queueing zero-length buffers in posix_io.c
read_user() assumes that zero-length buffers don't exist, and optimises
around this.
2008-03-25 21:10:21 +00:00
Michael Brown 92d15eff30 [Settings] Remove assumption that all settings have DHCP tag values
Allow for settings to be described by something other than a DHCP option
tag if desirable.  Currently used only for the MAC address setting.

Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c.

Remove notion of settings from dhcppkt.c.

Rationalise dhcp.c to use settings API only for final registration of the
DHCP options, rather than using {store,fetch}_setting throughout.
2008-03-25 20:46:16 +00:00
Michael Brown ee5bdb0d75 [PXEXT] Avoid returning a false EOF when we have an empty buffer queued 2008-03-25 20:29:42 +00:00
Michael Brown 7234f91bf8 [DHCP] Fix DHCP state confusion.
DHCP code was using an incorrect check for whether to construct a
DHCPDISCOVER or DHCPREQUEST packet.
2008-03-25 16:38:01 +00:00
Michael Brown 8f00c84828 [Settings] Add named setting for next-server
It's probably easier to have a named setting for next-server, rather
than to explain to people why they need to pretend it is option 175.3.
2008-03-24 00:48:06 +00:00
Michael Brown c06e6d0635 [Makefile] Use -MM instead of -M in dependency generation
Using -MM strips out any system header files from the dependency list,
which means that we could safely use an external stdarg.h if we wanted
to.
2008-03-24 00:28:55 +00:00
Michael Brown dbf8a02e8f [libc] Use __builtin_va_list et al in stdarg.h
The home-grown versions don't work properly for static variadic
functions, when gcc can choose to use a non-standard calling convention.
2008-03-24 00:23:11 +00:00
Michael Brown 23e077666b [Settings] copy_settings() should not fail if some settings are missing! 2008-03-23 23:28:21 +00:00
Michael Brown 978865da2f [IPv4] Use default netmasks when no subnet mask is specified. 2008-03-23 22:20:47 +00:00
Michael Brown 2af6c8d130 [IPv4] Tidy up some header files. 2008-03-23 22:05:47 +00:00
Michael Brown ee4206a8a7 [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFO
Add dedicated functions create_dhcpdiscover(), create_dhcpack() and
create_proxydhcpack() for use by external code such as the PXE preboot
code.

Register ProxyDHCP options under the global scope "proxydhcp".

Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP
succeeds.
2008-03-23 21:58:05 +00:00
Marty Connor 1741e3e761 [DHCP] FIXME: quick temporary settings fix, needs update for new API 2008-03-21 23:37:02 -04:00
Michael Brown 8fceee785f Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2008-03-22 00:50:06 +00:00
Michael Brown 65c0974d1f [Settings] Bugfix: store_setting() now applies changes even on root block 2008-03-22 00:40:33 +00:00
Michael Brown e5cea13e51 [Settings] Implement simple_settings backed with extensible DHCP options 2008-03-22 00:31:08 +00:00
Michael Brown a462c96ffc [Settings] DHCP is now working using the new settings API. 2008-03-21 22:55:59 +00:00
Michael Brown 8afb36c3bc [Settings] Migrate DHCP and NVO code to the new settings API (untested) 2008-03-21 22:15:31 +00:00
Michael Brown bb32b8999c [DHCP] Kill off some no-longer-used DHCP functions 2008-03-21 00:50:12 +00:00
Michael Brown a9b62cfe8c [Settings] Use a settings applicator in ibft.c 2008-03-21 00:49:44 +00:00
Michael Brown 1edbcd4246 [Settings] Use a settings applicator to set the default TFTP URI. 2008-03-21 00:26:29 +00:00
Michael Brown 720e256c50 [Misc] Kill off long-redundant tests/dhcptest.c 2008-03-21 00:07:36 +00:00
Michael Brown 0fbe484566 [IPv4] Add a config option for IPv4
IPv4 may not always be dragged into the link, so add a specific
configuration option for it.
2008-03-21 00:06:28 +00:00
Michael Brown aec9b8a41b [Settings] Use a settings applicator to configure IPv4 routes. 2008-03-21 00:01:27 +00:00
Michael Brown eae6ac3d0b [Settings] Convert code in src/usr to use settings API. 2008-03-20 23:42:11 +00:00
Michael Brown cf03304620 [Settings] Introduce settings applicators.
Convert DHCP option applicators in dns.c and iscsi.c to settings
applicators.

Kill off DHCP option applicators.
2008-03-20 23:15:48 +00:00
Michael Brown acfa14423e [Settings] Add per-netdevice settings block
Add a configuration settings block for each net device.  This will
provide the parent scope for settings applicable only to that network
device (e.g. non-volatile options stored on the NIC, options obtained via
DHCP, etc.).

Expose the MAC address as a setting.
2008-03-20 21:06:53 +00:00
Michael Brown 260b93bb72 [Settings] Add settings hierarchy
Add the notion of the settings hierarchy, complete with
register/unregister routines.

Rename set->store and get->fetch to avoid naming conflicts with get/put
as used in reference counting.
2008-03-20 21:01:32 +00:00
Michael Brown a48b4d9948 [Settings] Start revamping the configuration settings API.
Add the concept of an abstract configuration setting, comprising a (DHCP)
tag value and an associated byte sequence.

Add the concept of a settings namespace.

Add functions for extracting string, IPv4 address, and signed and
unsigned integer values from configuration settings (analogous to
dhcp_snprintf(), dhcp_ipv4_option(), etc.).

Update functions for parsing and formatting named/typed options to work
with new settings API.

Update NVO commands and config UI to use new settings API.
2008-03-20 04:06:07 +00:00
Marty Connor e97ae4a788 ]Drivers] Update licensing for cs89x0.[ch] and cs89x0.txt
Russ Nelson sent an email requesting the license change to
GPL Version 2.
2008-03-18 22:31:26 -04:00
Michael Brown af1c6b869c [Settings] Allow named settings to have their type specified explicitly
Allow setting names such as "ip:hex".
2008-03-18 15:51:03 +00:00
Michael Brown 070cbebc26 [Timers] Initialise timers on first use
Timers are sometimes required before the call to initialise(), so we
cannot rely on initialise() to set up the timers before use.

Also fix a potential integer overflow issue in generic_currticks_udelay()
2008-03-18 15:23:10 +00:00
Michael Brown 2652abdc5f [Timers] Miscellaneous timer system fixes
Add missing comments to timer code.

Lock system if no suitable timer source is found.

Fix initialisation order so that timers are initialised before code that
needs to use them.
2008-03-18 14:48:28 +00:00
Michael Brown 03398e3389 [Settings] Allow encapsulated options to be specified as named settings
Allow encapsulated options to be specified as e.g. "175.3".  As a
side-effect, change the separator character for the type field from "." to
":"; for example, the IP address pseudo-option is now "175.3:ipv4".
2008-03-18 04:13:11 +00:00
Michael Brown e2613e8896 [Settings] Add int16, int32 and hex-string configuration setting types
Add parse and display routines for 16-bit and 32-bit integer configuration
settings.

Add parse and display routines for hex-string configuration settings.

Assume hex-string as a configuration setting type if no type is explicitly
specified.
2008-03-18 03:23:36 +00:00
Michael Brown 6fe585642a [libc] Fix a validation bug in strtoul()
strtoul() was accepting the characters immediately above ASCII 0..9 as
valid hex digits, due to a missing comparison.
2008-03-18 03:14:05 +00:00
Michael Brown 5a08b434c7 [Settings] show_setting() functions return snprintf()-style length.
show_setting() and related functions now return an "actual length" in the
style of snprintf().  This is to allow consumers to allocate buffers large
enough to hold the formatted setting.
2008-03-18 00:48:23 +00:00
Michael Brown 08b19abf94 Merge branch 'pxerom-pmm' 2008-03-11 16:11:51 +00:00
Michael Brown 66d9a411f7 [PXE] PMM now tested and working
Minor bugfix: 4 x 2 = 8, not 16
2008-03-11 16:08:04 +00:00
Michael Brown 3bf7105cab [prefix] Cope with image source addresses outside base memory
When PMM is used, the gPXE image source will no longer be in base memory.
Decompression of .text16 and .data16 can therefore no longer be done in
real mode.
2008-03-11 13:26:46 +00:00
Michael Brown 9c86a39551 [PXE] Improve PnP/BBS detection
Use BBS installation check to see if we need to hook INT19 even on a PnP
BIOS.

Verify that $PnP signature is paragraph-aligned; bochs/qemu BIOS provides
a dummy $PnP signature with no valid entry point, and deliberately
unaligns the signature to indicate that it is not properly valid.

Print message if INT19 is hooked.

Attempt to use PMM even if BBS check failed.
2008-03-11 12:04:38 +00:00
Michael Brown 297002d7bd [prefix] Add printing functions to libprefix.S
Move the printing functions from pxeprefix.S into libprefix.S, so they
are available for debug from any prefix.
2008-03-11 11:32:19 +00:00
Michael Brown 3e781eb87f Merge branch 'xl0-timer' 2008-03-10 13:02:53 +00:00
Michael Brown 1dd3f88964 [PXE] Work around a buffer-size bug in WinPE
WinPE's pxeboot.n12 takes the BufferLimit returned by gPXE (indicating
the size of gPXE's internal DHCP packet buffers) and erroneously passes
it in as BufferSize (indicating the size of pxeboot.n12's DHCP packet
buffer).  If these don't match, then pxeboot.n12 ends up instructing gPXE
to overwrite parts of its data segment.

Change gPXE's internal DHCP packet buffers to be exactly
sizeof(BOOTPLAYER_t) bytes to work around this problem.
2008-03-10 11:46:55 +00:00
Michael Brown 12f203c606 [PXE] Add PMM support to romprefix.S (untested)
ROM initialisation vector now attempts to allocate a 2MB block using
PMM.  If successful, it copies the ROM image to this block, then
shrinks the ROM image to allow for more option ROMs.  If unsuccessful,
it leaves the ROM as-is.

ROM BEV now attempts to return to the BIOS, resorting to INT 18 only
if the BIOS stack has been corrupted.
2008-03-09 22:13:07 +00:00
Michael Brown fad35829eb [Makefile] Use bin/VVVVDDDD.rom instead of bin/pci_VVVV_DDDD.rom
The generate-by-PCI-device-ID rules (bin/pci_VVVV_DDDD.rom) are generally
used for building actual ROM images to be burned, and the burning
utilities generally run under some DOS variant.  Change the filename from
pci_VVVV_DDDD.rom to VVVVDDDD.rom so that it is compatible with the DOS
8.3-character filename limit.
2008-03-06 15:37:34 +00:00
Michael Brown 06e8a70488 [tg3] Added device ID for rebranded HP card. 2008-03-06 13:19:42 +00:00
Alexey Zaytsev 8de54ef9aa Use plain C in timer_rdtsc for division instead of inline asssembly.
This also fixes a bug in rdtsc_currticks when the result did not fix in %eax

Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
2008-03-06 16:06:58 +03:00
Michael Brown b62f2325ba [PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.
This allows pxelinux to execute arbitrary gPXE commands.  This is
remarkably unsafe (not least because some of the commands will assume
full ownership of memory and do nasty things like edit the e820 map
underneath the calling pxelinux), but it does allow access to the
"sanboot" command.
2008-03-04 18:16:30 +00:00
Michael Brown b08a6f5300 [Command] Add "sanboot" command. 2008-03-04 17:59:26 +00:00
Michael Brown 4704abbc50 [Timers] Move TIMER_BIOS and TIMER_RDTSC to their own config.h section. 2008-03-02 02:33:54 +00:00
Michael Brown 3dd897f986 [Timers] Do not enable serial console by default; this change should not
be propagated to master.
2008-03-02 02:32:12 +00:00
Alexey Zaytsev 1935439f86 fix the rdtsc namimg 2008-03-02 05:19:29 +03:00
Alexey Zaytsev 379c37bafb Cleanups
Replace a printf with a DBG in timer_rtdsc.c
Replace a printf in timer.c with assert
Return proper error codes from timer drivers

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-03-02 04:36:50 +03:00
Alexey Zaytsev a1572e0ab0 Modify gPXE core and drivers to work with the new timer subsystem
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-03-02 03:41:10 +03:00
Alexey Zaytsev 4006d229e5 Introduce the new timer subsystem.
Timer subsystem initialization code in core/timer.c

	Split the BIOS and RTDSC timer drivers from i386_timer.c

	Split arch/i386/firmware/pcbios/bios.c into the RTSDC
	timer driver and arch/i386/core/nap.c

	Split the headers properly:
		include/unistd.h - delay functions to be used by the
					gPXE core and drivers.

		include/gpxe/timer.h - the fimer subsystem interface
					to be used by the timer drivers
					and currticks() to be used by
					the code gPXE subsystems.

		include/latch.h	- removed
		include/timer.h - scheduled for removal. Some driver
					are using currticks, which is
					only for core subsystems.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-03-02 03:15:07 +03:00
Michael Brown 844828cb15 [DHCP] Fix RFC4390 client identifier constructions.
RFC 4390 provides for the DHCP client identifier to contain the link-layer
hardware type and MAC address when the MAC address exceeds 16 bytes.
However, the hardware type field is only 8 bits; we were assuming 16 bits.
2008-02-27 16:55:46 +00:00
Michael Brown bc3f0a25c6 [Infiniband] Add preliminary support for multi-port devices.
Arbel and Hermon cards both have multiple ports.  Add the
infrastructure required to register each port as a separate IB
device.  Don't yet register more than one port, since registration
will currently fail unless a valid link is detected.

Use ib_*_{set,get}_{drv,owner}data wrappers to access driver- and
owner-private data on Infiniband structures.
2008-02-27 13:59:56 +00:00
Michael Brown 6570203571 [Infiniband] Centralise MAD operations
Pull out common code for handling management datagrams from arbel.c
and hermon.c into infiniband.c.

Add port number to struct ib_device.

Add open(), close() and mad() methods to struct ib_device_operations.
2008-02-26 22:56:19 +00:00
Michael Brown 03d1fc1da3 [Hermon] Donate joint copyright on Hermon driver to Mellanox. 2008-02-23 11:05:46 +00:00
Michael Brown 396dc6e797 [Hermon] Add driver for Mellanox Hermon (ConnectX) cards. 2008-02-23 10:51:38 +00:00
Michael Brown ea5ad4be91 [Infiniband] Fix typo in debug statement 2008-02-23 10:48:18 +00:00
Michael Brown 563955ce37 [Infiniband] Add missing list_del()s in ib_create_qp() failure path. 2008-02-23 10:48:10 +00:00
Michael Brown 604c934981 Add DBGLVL_IO to trace all memory-mapped I/O. 2008-02-21 12:44:09 +00:00
Michael Brown b87904ab20 Remove reference to COFF support. I can find no trace of ever having supported it. 2008-02-21 04:11:56 +00:00
Marty Connor e6ff84b2d1 Make tarball generation quieter
Deleting bin/deps after "make veryclean" keeps deps from being
regenerated in the tarball.
2008-02-14 17:40:45 -05:00
Marty Connor c9593cd35b Updated $(VERSION) for release. Change tarball generation.
Added 'install' and 'configure' targets for those who are used
to other build setups.
2008-02-14 17:26:47 -05:00
Michael Brown c60050614a Added mtnic driver provided by Mellanox.
Stripped out trailing whitespace to keep git happy.
2008-02-13 15:01:18 +00:00
Michael Brown 385b7a623d Guard against corruption of top half of %esp during UNDI ISR 2008-02-13 14:58:20 +00:00
Michael Brown c1006ffdb7 If no shell was requested via Ctrl-B, exit immediately if boot fails. 2008-02-11 17:51:44 +00:00
Michael Brown 40990465f1 Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2008-02-11 16:33:37 +00:00
H. Peter Anvin fc9f016be0 UNDI ISR: save and restore 32-bit registers
As written, if the if the UNDI ISR call clobbers the upper halves of
any of the GPRs (which by convention it is permitted to do, and by
paranoia should be expected to do) then nothing in the interrupt
handler will recover the state.

Additionally, save/restore %fs and %gs out of sheer paranoia - it's a
cheap enough operation, and may prevent problems due to poorly written
UNDI stacks.
2008-02-11 15:09:47 +00:00
Michael Brown f8a0b5f682 Use internal 16-bit stack for added safety. 2008-02-11 15:06:26 +00:00
H. Peter Anvin 9aec835541 undiisr.S: save/restore upper half of %eflags
Since we don't know what the UNDI code does, it is safest to
save/restore %eflags even though the lower half of %eflags is
automatically saved by the interrupt itself.
2008-02-10 18:13:39 -08:00
H. Peter Anvin 621c2886aa UNDI ISR: save and restore 32-bit registers
As written, if the if the UNDI ISR call clobbers the upper halves of
any of the GPRs (which by convention it is permitted to do, and by
paranoia should be expected to do) then nothing in the interrupt
handler will recover the state.

Additionally, save/restore %fs and %gs out of sheer paranoia - it's a
cheap enough operation, and may prevent problems due to poorly written
UNDI stacks.
2008-02-10 18:06:10 -08:00
Michael Brown 428c6342bc Fixes for EqualLogic iSCSI targets:
Allow port numbers in iSCSI redirection.

  Wait for SCSI status, not just the final data-in (which may be followed
  by an explicit SCSI Response PDU if the S bit is not set).
2008-02-07 22:46:26 +00:00
Michael Brown 5e4e267177 Start restructuring pxe_tftp.c to cope with multicast (MTFTP) receives. 2008-02-02 15:59:32 +00:00
Michael Brown 105ebec4f3 Merge commit 'laptop/master' 2008-01-22 18:57:01 +00:00
Michael Brown 122abb50af Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2008-01-22 18:53:01 +00:00
Michael Brown c9c8cdeb8b Add pxe_set_cached_filename() so that pxe_tftp.c can also update the
stored DHCP packets.
2008-01-22 18:51:12 +00:00
Michael Brown 84f99f781e Use XFER_INIT() macro. 2008-01-22 18:50:24 +00:00
Michael Brown a2b4252d5a Add XFER_INIT() macro. 2008-01-22 18:48:47 +00:00
Michael Brown f6a8158eed Make seek information part of the xfer metadata, rather than an entirely
separate xfer method.

Add missing .alloc_iob entries to several xfer_interface_operations
structures.
2008-01-08 16:46:55 +00:00
Michael Brown 74fd544101 Added the embedded pxelinux payload patch from hpa. 2008-01-08 15:51:36 +00:00
Michael Brown 3311169707 When the DHCP file/sname fields are empty, don't allow them to override
their equivalent DHCP-option-specified values.
2008-01-07 13:50:32 +00:00
Michael Brown de29e5a39c Use .SECONDARY instead of .PRECIOUS for bin/%.tmp targets. 2008-01-07 13:15:12 +00:00
Michael Brown 82bae302b1 Fix off-by-one error (discovered by Shao Miller). 2008-01-07 13:12:43 +00:00
Marty Connor a9b8197f64 Unconditionally set utility program variables in Makefile to allow CROSS_COMPILE to work.
stappers and xl0 pointed out that gnu make sets some variables, so ?=
is ineffective in some cases where we use it.. Cross-compilation
requires that some variables can be overridden in the
src/$(ARCH)/Config file, so include that file _after_ utility program
variables are set.
2008-01-02 14:07:52 -05:00
Marty Connor af56768e98 Retain some intermediate object files, suggested by Geert Stappers and Alexey Zaytsev.
src/bin/%.tmp files can be useful for debugging, so let's keep them.
2007-12-28 14:33:11 -05:00
Michael Brown f3265b4bf8 Add preliminary support for MTFTP. 2007-12-26 18:51:20 +00:00
Marty Connor 9d4e4dbc32 3c90x driver fix (legacy) from Geert Staapers
From: Geert Stappers <stappers@stappers.nl>
To: etherboot-developers@lists.sourceforge.net
Subject: [Etherboot-developers] 3c90x polling again [patch]
Date: Thu, 29 Nov 2007 09:22:36 +0100
User-Agent: Mutt/1.5.16 (2007-06-11)

Hello,

gPXE didn't work on 3COM 905C Tornado cards for me.
It did transmit the DHCP request, but it didn't see the DHCP offer.

Adding debug print statements allready solved the problem.
Attached is a patch that has a cleaner delay then print statements.
The core of it is
-    for(i=0;i<40000;i++);
+    mdelay(1);

There was no research if the change is about a longer delay
or about code NOT being optimized away. It works for me   :-)

Cheers
Geert Stappers
2007-12-20 11:53:00 -05:00
Marty Connor ff476c04e9 Fix e1000 receive tail pointer (RDT) handling
e1000 should now work in VMware.
2007-12-17 13:07:29 -05:00
Michael Brown bea8787a03 Kill off the now-obsolete *_fill_nic() functions. 2007-12-15 19:40:55 +00:00
Michael Brown 7e8624a26f Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2007-12-15 19:37:44 +00:00
Michael Brown 5172d7b266 Autodetect whether or not we need to be using -fno-stack-protector. 2007-12-15 19:37:21 +00:00
Michael Brown 1d7974182e Overwrite the device descriptor's IRQ number with whatever the legacy
driver's probe() routine fills in in nic->irqno.  This is so that
non-interrupt-capable legacy drivers which set nic->irqno=0 will end
up reporting IRQ#0 via PXENV_UNDI_GET_INFORMATION; this in turn means
that the calling PXE NBP will (should) hook the timer interrupt, and
everything will sort of work.
2007-12-15 19:32:32 +00:00
Marty Connor bd2607305c Correct e1000 interrupt routine to enable on 1 disable on 0. duh.
The e1000_irq() routine should (per mcb30) do enable on non-zero,
disable on zero.  This is not consistent in all drivers, so I'll
wait to update it when doing a global sweep.
2007-12-13 11:20:45 -05:00
Marty Connor 1a867bfb39 Remove *_fill_nic() calls, and directly set nic->ioaddr and nic->irqno .
This needs to be done manually because if the irq() routine is
implemented then we want something like "nic->irqno = pci->irqno;",
else we do "nic->irqno = 0;" nic->ioaddr may also need to be set
carefully.

Also added local variables to end of many files, for emacs indentation
to match kernel style (tab does 8 space indent).
2007-12-13 11:08:40 -05:00
Michael Brown 9747c1a486 Remove the obsolete pre-aBFT AoE boot table. 2007-12-12 14:32:02 +00:00
Michael Brown 3ab571006e Yet another attempt to autodetect an appropriate "echo -e". 2007-12-07 14:25:02 -06:00
Michael Brown 27b414da81 Ignore .echocheck internal housekeeping file. 2007-12-08 00:51:24 +00:00
Michael Brown a8bddfe153 Another (hopefully more robust) attempt to find a usable substitute
for "echo -e" on the host system.
2007-12-08 00:50:57 +00:00
Michael Brown 2c7a9e803c Remove the (unused) option to override _prefix_link_addr,
_textdata_link_addr, _load_addr and _max_align in the linker scripts.
A bug in some versions of ld causes segfaults if the DEFINED() macro
is used in a linker script *and* the -Map option to ld is present.

We don't currently need to override any of these values; if we need to
do so in future then the solution will probably be to always specify
the values on the ld command line, and have the linker script not
define them at all.
2007-12-07 01:34:11 -06:00
Michael Brown cf895a8c7c Avoid Makefile syntax that requires make >= 3.81. 2007-12-07 04:14:06 +00:00
Michael Brown 3b58fc0baf Try to fix echo-detection to work on all systems that provide any
suitable "echo -e" substitute.
2007-12-07 03:35:32 +00:00
Michael Brown 1949641d10 Fix compiler warnings that appear only on OpenBSD. 2007-12-06 14:16:46 -06:00
Michael Brown 798f7f6b8e Kill off some warnings-problematic debug statements in ndp.c; the code
is non-functional anyway.
2007-12-07 01:51:08 +00:00
Michael Brown 6b0e147e0d Don't complain when callers provide too-short buffers for
PXENV_GET_CACHED_INFO.  NTLDR does this.
2007-12-07 01:06:37 +00:00
Michael Brown 698b5bc887 Fix a minor logical error in posix_io.c 2007-12-07 00:52:48 +00:00
Michael Brown df868476e7 Various warnings fixups for OpenBSD with gcc-3.3.5. 2007-12-07 00:11:43 +00:00
Michael Brown 64787bad29 Fix prototype mismatch. 2007-12-06 23:35:37 +00:00
Michael Brown be6ada2b7b Add missing format qualifier 2007-12-06 21:38:23 +00:00
Marty Connor 82a3e80645 Add copyright, clean up comments a bit, remove unnecessary code.
Cleanups for e1000.c.
2007-12-03 01:17:41 -05:00
Michael Brown 1de705e30f Reallocate memory for bitmaps only when necessary. 2007-11-29 19:10:10 +00:00
Michael Brown 423e9d72f3 udp_open_promisc() calls udp_open_common() with peer==NULL. 2007-11-28 11:56:14 +00:00
Michael Brown 3b1efba864 Add RFC2090 TFTP multicast support. 2007-11-28 10:57:26 +00:00
Michael Brown f770744ee0 Quick hack to be able to accept transfers from servers that don't
supply options.
2007-11-25 16:06:29 +00:00
Michael Brown 838ecba131 Provide individually cached constructed copies of DHCP packets via
PXENV_GET_CACHED_INFO.  If we dont do this, Altiris' NBP screws up; it
relies on being able to grab pointers to each of the three packets and
then read them at will later.
2007-11-22 04:43:11 +00:00
Michael Brown 3a2473f123 Do not fill in the BufferLimit field in struct
s_PXENV_GET_CACHED_INFO, because this field doesn't exist in earlier
versions of the PXE spec, and some callers don't allocate space for it.
2007-11-22 00:31:21 +00:00
Michael Brown b3abf25e3c Allow DHCP server to instruct gPXE to ignore ProxyDHCP (which will
also avoid waiting for ProxyDHCP offers).

Also reduce the ProxyDHCP timeout, because it's already irritating me.
2007-11-21 22:10:04 +00:00
Michael Brown 0becbf5fba Add ProxyDHCP support. 2007-11-21 21:51:43 +00:00
Marty Connor fa0bd77270 Added netdev_nullify to natsemi_remove() 2007-11-21 15:45:08 +00:00
Michael Brown de329a36d0 Removed old e1000 driver. 2007-11-21 15:37:58 +00:00
Michael Brown b53ee1eb16 Merge commit 'origin/mdc-working' 2007-11-21 15:35:08 +00:00