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

111 Commits

Author SHA1 Message Date
Michael Brown fc7e2be617 [device] Make driver name a generic device property
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-07 23:09:19 +01:00
Michael Brown 4f4c214621 [pci] Modularise PCI device support
Some operating environments require (or at least prefer) that we do
not perform our own PCI bus scan, but deal only with specified
devices.  Modularise the PCI core to allow for this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:59:24 +00:00
Michael Brown 5bde349e55 [pci] Make driver PCI ID a property of the PCI device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:12 +00:00
Michael Brown abb5590b29 [pci] Replace pci_max_bus() with pci_num_bus()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:11 +00:00
Michael Brown f9b3fae8d4 [pci] Use single "busdevfn" field in struct pci_device
Merge the "bus" and "devfn" fields into a single "busdevfn" field, to
match the format used by the majority of external code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:11 +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
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
Michael Brown 69db6e7d8f [pci] Add support for reading and writing PCI Vital Product Data (VPD)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-24 23:58:27 +00:00
Michael Brown ef0376483c [pci] Standardise debug message format
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-24 16:59:46 +00:00
Stefan Hajnoczi e4419ff97c [virtio] Replace virtio-net with native iPXE driver
This patch adds a native iPXE virtio-net driver and removes the legacy
Etherboot virtio-net driver.  The main reasons for doing this are:

1. Multiple virtio-net NICs are now supported by iPXE.  The legacy
   driver kept global state and caused issues in virtual machines with
   more than one virtio-net device.

2. Faster downloads.  The native iPXE driver downloads 100 MB over
   HTTP in 12s, the legacy Etherboot driver in 37s.  This simple
   benchmark uses KVM with tap networking and the Python
   SimpleHTTPServer both running on the same host.

Changes to core virtio code reduce vring descriptors to 256 (QEMU uses
128 for virtio-blk and 256 for virtio-net) and change the opaque token
from u16 to void*.  Lowering the descriptor count reduces memory
consumption.  The void* opaque token change makes driver code simpler.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-07-17 17:07:14 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Bernhard Kohl 466d8fc234 [pci] Save and restore PCI command register
This seems to be necessary for some types of PCI devices. We had
problems when using gPXE in KVM virtual machines with direct
PCI device access.

Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-21 18:13:48 -05:00
Michael Brown 4175b778c2 [pci] Add generic configuration space backup/restore facility
Some devices can only be reset via a mechanism that also resets the
card's PCI core, thus necessitating a backup and restore of all or
part of the PCI configuration space across a reset.
2009-10-14 02:06:23 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 1266d7902b [tables] Redefine methods for accessing linker tables
Intel's C compiler (icc) chokes on the zero-length arrays that we
currently use as part of the mechanism for accessing linker table
entries.  Abstract away the zero-length arrays, to make a port to icc
easier.

Introduce macros such as for_each_table_entry() to simplify the common
case of iterating over all entries in a linker table.

Represent table names as #defined string constants rather than
unquoted literals; this avoids visual confusion between table names
and C variable or type names, and also allows us to force a
compilation error in the event of incorrect table names.
2009-03-13 02:06:30 +00:00
Michael Brown 1941c933f8 [pci] Enable memory cycles in adjust_pci_device()
adjust_pci_device() has historically enabled bus-mastering and I/O
cycles, but has never previously needed to enable memory cycles.  Some
EFI systems seem not to enable memory cycles by default, so add that
to the list of PCI command register bits that we force on.
2008-12-12 19:15:00 +00:00
Laurent Vivier b48f37e69a [virtio] Split virtio-net.c into several files.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
2008-11-19 19:58:51 +00:00
Michael Brown b59e0cc56e [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] long
This brings us in to line with Linux definitions, and also simplifies
adding x86_64 support since both platforms have 2-byte shorts, 4-byte
ints and 8-byte long longs.
2008-11-19 19:15:44 +00:00
Pantelis Koukousoulas 180d99fc22 [isa] Fix a small typo in isa.c.
With this patch ISA drivers actually get probed so they have a fair
chance of working now.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2008-11-08 12:54:18 +00: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
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
Holger Lubitz 85e04b5837 Revert "convert to zalloc"
This reverts commit a4bea78974.
2007-07-07 01:56:37 +02:00
Holger Lubitz e3c72a3438 Revert "convert to zalloc"
This reverts commit 3414fd8df8.
2007-07-07 01:56:27 +02:00
Holger Lubitz ac323c5e4d Revert "convert to zalloc"
This reverts commit 636bd2cd0a.
2007-07-07 01:56:15 +02:00
Holger Lubitz 50fe2159d5 Revert "convert to zalloc"
This reverts commit 7297f04481.
2007-07-07 01:55:45 +02:00
Holger Lubitz a772dc4a2a Revert "convert to zalloc"
This reverts commit 5ce16b03a1.
2007-07-07 01:55:23 +02:00
Holger Lubitz 5ce16b03a1 convert to zalloc 2007-07-06 20:42:05 +02:00
Holger Lubitz 7297f04481 convert to zalloc 2007-07-06 20:42:05 +02:00
Holger Lubitz 636bd2cd0a convert to zalloc 2007-07-06 20:42:05 +02:00
Holger Lubitz 3414fd8df8 convert to zalloc 2007-07-06 20:42:05 +02:00
Holger Lubitz a4bea78974 convert to zalloc 2007-07-06 20:42:05 +02:00
Michael Brown b5311c2c88 This comment is no longer relevant. 2007-07-03 20:39:47 +01:00
Michael Brown 0924cf678e Implemented (untested) PXENV_START_UNDI. 2007-07-03 18:17:14 +01:00
Michael Brown 5f17089b14 pxe_netdev now holds a reference to the network device.
Use generic fields in struct device_description rather than assuming
that the struct device * is contained within a pci_device or
isapnp_device; this assumption is broken when using the undionly
driver.

Add PXENV_UNDI_SET_STATION_ADDRESS.
2007-07-02 17:43:32 +01:00
Michael Brown 520d9c36af Updated ISAPnP, EISA, MCA and ISA buses to current device model.
ISA 3c509 is currently non-functional, although the EISA (3c509-eisa) and
MCA (3c529) variants should build OK.

None of this code is yet tested.
2007-03-10 18:08:33 +00:00
Michael Brown 73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown fdc97499bf Add device description fields to struct device. 2007-01-10 15:27:48 +00:00
Michael Brown dad5274522 Add "name" field to struct device to allow human-readable hardware device
names.

Add "dev" pointer in struct net_device to tie network interfaces back to a
hardware device.

Force natural alignment of data types in __table() macros.  This seems to
prevent gcc from taking the unilateral decision to occasionally increase
their alignment (which screws up the table packing).
2007-01-10 04:22:09 +00:00
Michael Brown 5af4918356 Added support for wildcard device/vendor ID matches 2007-01-08 03:23:38 +00:00
Michael Brown 7b9617f5df Add device to hierarchy before calling the driver's probe() function; this
way everything remains consistent if the probe() ends up creating child
devices.
2007-01-08 01:29:51 +00:00
Michael Brown 9f953322a1 Remove warning (at least on platforms with uint32_t == unsigned long). 2006-12-20 00:34:53 +00:00
Michael Brown a646e38f03 Use stdlib.h for malloc() instead of malloc.h. 2006-12-19 23:42:46 +00:00
Michael Brown 88e38fa148 We don't actually have a stdio.h header file. Our printf() functions are
defined in vsprintf.h.  (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)

There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.
2006-09-27 10:58:14 +00:00
Marty Connor 6ac78f6aff added stdio.h to includes for DBG compilation 2006-09-27 05:57:06 +00:00
Michael Brown c3e41e6fd1 Added soon-to-be-requisite missing include. 2006-06-05 15:41:22 +00:00
Michael Brown 6b6096d28b Strip down i386 PCI configuration space I/O to the bare minimum. A
typical build will now include 880 bytes of PCI support code, compared to
2327 bytes in Etherboot 5.4.

(There is a slight cost of around 5 extra bytes per access to a
non-constant config space address; this should be an overall win.
Driver-specific accesses will usually be to constant addresses, for
which there is no additional cost.)
2006-05-17 01:12:11 +00:00
Michael Brown 15ee09ed10 Restructured PCI subsystem to fit the new device model.
Generic PCI code now handles 64-bit BARs correctly when setting
"membase"; drivers should need to call pci_bar_start() only if they want
to use BARs other than the first memory or I/O BAR.

Split rarely-used PCI functions out into pciextra.c.

Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4).
284 bytes of this saving comes from the pci/pciextra split.

Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to
match the names used in Linux).
2006-05-16 15:12:06 +00:00
Michael Brown 824d6ffa7f Header rearrangement.
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.
2006-04-24 15:42:49 +00:00
Michael Brown bb7394b041 Merge from Etherboot 5.4 2006-03-16 17:59:51 +00:00