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

2521 Commits

Author SHA1 Message Date
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
Michael Brown fb809da2df Remove some assumptions about DHCP obtaining only a single options block. 2007-11-21 04:48:18 +00:00
Michael Brown 8d18338ae7 Add PXE-required DHCP options to DHCPDISCOVER and DHCPREQUEST packets. 2007-11-21 03:57:30 +00:00
Michael Brown 26f3a09ccf Add UUID to DHCP request as option 97 (if available). 2007-11-21 03:29:53 +00:00
Marty Connor 2d60a3963f Fixed receive instability by not enabling interrupts. duh.
I have successfully booted DOS via iSCSI and PXELINUX via TFTP with this
version of the e1000 driver.
2007-11-20 21:33:42 -05:00
Michael Brown 899f5b8ab2 Added definition of a UUID and uuid_ntoa() (for debugging), and
implemented smbios_get_uuid().
2007-11-21 02:27:07 +00:00
Michael Brown 68c438954d Update SMBIOS internal API to be easier to use, and not to require
potentially exorbitant amounts of stack space.
2007-11-21 01:58:27 +00:00
Marty Connor 645a752bc2 This version now transmits and receives.
There may still be an issue with memory handling, since it seems to
die ungracefully when ARP packets come in after loading a kernel.
Something to debug.
2007-11-20 16:23:12 -05:00
Marty Connor 8973caa1e6 Autonegotiation fixes. NIC now autonegotiates to whatever the switch supports. 2007-11-20 12:06:22 -05:00
Marty Connor e41550b0ba A version of the new e1000 driver that transmits.
autonegotiation still needs work.  receive is not working yet.
2007-11-20 10:23:32 -05:00
Michael Brown 89eaab79c8 Replace "Etherboot" strings with "gPXE". 2007-11-20 02:00:54 +00:00
Michael Brown 6855c357a5 Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2007-11-19 20:14:49 +00:00
Michael Brown a1e243d504 Add bin/pci_VVVV_DDDD target to allow building ROM images without
needing to know the gPXE internal ROM name.
2007-11-19 20:14:20 +00:00
Marty Connor 8ce93f0876 Fix typo. 2007-11-18 11:12:54 -05:00
Marty Connor e21391d7b5 Add e1000 directory to build, since the driver compiles cleanly. 2007-11-18 10:57:20 -05:00
Marty Connor 8b0d86914b Rename e1000_main.c to e1000.c to so we can type 'make bin/e1000.dsk' instead of 'make bin/e1000_main.dsk' 2007-11-18 10:54:42 -05:00
Marty Connor 048a234dce Add errfile definition for new e1000.c 2007-11-18 10:45:20 -05:00
Marty Connor 0fea19c398 Introduce files for new e1000 driver 2007-11-18 10:31:00 -05:00
Marty Connor 2b8f77aca1 Add src/drivers/net/e1000 as home of new e1000 driver 2007-11-18 10:28:25 -05:00
Marty Connor 8564711c20 Move current e1000 driver files to e1000-old/ directory to avoid collisions 2007-11-18 09:58:28 -05:00
Marty Connor 8bd670301c Add ERRFILE information for e1000_main and e1000_hw, part of the new e1000 driver
It is likely we will rename e1000_main to e1000 when the new e1000 driver is debugged.
2007-11-18 09:51:21 -05:00
Marty Connor 9a4ed0f2d5 Remove unnecessary variable. 2007-11-18 03:11:02 -05:00
Michael Brown c194b0c4bf Work around a bug in the OpenSolaris iSCSI target.
We didn't specify values for MaxRecvDataSegmentLength and
MaxBurstLength (to save space, since we were happy with the
RFC-defined default values of 8kB and 256kB respectively).  However,
the OpenSolaris target (incorrectly) assumes default values of zero
for these parameters.

The upshot was that the OpenSolaris target would get stuck in an
endless loop trying to send us the first 512-byte sector, zero bytes
at a time, and would eventually run out of memory and core-dump.

Fixed by explicitly specifying the default values for these two
parameters.
2007-11-05 13:29:05 +00:00
Michael Brown 755cb8379d Allow space for the kernel's real-mode .bss. Previously we weren't
allowing any space for this, which makes it surprising that bzImage
loading ever worked.
2007-11-04 04:27:38 +00:00
Michael Brown c482fef058 Add missing attribute(packed) to two structures. 2007-10-29 21:22:00 +00:00
Michael Brown 82124ea688 Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2007-10-29 17:22:27 +00:00
Michael Brown 1620b3512c Merge branch '3leaf' 2007-10-29 17:21:58 +00:00
Michael Brown be7d32396f Added one more PCI ID 2007-10-22 16:24:09 +01:00
Michael Brown 338d45a61e Change ROM names to lower case. 2007-10-11 00:43:21 +01:00
Michael Brown 35ee7e4479 Ensure that empty e820 regions are skipped even at the end of the
memory map.  (We achieve this by setting CF on the last entry if it is
zero-length; this avoids the need to look ahead to see at each entry
if the *next* entry would be both the last entry and zero-length).

This fixes the "0kB base memory" error message upon starting Windows
2003 on a SunFire X2100.
2007-10-10 20:13:34 +01:00
Michael Brown e445c2c07c Ensure that empty e820 regions are skipped even at the end of the
memory map.  (We achieve this by setting CF on the last entry if it is
zero-length; this avoids the need to look ahead to see at each entry
if the *next* entry would be both the last entry and zero-length).

This fixes the "0kB base memory" error message upon starting Windows
2003 on a SunFire X2100.
2007-10-10 20:12:25 +01:00
Michael Brown 8069598a99 Add a missing PCI ID that is tested as working. 2007-10-10 02:07:18 +01:00
Michael Brown 9ac0377fbb Force a netdevice poll in net_tx() before attempting to transmit
packet, to work around the problem whereby small TX rings get backed
up because we haven't yet poll()ed for TX completions.
2007-10-04 14:57:33 +01:00
Michael Brown 2303c45d65 Force a netdevice poll in net_tx() before attempting to transmit
packet, to work around the problem whereby small TX rings get backed
up because we haven't yet poll()ed for TX completions.
2007-10-04 14:46:56 +01:00
Michael Brown 56550e400e Redefine bzimage_exec_context::mem_limit to be the highest permissible
byte, rather than the number of permissible bytes (i.e. subtract one
from the value under the previous definition to get the value under
the new definition).

This avoids integer overflow on 64-bit kernels, where
bzhdr.initrd_addr_max may be 0xffffffffffffffff; under the old
behaviour we set mem_limit equal to initrd_addr_max+1, which meant it
ended up as zero.  Kernel loads would fail with ENOBUFS.
2007-09-28 01:23:06 +01:00
Michael Brown 14fb6ba189 Quick and very dirty hack to get r8169 driver working again, prior to
any rewrite.
2007-09-26 17:58:51 +01:00
Michael Brown ed5ff61790 Standardise DBG_PRINTF()->DBG(), and remove custom definitions for
DBG_PRINTF() and assert().
2007-09-26 17:38:36 +01:00
Michael Brown 881dd8e102 Switch rm_ss and rm_sp back to being words; it'll make it less
confusing to read the code.
2007-09-25 20:16:32 +01:00
Michael Brown 42d96bcb07 Don't use the "rep ss movsb" trick to copy the RM stack to the PM
stack; it breaks vmxassist.
2007-09-25 20:14:20 +01:00
Michael Brown 0ed066bc50 rm_ss, rm_sp, and pm_esp don't need to be accessed from anywhere
outside of librm.S.
2007-09-25 19:20:38 +01:00
Michael Brown b8a8eea850 Minor refactoring to eliminate duplication. 2007-09-25 19:06:38 +01:00
Michael Brown dec325fe43 Use full protected mode for access to high memory within prefix, to
work around limitations in real-mode virtualisation support on Intel
VT-capable chips.
2007-09-25 18:01:15 +01:00
Michael Brown a7eee64506 Added more verbose memory-map debugging.
Added redundant call to get_memmap() in int13_boot() immediately
before jumping to boot sector, to assist in debugging.
2007-09-21 18:33:17 +01:00
Michael Brown 0979e674bb Added more verbose memory-map debugging.
Added redundant call to get_memmap() in int13_boot() immediately
before jumping to boot sector, to assist in debugging.
2007-09-21 18:27:51 +01:00
Michael Brown 44461b1854 Merge branch 'master' into 3leaf-delivery 2007-09-21 01:27:03 +01:00
Michael Brown 1e677b2024 Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe 2007-09-21 01:26:06 +01:00
Michael Brown 5793dbe96f Infinband requires longer link-layer addresses and headers than Ethernet. 2007-09-21 01:23:57 +01:00
Michael Brown 2ee76d0c93 Added defines for Infiniband files (which can't be committed to the
main tree yet, but reserving the error numbers now avoids problems later).
2007-09-21 01:19:04 +01:00
Michael Brown 1af346b531 Minor debug message improvement. 2007-09-21 01:17:46 +01:00
Michael Brown af303db75d Use RFC4390 whenever hardware address exceeds 16 bytes; this allows us
to construct DHCP packets suitable for Infiniband.
2007-09-21 01:15:58 +01:00
Michael Brown 9c264faa0c Add const attribute to byte-swapping functions 2007-09-21 01:15:06 +01:00
Michael Brown 7e3527a658 Don't get stuck in an infinite loop on negative integers! 2007-09-21 01:14:44 +01:00
Michael Brown db124b1255 Add fls() for non-constant values. 2007-09-21 01:14:38 +01:00
Michael Brown f09173326c Moved iobuf.h assertions outside the static inline functions, so that
the assert message's file and line number gives some clue as to the
real location of the problem.

Added similar assertions to list.h.
2007-09-21 01:13:22 +01:00
Michael Brown 0f60150c44 Reverted driver/net/mlx_ipoib to clean master state 2007-09-18 07:07:04 +01:00
Michael Brown 30717896f5 IB can't afford many RX buffers, because the MTU is so large. Reduce
the TCP window to compensate.
2007-09-18 07:02:41 +01:00
Michael Brown 2f23881856 Added arbel.c 2007-09-18 06:37:22 +01:00
Michael Brown 95498fa038 Remove the last remaining visible hack. 2007-09-18 06:26:31 +01:00
Michael Brown 982e4dd101 Separated out to a clean new drivers/infiniband directory. 2007-09-18 06:06:55 +01:00
Michael Brown a5ec029d24 First version that works with SELF_INIT! 2007-09-18 05:46:49 +01:00
Michael Brown 8423b0b109 Gets most of the way through initialisation. 2007-09-18 05:39:34 +01:00
Michael Brown def5ae9127 Added sw2hw_mpt 2007-09-18 04:45:55 +01:00
Michael Brown da014080f9 INIT_HCA block now matches. 2007-09-18 04:20:41 +01:00
Michael Brown 57bf8d9905 Seems to get through the ICM mapping process 2007-09-18 03:58:59 +01:00
Michael Brown 4ea6223f5a ICM allocation code in place; about to start test-and-compare runs. 2007-09-18 02:57:49 +01:00
Michael Brown f20cd6f721 ICM allocation code *should* now be complete. 2007-09-18 02:05:25 +01:00
Michael Brown af88f60228 Started with the ICM partitioning code. 2007-09-18 01:49:39 +01:00
Michael Brown c818d47e25 Restructured bits of initialisation (not testable at present) 2007-09-17 22:25:46 +01:00
Michael Brown dc3165b746 Starting the firmware directly now works. 2007-09-17 21:59:41 +01:00
Michael Brown 0f62bcaa77 Start migrating the remaining initialisation steps. 2007-09-17 21:14:09 +01:00
Michael Brown f3fcb53faf Don't use the mailboxless version of the HW2SW_CQ command; it seems to
crash the machine.
2007-09-17 19:47:19 +01:00
Michael Brown 12b4cb964b Removed more hacks, and adjusted number of queue entries for likely usage. 2007-09-17 19:17:55 +01:00
Michael Brown 11541b1e01 Remove hacks, and fix leaving the multicast GID. 2007-09-17 19:12:06 +01:00
Michael Brown 267a4483ab Added an almost obscene amount of debugging and assertion code while
tracking down a bug that turned out to be a free_iob() used where I
needed a netdev_tx_complete().  This left the freed I/O buffer on the
net device's TX list, with bad, bad consequences later.

Also fixed the bug in question.
2007-09-17 19:01:10 +01:00
Michael Brown 387a1a8556 Minor debug message improvement. 2007-09-17 18:57:32 +01:00
Michael Brown 2c56ede6f8 Moved iobuf.h assertions outside the static inline functions, so that
the assert message's file and line number gives some clue as to the
real location of the problem.

Added similar assertions to list.h.
2007-09-17 18:38:04 +01:00
Michael Brown bdac591726 Some interesting packet corruption happening now. 2007-09-17 13:31:13 +01:00
Michael Brown 2ed1acb9e9 Broadcast GID is now calculated by IPoIB layer. 2007-09-17 11:50:25 +01:00
Michael Brown 32a7bbb1e3 Cleaned up some debug messages. 2007-09-17 10:56:21 +01:00
Michael Brown ab191e45db Unicasts seem to be working. :) 2007-09-17 10:39:30 +01:00
Michael Brown 2209090120 Dead code disabling 2007-09-17 08:41:06 +01:00
Michael Brown b3d3814c17 Obtains a response to the get path record! 2007-09-17 08:36:56 +01:00
Michael Brown e05a8cd4de Use pkey table access to determine broadcast GID directly. 2007-09-17 06:35:21 +01:00
Michael Brown f6f1f2b7bb Prepare for adding a metadata queue to IPoIB 2007-09-17 06:12:33 +01:00
Michael Brown 440e7926fb Dead code removal 2007-09-17 05:12:47 +01:00
Michael Brown 4e78a53cf2 IPoIB code separated out to ipoib.c. 2007-09-17 05:04:58 +01:00
Michael Brown 67836430e6 Read port GID directly using MAD IFC. 2007-09-17 02:54:15 +01:00
Michael Brown 3c6a6bdc5d Multicast join now works. 2007-09-17 00:24:44 +01:00
Michael Brown 96d0c75c00 Now transmits packets on our own allocated IPoIB queue pair. :) 2007-09-16 22:53:57 +01:00
Michael Brown 4ddb6570f8 Almost working with own-queue allocation. 2007-09-16 22:47:45 +01:00
Michael Brown 7e85f0d296 create_qp() and destroy_qp() now written (but not tested). 2007-09-16 20:54:21 +01:00
Michael Brown 251cc84ed6 Started implementing create_qp() and destroy_qp(). 2007-09-16 19:03:24 +01:00
Michael Brown 83a6cc8c9b Don't get stuck in an infinite loop on negative integers! 2007-09-16 17:39:29 +01:00
Michael Brown 6d15a193aa Add fls() for non-constant values. 2007-09-16 17:36:40 +01:00
Michael Brown b21d4ca21e Revert to dev_priv/owner_priv scheme, rather than container_of; it
makes it easier to put the generic allocation code into infiniband.c
2007-09-16 17:25:15 +01:00
Michael Brown e238bb1e43 destroy_cq() now implemented (not tested). 2007-09-16 14:39:51 +01:00
Michael Brown 18edcf6634 create_cq() implemented (but not tested). 2007-09-16 14:18:17 +01:00
Michael Brown 725a574042 Match doorbell layout to expected usage. 2007-09-16 13:10:15 +01:00
Michael Brown 5a43293c38 Started to add code for CQ creation 2007-09-16 12:52:58 +01:00
Michael Brown 156b409ccc Rearrange data structures to maximise embedding (and hence minimise
the number of separate allocations that need to be done).
2007-09-16 04:02:20 +01:00
Michael Brown 791f992657 Command interface now reasonably friendly. 2007-09-16 03:13:25 +01:00