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

2438 Commits

Author SHA1 Message Date
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 7067142fb4 [Contribs] Add updated wake-on-LAN patch from Bill <level42@sympatico.ca> 2008-03-19 01:08:38 +00: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