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

58 Commits

Author SHA1 Message Date
Michael Brown f76210961c [pci] Support systems with multiple PCI root bridges
Extend the 16-bit PCI bus:dev.fn address to a 32-bit seg🚌dev.fn
address, assuming a segment value of zero in contexts where multiple
segments are unsupported by the underlying data structures (e.g. in
the iBFT or BOFM tables).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-09 09:36:28 +01:00
Michael Brown e399fc0d21 [pci] Rewrite unrelicensable portions of pci.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-03 00:08:41 +00:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown 072d656a2f [pci] Allow drivers to specify a PCI class
Allow drivers to specify a supported PCI class code.  To save space in
the final binary, make this an attribute of the driver rather than an
attribute of a PCI device ID list entry.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-02 14:31:18 +00:00
Michael Brown 6d910559b3 [pci] Add pci_find_next() to iterate over existent PCI devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-05 13:51:16 +01:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +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 ef0376483c [pci] Standardise debug message format
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-24 16:59:46 +00: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
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
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
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
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 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
Michael Brown 5bace628ae Added "name" field to bus structure. 2005-04-25 18:54:15 +00:00
Michael Brown 924143661a Updated all common buses to new API. 2005-04-22 02:28:16 +00:00
Michael Brown cfe3a663af Tweaked API to minimise changes to existing drivers even further. 2005-04-21 19:04:53 +00:00
Michael Brown 98ff29345e Created a bus/device API that allows for the ROM prefix to specify an
initial device, and will also allow for e.g. a device menu to be presented
to the user.
2005-04-21 18:18:29 +00:00
Michael Brown 03346742c0 Use only the header files that we need 2005-04-17 10:51:05 +00:00
Michael Brown 5ca20abf95 Place the call to adjust_pci_device() back in the individual drivers,
since we probably shouldn't be doing this to arbitrary devices during a
PCI bus scan...
2005-04-16 17:30:37 +00:00
Michael Brown 7bd3e883d7 Consistency 2005-04-16 11:43:16 +00:00
Michael Brown e29be5e342 Speed up PCI bus scanning by skipping fns 1-7 if fn 0 is not present. 2005-04-16 11:42:56 +00:00
Michael Brown 6e5a3858bf Read number of PCI buses returned by BIOS so that we can scan more
quickly.
2005-04-16 11:16:31 +00:00
Michael Brown ed7b9109be Made debug messages more consistent. 2005-04-16 10:04:56 +00:00
Michael Brown 211a607147 Improved debug messages.
Prevented find_pci_device() from being an endless loop.
2005-04-16 09:57:19 +00:00
Michael Brown a60aadf9e9 Improve debug message legibility. 2005-04-15 17:09:47 +00:00
Michael Brown ed92171527 Standardised debug messages to make it easy to get a bus scan printout
(just build debugging versions of the relevant bus objects).
2005-04-14 23:32:36 +00:00
Michael Brown 9183f2412e bus header files must include dev.h to get struct dev. 2005-04-14 14:26:28 +00:00
Michael Brown 104880ca19 Tweak API to allow separation of bus-scanning and device-probing logic. 2005-04-14 13:44:07 +00:00
Michael Brown 44c7cc8c12 Standardised debug mechanism in place now. 2005-04-14 11:55:57 +00:00
Michael Brown 75d864432c Use the magic of common symbols to allow struct dev to effectively grow at
link time to accommodate whatever bus objects are included.
2005-04-14 10:10:54 +00:00