summaryrefslogtreecommitdiffstats
path: root/src/drivers/bus
Commit message (Collapse)AuthorAgeFilesLines
...
* [settings] Explicitly separate the concept of a completed fetched settingMichael Brown2013-12-051-2/+2
| | | | | | | | | | The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Add pci_find_next() to iterate over existent PCI devicesMichael Brown2013-08-051-21/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose PCI configuration space via settings mechanismMichael Brown2013-07-131-0/+124
| | | | | | | | | | | | | | | | Allow values to be read from PCI configuration space using the syntax ${pci/<busdevfn>.<offset>.<length>} where <busdevfn> is the bus:dev.fn address of the PCI device (expressed as a single integer, as returned by ${net0/busloc}), <offset> is the offset within PCI configuration space, and <length> is the length within PCI configuration space. Values are returned in reverse byte order, since PCI configuration space is little-endian by definition. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-204-4/+8
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [isa] Avoid spurious compiler warning on gcc 4.7Michael Brown2012-07-201-3/+3
| | | | | | | | gcc 4.7 produces a spurious warning about an array subscript being out of bounds. Use a pointer dereference instead of an array lookup to inhibit this spurious warning. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [device] Make driver name a generic device propertyMichael Brown2011-04-084-6/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Modularise PCI device supportMichael Brown2011-02-171-47/+79
| | | | | | | | 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>
* [pci] Make driver PCI ID a property of the PCI deviceMichael Brown2011-02-171-3/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Replace pci_max_bus() with pci_num_bus()Michael Brown2011-02-171-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Use single "busdevfn" field in struct pci_deviceMichael Brown2011-02-171-60/+57Star
| | | | | | | 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>
* [pci] Add ability to resize a VPD fieldMichael Brown2011-01-191-0/+161
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Allow pci_vpd_init() return status to be ignoredMichael Brown2011-01-191-0/+8
| | | | | | | | 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>
* [legal] Add FILE_LICENCE macro to some GPL-v2-or-later filesShao Miller2010-12-041-0/+2
| | | | | | | | | 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>
* [pci] Add support for reading and writing PCI Vital Product Data (VPD)Michael Brown2010-11-251-0/+386
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Standardise debug message formatMichael Brown2010-11-241-19/+17Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [virtio] Replace virtio-net with native iPXE driverStefan Hajnoczi2010-07-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* [build] Rename gPXE to iPXEMichael Brown2010-04-2010-21/+21
| | | | | | | | | | | 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>
* [pci] Save and restore PCI command registerBernhard Kohl2010-01-221-0/+5
| | | | | | | | | | | 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>
* [pci] Add generic configuration space backup/restore facilityMichael Brown2009-10-141-0/+90
| | | | | | 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.
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-186-0/+12
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-135-30/+5Star
| | | | | | | | | | | | | | | 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.
* [pci] Enable memory cycles in adjust_pci_device()Michael Brown2008-12-121-1/+2
| | | | | | | 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.
* [virtio] Split virtio-net.c into several files.Laurent Vivier2008-11-192-0/+198
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] longMichael Brown2008-11-192-2/+2
| | | | | | 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.
* [isa] Fix a small typo in isa.c.Pantelis Koukousoulas2008-11-081-2/+2
| | | | | | | 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>
* [ioapi] Remove old io.h file and switch all users over to <gpxe/io.h>Michael Brown2008-10-124-4/+4
|
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-023-3/+2Star
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Revert "convert to zalloc"Holger Lubitz2007-07-071-1/+2
| | | | This reverts commit a4bea78974620820774a59f49646eafbdb481148.
* Revert "convert to zalloc"Holger Lubitz2007-07-071-1/+2
| | | | This reverts commit 3414fd8df8c514947254fd065d407e8db115221f.
* Revert "convert to zalloc"Holger Lubitz2007-07-071-1/+2
| | | | This reverts commit 636bd2cd0abfd9ae774456cd1c00e3f8bb63e7d8.
* Revert "convert to zalloc"Holger Lubitz2007-07-071-1/+2
| | | | This reverts commit 7297f04481f6737b0a40161da6d8413ca0f478d2.
* Revert "convert to zalloc"Holger Lubitz2007-07-071-1/+2
| | | | This reverts commit 5ce16b03a1cb036ad0ab818473fe8f9c158949ed.
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* This comment is no longer relevant.Michael Brown2007-07-031-5/+0Star
|
* Implemented (untested) PXENV_START_UNDI.Michael Brown2007-07-031-1/+1
|
* pxe_netdev now holds a reference to the network device.Michael Brown2007-07-022-0/+5
| | | | | | | | | 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.
* Updated ISAPnP, EISA, MCA and ISA buses to current device model.Michael Brown2007-03-106-744/+696Star
| | | | | | | 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.
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Add device description fields to struct device.Michael Brown2007-01-101-0/+4
|
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-102-7/+15
| | | | | | | | | | | 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).
* Added support for wildcard device/vendor ID matchesMichael Brown2007-01-081-1/+4
|
* Add device to hierarchy before calling the driver's probe() function; thisMichael Brown2007-01-081-21/+16Star
| | | | | way everything remains consistent if the probe() ends up creating child devices.
* Remove warning (at least on platforms with uint32_t == unsigned long).Michael Brown2006-12-201-1/+1
|
* Use stdlib.h for malloc() instead of malloc.h.Michael Brown2006-12-201-1/+1
|
* We don't actually have a stdio.h header file. Our printf() functions areMichael Brown2006-09-272-2/+0Star
| | | | | | | | 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.
* added stdio.h to includes for DBG compilationMarty Connor2006-09-272-0/+2
|