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

2842 Commits

Author SHA1 Message Date
Michael Brown 3a505dfc35 [netdevice] Change link-layer push() and pull() methods to take raw types
EFI requires us to be able to specify the source address for
individual transmitted packets, and to be able to extract the
destination address on received packets.

Take advantage of this to rationalise the push() and pull() methods so
that push() takes a (dest,source,proto) tuple and pull() returns a
(dest,source,proto) tuple.
2008-10-16 05:13:40 +01:00
Michael Brown 6b9cc25556 [netdevice] Split multicast hashing out into an mc_hash method
Multicast hashing is an ugly overlap between network and link layers.
EFI requires us to provide access to this functionality, so move it
out of ipv4.c and expose it as a method of the link layer.
2008-10-16 05:12:56 +01:00
Michael Brown 832668105e [netdevice] Add maximum packet length as a net device property
Currently this length is set at device allocation time, and is never
changed.
2008-10-16 05:11:47 +01:00
Michael Brown 64e5ca0582 [efi] Fix linker script for ld 2.17.50.0.9
Some versions of ld choke on the "AT ( _xxx_lma )" in efi.lds with an
error saying "nonconstant expression for load base".  Since these were
only explicitly setting the LMA to the address that it would have had
anyway, they can be safely omitted.
2008-10-13 10:41:38 +01:00
Michael Brown 81d92c6d34 [efi] Add EFI image format and basic runtime environment
We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user
access and user memory allocation.

EFI executables are created using the vanilla GNU toolchain, with the
EXE header handcrafted in assembly and relocations generated by a
custom efilink utility.
2008-10-13 10:24:14 +01:00
Michael Brown 54c024e0af [sanboot] Quick and dirty hack to make SAN boot protocols selectable 2008-10-13 10:05:51 +01:00
Michael Brown d4e152e766 [config] Make the default image type selection platform-dependent 2008-10-13 09:37:51 +01:00
Michael Brown 07e8f18f33 [monojob] Release reference on completed job
monojob_wait() was holding a reference to the completed job, meaning that
various objects would not be freed until the next job was plugged in to
the monojob interface.
2008-10-13 05:34:08 +01:00
Michael Brown 831e4cfc27 [umalloc] Formalise the user memory allocation API 2008-10-13 05:33:14 +01:00
Michael Brown 6554b79ff9 [uaccess] Formalise the uaccess API
The userptr_t is now the fundamental type that gets used for conversions.
For example, virt_to_phys() is implemented in terms of virt_to_user() and
user_to_phys().
2008-10-13 04:10:34 +01:00
Michael Brown 667819becc [timer] Remove now-obsolete references to TIMER_BIOS and TIMER_RDTSC 2008-10-13 00:23:18 +01:00
Michael Brown c0835339d0 [nap] Formalise the CPU sleeping API 2008-10-12 23:36:53 +01:00
Michael Brown 658c6dba59 [monojob] Allow for extremely slow system timers
The EFI timer runs at one tick per second, so using ">" rather than ">="
results in a two-second gap between dots.
2008-10-12 21:30:37 +01:00
Michael Brown 16f1e35775 [timer] Formalise the timer API
We now have two implementations for the timer API: one using the
time-of-day counter at 40:70 and one using RDTSC.  Both make use of
timer2_udelay().
2008-10-12 20:22:02 +01:00
Michael Brown e6f276ece3 [process] Add DBG2() messages to help track down frozen processes 2008-10-12 15:11:29 +01:00
Michael Brown f945d6d201 [retry] Use a separate flag to indicate that a retry timer is running
Using start==0 to indicate a stopped timer is dangerous, because 0 is a
valid value for the current tick counter.
2008-10-12 15:11:20 +01:00
Michael Brown 941b4c2adb [commands] Fix config command to accept zero arguments 2008-10-12 15:11:10 +01:00
Michael Brown 8a4ccebec9 [pci] Formalise the PCI I/O API 2008-10-12 12:54:12 +01:00
Michael Brown fd67452807 [legacy] Add missing #include <gpxe/io.h> 2008-10-12 12:52:56 +01:00
Michael Brown e226a8d8d9 [phantom] Add missing #include <gpxe/io.h> 2008-10-12 12:52:47 +01:00
Michael Brown 8c7deba349 [config] Split console configuration out to config/console.h 2008-10-12 02:30:31 +01:00
Michael Brown aef6d0df5c [ioapi] Absorb virt_to_phys() and phys_to_virt() into the I/O API 2008-10-12 02:15:34 +01:00
Michael Brown 992bbf309c [i386] Remove obsolete functions from virtaddr.h
The copy_{to,from}_phys() functions were obsoleted long ago by
copy_{to,from}_user().

relocate_to() also disappeared some time ago.
2008-10-12 02:14:26 +01:00
Michael Brown 8e38669d54 [rtl8139] Add missing #include <string.h> 2008-10-12 02:14:16 +01:00
Michael Brown a1e11a6beb [natsemi] Add missing #include <string.h> 2008-10-12 02:14:10 +01:00
Michael Brown 1641b5d39b [e1000] Add missing #include <string.h> 2008-10-12 02:14:05 +01:00
Michael Brown ee2df1d6d6 [ioapi] Remove old io.h file and switch all users over to <gpxe/io.h> 2008-10-12 01:06:27 +01:00
Michael Brown 8956a36be5 [ioapi] Formalise the I/O API as used in i386-pcbios 2008-10-12 01:03:17 +01:00
Michael Brown b40b4f2dbf [cs89x0] Simplify obscure loop syntax 2008-10-12 00:54:58 +01:00
Michael Brown 0b5c39d167 [e1000] Fix dubious syntax in e1000 I/O wrapper macros 2008-10-12 00:54:44 +01:00
Michael Brown 2e812235f4 [makefile] Add -Wformat-nonliteral as an extra warning category
-Wformat-nonliteral is not enabled by -Wall and needs to be explicitly
 specified.

Modified the few files that use nonliteral format strings to work with
this new setting in place.

Inspired by a patch from Carl Karsten <carl@personnelware.com> and an
identical patch from Rorschach <r0rschach@lavabit.com>.
2008-10-10 18:41:24 +01:00
Michael Brown ac663cf509 [efi] Add EFI headers from the EFI Development Kit (edk2)
The intention is to include near-verbatim copies of the EFI headers
required by gPXE.  This is achieved using the import.pl script in
src/include/gpxe/efi.

Note that import.pl will modify any #include lines in each imported
header to reflect its new location within the gPXE tree.  It will also
tidy up the file by removing carriage return characters and trailing
whitespace.
2008-10-10 04:04:07 +01:00
Michael Brown 13d09e6719 [i386] Simplify linker script and standardise linker-defined symbol names
Reduce the number of sections within the linker script to match the
number of practical sections within the output file.

Define _section, _msection, _esection, _section_filesz, _section_memsz,
and _section_lma for each section, replacing the mixture of symbols that
previously existed.

In particular, replace _text and _end with _textdata and _etextdata, to
make it explicit within code that uses these symbols that the .text and
.data sections are always treated as a single contiguous block.
2008-10-10 03:59:57 +01:00
Michael Brown 3029eb0e84 [makefile] Reduce verbosity of various NON_AUTO_MEDIA rules 2008-10-10 03:57:31 +01:00
Michael Brown 5c695db474 [makefile] Split platform-dependent portions out of arch/i386/Makefile 2008-10-10 03:45:34 +01:00
Michael Brown 98abd48a26 [makefile] Inhibit warnings if AUTO_DEPS or MEDIA_DEPS are empty lists 2008-10-10 03:42:56 +01:00
Michael Brown 3f80f9e1a6 [makefile] Add missing dependency on arch/$(ARCH)/Makefile to MAKEDEPS 2008-10-10 03:42:37 +01:00
Michael Brown cdd619d11f [util] Don't die on undefined symbols in sortobjdump.pl
Undefined symbols shouldn't reach sortobjdump.pl, but if they do then it
is not a helpful place to report the error.
2008-10-10 03:42:22 +01:00
Michael Brown 96ea558e98 [util] Add optional debug messages to zbin.c 2008-10-10 03:42:08 +01:00
Michael Brown e817a347fb [makefile] Split config.h out into config/*.h and kill off mkconfig.pl 2008-10-08 02:17:32 +01:00
Michael Brown a2588547f9 [makefile] Add support for multiple build platforms
Allow for the build CPU architecture and platform to be specified as part
of the make command goals.  For example:

  make bin/rtl8139.rom      # Standard i386 PC-BIOS build

  make bin-efi/rtl8139.efi  # i386 EFI build

The generic syntax is "bin[-[arch-]platform]", with the default
architecture being "i386" (regardless of the host architecture) and the
default platform being "pcbios".

Non-path targets such as "srcs" can be specified using e.g.

  make bin-efi srcs

Note that this changeset is merely Makefile restructuring to allow the
build architecture and platform to be determined by the make command
goals, and to export these to compiled code via the ARCH and PLATFORM
defines.  It doesn't actually introduce any new build platforms.
2008-10-08 02:17:25 +01:00
Michael Brown f0b942ef42 [makefile] Kill off arch/$(ARCH)/Config
The arch/i386/Config file has long been marked as deprecated.  Move all
the pertinent bits to arch/i386/Makefile instead and remove
arch/i386/Config.
2008-10-07 22:46:43 +01:00
Michael Brown 160b950af8 [libc] Define wchar_t in a gcc-compatible way
gcc defines the magic __WCHAR_TYPE__ macro, in order to convey
information about whether or not the user selected -fshort-wchar.
2008-10-07 22:27:55 +01:00
Michael Brown 19a0452205 [libc] Add function declaration for main() in stdlib.h 2008-10-07 22:04:50 +01:00
Michael Brown 521549d900 [crypto] Rename <gpxe/bitops.h> to <gpxe/rotate.h> 2008-10-01 19:24:56 +01:00
Michael Brown 9dccbc0af2 [i2c] Generalise i2c bit-bashing support to addressless devices
Some devices (e.g. the Atmel AT24C11) have no concept of a device
address; they respond to every device address and use this value as
the word address.  Some other devices use part of the device address
field to extend the word address field.

Generalise the i2c bit-bashing support to handle this by defining the
device address length and word address length as properties of an i2c
device.  The word address is assumed to overflow into the device
address field if the address used exceeds the width of the word
address field.

Also add a bus reset mechanism.  i2c chips don't usually have a reset
line, so rebooting the host will not clear any bizarre state that the
chip may be in.  We reset the bus by clocking SCL until we see SDA
high, at which point we know we can generate a start condition and
have it seen by all devices.  We then generate a stop condition to
leave the bus in a known state prior to use.

Finally, add some extra debugging messages to i2c_bit.c.
2008-10-01 19:24:56 +01:00
Michael Brown 91802c6e85 [makefile] Fix -fno-stack-protector test on older versions of gcc
Some older versions of gcc don't complain about unknown compiler flags
unless you ask them to actually compile; asking them to merely
preprocess won't trigger the error.

Fix the -fno-stack-protector test by making it attempt to compile an
empty file, rather than preprocess an empty file.
2008-10-01 19:24:56 +01:00
Michael Brown afe1323c76 [compiler] Allow for selective disabling of debug levels at runtime
The usefulness of DBGLVL_IO is limited by the fact that many cards
require large numbers of uninteresting I/O reads/writes at device
probe time, typically when driving a bit-bashing I2C/SPI bus to read
the MAC address.

This patch adds the DBG_DISABLE() and DBG_ENABLE() macros, which can
be used to temporarily disable and re-enable selected debug levels.
Note that debug levels must still be enabled in the build in order to
function at all: you can't use DBG_ENABLE(DBGLVL_IO) in an object
built with DEBUG=object:1 and expect it to do anything.
2008-10-01 19:24:56 +01:00
Michael Brown 9b01a9fd9c [compiler] Add __always_inline macro 2008-10-01 19:24:56 +01:00
Marty Connor 60c3b69c31 [release] Update version to 0.9.5+ post release 2008-10-01 13:46:16 -04:00