people/lynusvaz/gpxe.git
17 years agoUpdated to new ISA API, but this driver probably has deeper problems.
Michael Brown [Thu, 14 Apr 2005 21:18:36 +0000 (21:18 +0000)]
Updated to new ISA API, but this driver probably has deeper problems.

17 years agoThis code is unbelievably ugly, has never been fixed up to work with
Michael Brown [Thu, 14 Apr 2005 20:02:10 +0000 (20:02 +0000)]
This code is unbelievably ugly, has never been fixed up to work with
relocation and (hence) presumably has not been used since Etherboot 5.0.
Say bye-bye!

17 years agoUpdated to general ISA bus API.
Michael Brown [Thu, 14 Apr 2005 19:25:36 +0000 (19:25 +0000)]
Updated to general ISA bus API.

17 years agoTypo
Michael Brown [Thu, 14 Apr 2005 19:10:17 +0000 (19:10 +0000)]
Typo

17 years agoUpdated to common ISA bus API.
Michael Brown [Thu, 14 Apr 2005 19:07:53 +0000 (19:07 +0000)]
Updated to common ISA bus API.

17 years agoAdded a generalised ISA device-probing mechanism.
Michael Brown [Thu, 14 Apr 2005 18:46:43 +0000 (18:46 +0000)]
Added a generalised ISA device-probing mechanism.

17 years agoname should be const
Michael Brown [Thu, 14 Apr 2005 17:52:27 +0000 (17:52 +0000)]
name should be const

17 years agoFixed up automatic modifications by hand.
Michael Brown [Thu, 14 Apr 2005 15:09:28 +0000 (15:09 +0000)]
Fixed up automatic modifications by hand.

17 years agoAutomatically modified by
Michael Brown [Thu, 14 Apr 2005 15:00:05 +0000 (15:00 +0000)]
Automatically modified by

perl -pi -0777 -e 's/\s*?if\s*\(\s*!\s*find_pci_device.*?,\s*\&(\w+)\s*\)\s*\)\s*return\s*0;(.*BOOT_DRIVER\s*\(.*?,)(.*?\))/$2 find_pci_boot_device, $1,$3/sm' *.c

17 years agoFix up the automatic modifications.
Michael Brown [Thu, 14 Apr 2005 14:59:04 +0000 (14:59 +0000)]
Fix up the automatic modifications.

17 years agoMade amenable to automatic update.
Michael Brown [Thu, 14 Apr 2005 14:49:32 +0000 (14:49 +0000)]
Made amenable to automatic update.

17 years agoThis is the only driver that has a genuine reason to call
Michael Brown [Thu, 14 Apr 2005 14:48:07 +0000 (14:48 +0000)]
This is the only driver that has a genuine reason to call
find_pci_device() directly.

17 years agoAutomatically updated using
Michael Brown [Thu, 14 Apr 2005 14:44:33 +0000 (14:44 +0000)]
Automatically updated using

perl -pi -0777 -e 's/(_probe\s*\(\s*struct\s+dev.*?)(\s*\)\s*{.*?$)\s*struct pci_device.*?=\s*pci_device \( dev \);$/${1}, struct pci_device *pci${2}/ms' *.c

sis900 excluded from update

17 years agoUpdated to new device API.
Michael Brown [Thu, 14 Apr 2005 14:31:11 +0000 (14:31 +0000)]
Updated to new device API.

17 years agoFix BOOT_DRIVER to assign unique and meaningful name to structure.
Michael Brown [Thu, 14 Apr 2005 14:30:03 +0000 (14:30 +0000)]
Fix BOOT_DRIVER to assign unique and meaningful name to structure.

17 years agobus header files must include dev.h to get struct dev.
Michael Brown [Thu, 14 Apr 2005 14:26:28 +0000 (14:26 +0000)]
bus header files must include dev.h to get struct dev.

17 years agoUpdated to current device API.
Michael Brown [Thu, 14 Apr 2005 13:49:58 +0000 (13:49 +0000)]
Updated to current device API.

17 years agoTweak API to allow separation of bus-scanning and device-probing logic.
Michael Brown [Thu, 14 Apr 2005 13:44:07 +0000 (13:44 +0000)]
Tweak API to allow separation of bus-scanning and device-probing logic.

17 years agoSeparate out bus-scanning and device-probing logic.
Michael Brown [Thu, 14 Apr 2005 13:33:03 +0000 (13:33 +0000)]
Separate out bus-scanning and device-probing logic.

17 years agoSplit 3c509.c into 3c509.9 and 3c529.c, with shared code in 3c5x9.c.
Michael Brown [Thu, 14 Apr 2005 12:23:12 +0000 (12:23 +0000)]
Split 3c509.c into 3c509.9 and 3c529.c, with shared code in 3c5x9.c.
Probe mechanisms now use standard EISA and MCA bus methods, with 3c509.c
defining a custom ISA bus to handle the 3c509 contention resolution logic.

17 years agoAllow for multiple BOOT_DRIVER()s in the same file, provided that they
Michael Brown [Thu, 14 Apr 2005 12:02:19 +0000 (12:02 +0000)]
Allow for multiple BOOT_DRIVER()s in the same file, provided that they
have different probe functions.

17 years agoStandardised debug mechanism in place now.
Michael Brown [Thu, 14 Apr 2005 11:55:57 +0000 (11:55 +0000)]
Standardised debug mechanism in place now.

17 years agocompiler.h is now always included on the command line.
Michael Brown [Thu, 14 Apr 2005 11:50:26 +0000 (11:50 +0000)]
compiler.h is now always included on the command line.

17 years agoWe need the ISA product ID mask available separately for 3c509.c.
Michael Brown [Thu, 14 Apr 2005 11:47:30 +0000 (11:47 +0000)]
We need the ISA product ID mask available separately for 3c509.c.

17 years agoAlways include compiler.h.
Michael Brown [Thu, 14 Apr 2005 11:45:37 +0000 (11:45 +0000)]
Always include compiler.h.

Add bin/%.rebuild rule to quickly force a rebuild of any file.

Add bin/%.o.dbg rule to build a debugging-enabled version of the object.

17 years agoAutomatically create DBG() macro based on debug_<object> macro.
Michael Brown [Thu, 14 Apr 2005 11:35:45 +0000 (11:35 +0000)]
Automatically create DBG() macro based on debug_<object> macro.

17 years agoUse the magic of common symbols to allow struct dev to effectively grow at
Michael Brown [Thu, 14 Apr 2005 10:10:54 +0000 (10:10 +0000)]
Use the magic of common symbols to allow struct dev to effectively grow at
link time to accommodate whatever bus objects are included.

17 years agoStripped references to variables in C code.
Michael Brown [Wed, 13 Apr 2005 13:48:26 +0000 (13:48 +0000)]
Stripped references to variables in C code.

17 years agoEISA support now provided by eisa.c
Michael Brown [Wed, 13 Apr 2005 13:06:56 +0000 (13:06 +0000)]
EISA support now provided by eisa.c
MCA support now provided by mca.c

17 years agoExtraced from 3c509.c
Michael Brown [Wed, 13 Apr 2005 12:45:38 +0000 (12:45 +0000)]
Extraced from 3c509.c

17 years agoAdd EISA as a bus type.
Michael Brown [Wed, 13 Apr 2005 12:20:59 +0000 (12:20 +0000)]
Add EISA as a bus type.

17 years agoDon't use htons, for compatibility with PCI :(
Michael Brown [Wed, 13 Apr 2005 12:15:14 +0000 (12:15 +0000)]
Don't use htons, for compatibility with PCI :(

17 years agoUse __bswap_16, since we're not dealing with quantities to go onto the network.
Michael Brown [Wed, 13 Apr 2005 12:11:21 +0000 (12:11 +0000)]
Use __bswap_16, since we're not dealing with quantities to go onto the network.

17 years agohtons was used in ISAPnP code just due to ISAPnP storing bytes in
Michael Brown [Wed, 13 Apr 2005 12:06:33 +0000 (12:06 +0000)]
htons was used in ISAPnP code just due to ISAPnP storing bytes in
reverse order.

17 years agoCreated separate isa_ids.h file and a utility function to print out ISA
Michael Brown [Wed, 13 Apr 2005 12:01:44 +0000 (12:01 +0000)]
Created separate isa_ids.h file and a utility function to print out ISA
IDs in a human-readable format.

17 years agoAdd MCA devices
Michael Brown [Wed, 13 Apr 2005 03:00:50 +0000 (03:00 +0000)]
Add MCA devices

17 years agoMinor fixups
Michael Brown [Wed, 13 Apr 2005 03:00:30 +0000 (03:00 +0000)]
Minor fixups

17 years agoExtracted from 3c509.c
Michael Brown [Wed, 13 Apr 2005 02:59:13 +0000 (02:59 +0000)]
Extracted from 3c509.c

17 years agoWhoops
Michael Brown [Wed, 13 Apr 2005 02:05:43 +0000 (02:05 +0000)]
Whoops

17 years agoFinished by hand
Michael Brown [Wed, 13 Apr 2005 02:02:08 +0000 (02:02 +0000)]
Finished by hand

17 years agoFinished by hand
Michael Brown [Wed, 13 Apr 2005 01:45:20 +0000 (01:45 +0000)]
Finished by hand

17 years agoFinished by hand
Michael Brown [Wed, 13 Apr 2005 01:31:44 +0000 (01:31 +0000)]
Finished by hand

17 years agoFix type of dummy_irq()
Michael Brown [Wed, 13 Apr 2005 01:28:43 +0000 (01:28 +0000)]
Fix type of dummy_irq()

17 years agoFinished by hand
Michael Brown [Wed, 13 Apr 2005 01:01:33 +0000 (01:01 +0000)]
Finished by hand

17 years agoHand-finished
Michael Brown [Wed, 13 Apr 2005 00:21:59 +0000 (00:21 +0000)]
Hand-finished

17 years agoAvoid compiler warnings.
Michael Brown [Wed, 13 Apr 2005 00:19:01 +0000 (00:19 +0000)]
Avoid compiler warnings.

17 years agoUse NIC's connect method.
Michael Brown [Wed, 13 Apr 2005 00:18:35 +0000 (00:18 +0000)]
Use NIC's connect method.

17 years agoAdd mbps and duplex to struct nic, since some drivers (e.g. rtl8139)
Michael Brown [Wed, 13 Apr 2005 00:16:42 +0000 (00:16 +0000)]
Add mbps and duplex to struct nic, since some drivers (e.g. rtl8139)
can fill them in.

17 years agoHand-finished
Michael Brown [Wed, 13 Apr 2005 00:15:45 +0000 (00:15 +0000)]
Hand-finished

17 years agoAutomatically updated using
Michael Brown [Wed, 13 Apr 2005 00:02:40 +0000 (00:02 +0000)]
Automatically updated using

perl -pi -0777 -e 's/^(\s*)dev->disable(\s*)=\s*(\w+)_disable;\s*nic->poll\s*=\s*(\w+);\s*nic->transmit\s*=\s*(\w+);\s*nic->irq\s*=\s*(\w+);/static struct nic_operations ${3}_operations;\nstatic struct nic_operations ${3}_operations = {\n\t.connect\t= dummy_connect,\n\t.poll\t\t= $4,\n\t.transmit\t= $5,\n\t.irq\t\t= $6,\n\t.disable\t= ${3}_disable,\n};${1}nic->nic_op\t= &${3}_operations;/msg' *.c

17 years agoManual tweaks to get all drivers to follow the "disable, poll, transmit,
Michael Brown [Tue, 12 Apr 2005 23:47:52 +0000 (23:47 +0000)]
Manual tweaks to get all drivers to follow the "disable, poll, transmit,
irq" pattern.

17 years agoAutomatically updated using
Michael Brown [Tue, 12 Apr 2005 23:39:16 +0000 (23:39 +0000)]
Automatically updated using

perl -pi -e 's/(_probe\s*\(\s*struct )dev \*.*?(\s*\);)/${1}dev *dev$2/' *.c

perl -pi -e 's/(_disable\s*\(\s*struct )dev \*.*?(\s*\);)/${1}nic *nic$2/' *.c

17 years agoAutomatically updated using
Michael Brown [Tue, 12 Apr 2005 23:31:37 +0000 (23:31 +0000)]
Automatically updated using

perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev\s*\)\s*{\s*struct nic \*nic.*?$/_disable ( struct nic *nic ) {/ms' *.c

perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev(\s*__unused)?\)\s*{/_disable ( struct nic *nic$1 ) {/ms' *.c

17 years agoAutomatically updated using
Michael Brown [Tue, 12 Apr 2005 23:24:39 +0000 (23:24 +0000)]
Automatically updated using

perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.c

17 years agoMinor regexp tweaks to catch degenerate cases.
Michael Brown [Tue, 12 Apr 2005 23:13:54 +0000 (23:13 +0000)]
Minor regexp tweaks to catch degenerate cases.

17 years agoAuto-updated using
Michael Brown [Tue, 12 Apr 2005 23:05:00 +0000 (23:05 +0000)]
Auto-updated using

perl -pi -0777 -e 's/static struct pci_driver (\w+) __pci_driver = {.*\.name\s*=\s*(\"\S+\").*\.probe\s*=\s*(\w+).*\.ids\s*=\s*(\w+).*\.class\s*=\s*(\w+).*?};/static struct pci_driver $1 =\n\tPCI_DRIVER ( $2, $4, $5 );\n\nBOOT_DRIVER ( $2, $3 );/ms' *.c

perl -pi -e 's/(PCI_DRIVER \(.*, )0 \);/${1}PCI_NO_CLASS );/' *.c

17 years agoUse dev's print_info method to print standardised information about
Michael Brown [Tue, 12 Apr 2005 22:44:02 +0000 (22:44 +0000)]
Use dev's print_info method to print standardised information about
the boot device.

17 years agoAdd print_info method to dev_operations.
Michael Brown [Tue, 12 Apr 2005 22:43:25 +0000 (22:43 +0000)]
Add print_info method to dev_operations.

17 years agoWe now record a pointer to the struct pci_device, since it's carried
Michael Brown [Tue, 12 Apr 2005 22:42:52 +0000 (22:42 +0000)]
We now record a pointer to the struct pci_device, since it's carried
around in struct dev anyway.

17 years agoAble to at least compile again now.
Michael Brown [Tue, 12 Apr 2005 19:11:42 +0000 (19:11 +0000)]
Able to at least compile again now.

17 years agoAdd dummy_connect and dummy_irq
Michael Brown [Tue, 12 Apr 2005 19:11:13 +0000 (19:11 +0000)]
Add dummy_connect and dummy_irq

17 years agoRemove debugging by default
Michael Brown [Tue, 12 Apr 2005 18:32:20 +0000 (18:32 +0000)]
Remove debugging by default

17 years agoUpdated to new device API.
Michael Brown [Tue, 12 Apr 2005 18:23:00 +0000 (18:23 +0000)]
Updated to new device API.

17 years agoCope with nic.h being included before (or without) dev.h
Michael Brown [Tue, 12 Apr 2005 18:21:38 +0000 (18:21 +0000)]
Cope with nic.h being included before (or without) dev.h

17 years agoInclude dev.h, since several drivers just include nic.h
Michael Brown [Tue, 12 Apr 2005 18:15:12 +0000 (18:15 +0000)]
Include dev.h, since several drivers just include nic.h

17 years agoFixed up PCI-scanning code to use new PCI interface.
Michael Brown [Tue, 12 Apr 2005 18:13:59 +0000 (18:13 +0000)]
Fixed up PCI-scanning code to use new PCI interface.

17 years agoMake adjust_pci_device global, since many drivers call it.
Michael Brown [Tue, 12 Apr 2005 18:10:57 +0000 (18:10 +0000)]
Make adjust_pci_device global, since many drivers call it.

17 years agoFix up find_pci_device so that it can be used for scanning for devices
Michael Brown [Tue, 12 Apr 2005 18:04:03 +0000 (18:04 +0000)]
Fix up find_pci_device so that it can be used for scanning for devices
*other* than the main boot device.

17 years agoUse pci_{vendor,device}_id instead of just pci_{vendor,device}, to avoid
Michael Brown [Tue, 12 Apr 2005 17:56:23 +0000 (17:56 +0000)]
Use pci_{vendor,device}_id instead of just pci_{vendor,device}, to avoid
conflict with pci_device function.

17 years agoTie into new boot device framework.
Michael Brown [Tue, 12 Apr 2005 16:54:09 +0000 (16:54 +0000)]
Tie into new boot device framework.

17 years agostruct nic is now part of struct dev, rather than the other way around.
Michael Brown [Tue, 12 Apr 2005 16:52:59 +0000 (16:52 +0000)]
struct nic is now part of struct dev, rather than the other way around.

Tie into new boot device framework.

17 years agoNeeds to be updated to new probe logic.
Michael Brown [Tue, 12 Apr 2005 16:51:26 +0000 (16:51 +0000)]
Needs to be updated to new probe logic.

17 years agoAll code related to the device probe logic is ifdeffed 0 out.
Michael Brown [Tue, 12 Apr 2005 16:49:59 +0000 (16:49 +0000)]
All code related to the device probe logic is ifdeffed 0 out.

17 years agoGlobal struct dev is now in main.c
Michael Brown [Tue, 12 Apr 2005 16:49:11 +0000 (16:49 +0000)]
Global struct dev is now in main.c

17 years agoprint_drivers() is now unified.
Michael Brown [Tue, 12 Apr 2005 16:48:45 +0000 (16:48 +0000)]
print_drivers() is now unified.

17 years agoNow obsolete. :)
Michael Brown [Tue, 12 Apr 2005 16:46:57 +0000 (16:46 +0000)]
Now obsolete.  :)

17 years agoAll boot device drivers are now lumped together in boot_drivers
Michael Brown [Tue, 12 Apr 2005 16:46:15 +0000 (16:46 +0000)]
All boot device drivers are now lumped together in boot_drivers

17 years agoMatches new pci.c interface.
Michael Brown [Tue, 12 Apr 2005 16:45:40 +0000 (16:45 +0000)]
Matches new pci.c interface.

17 years agoAdd INIT_PCIBIOS
Michael Brown [Tue, 12 Apr 2005 16:45:16 +0000 (16:45 +0000)]
Add INIT_PCIBIOS

17 years agoFor pci_io.c
Michael Brown [Tue, 12 Apr 2005 16:44:50 +0000 (16:44 +0000)]
For pci_io.c

17 years agoReplaced main loop with a trivial implementation so that we can try
Michael Brown [Tue, 12 Apr 2005 16:43:18 +0000 (16:43 +0000)]
Replaced main loop with a trivial implementation so that we can try
out the new probing logic.

17 years ago16-bit PCI BIOS interface also now known to work.
Michael Brown [Tue, 12 Apr 2005 16:42:14 +0000 (16:42 +0000)]
16-bit PCI BIOS interface also now known to work.

17 years agomain.c contains the global struct dev.
Michael Brown [Tue, 12 Apr 2005 16:39:03 +0000 (16:39 +0000)]
main.c contains the global struct dev.

17 years agoObsoleted by new device probing mechanism.
Michael Brown [Tue, 12 Apr 2005 16:38:38 +0000 (16:38 +0000)]
Obsoleted by new device probing mechanism.

17 years agoNew device probing mechanism
Michael Brown [Tue, 12 Apr 2005 16:38:23 +0000 (16:38 +0000)]
New device probing mechanism

17 years agoNew PCI scan functions now work.
Michael Brown [Tue, 12 Apr 2005 16:36:55 +0000 (16:36 +0000)]
New PCI scan functions now work.

17 years agoImproved debug messages
Michael Brown [Tue, 12 Apr 2005 16:27:27 +0000 (16:27 +0000)]
Improved debug messages

17 years agoShould work for KEEP_IT_REAL as well now.
Michael Brown [Tue, 12 Apr 2005 13:35:31 +0000 (13:35 +0000)]
Should work for KEEP_IT_REAL as well now.

17 years agoNearly there...
Michael Brown [Tue, 12 Apr 2005 13:31:36 +0000 (13:31 +0000)]
Nearly there...

17 years agoRemoved pci_find_device_x; it was too ugly to live.
Michael Brown [Tue, 12 Apr 2005 12:59:21 +0000 (12:59 +0000)]
Removed pci_find_device_x; it was too ugly to live.

17 years agoNew device probing mechanism written, not tested.
Michael Brown [Mon, 11 Apr 2005 19:19:35 +0000 (19:19 +0000)]
New device probing mechanism written, not tested.

17 years agoMoved functions that we want to keep to drivers/bus/pci.c
Michael Brown [Mon, 11 Apr 2005 13:45:00 +0000 (13:45 +0000)]
Moved functions that we want to keep to drivers/bus/pci.c

17 years agoMoved in functions from old core/pci.c that we want to keep.
Michael Brown [Mon, 11 Apr 2005 13:43:53 +0000 (13:43 +0000)]
Moved in functions from old core/pci.c that we want to keep.

17 years agoRenamed pci.c to pci_legacy.c in preparation for new bus managment
Michael Brown [Mon, 11 Apr 2005 13:25:41 +0000 (13:25 +0000)]
Renamed pci.c to pci_legacy.c in preparation for new bus managment
infrastructure.

17 years agoRemoved references to no-longer-existent CFLAGS options.
Michael Brown [Mon, 11 Apr 2005 10:17:00 +0000 (10:17 +0000)]
Removed references to no-longer-existent CFLAGS options.

17 years agoChanged guard name to avoid clash with INCLUDE_xxx namespace used by
Michael Brown [Mon, 11 Apr 2005 09:58:31 +0000 (09:58 +0000)]
Changed guard name to avoid clash with INCLUDE_xxx namespace used by
drivers.

17 years agoCleaner separation of functionality between post_reloc and
Michael Brown [Mon, 11 Apr 2005 09:24:10 +0000 (09:24 +0000)]
Cleaner separation of functionality between post_reloc and
initialise_via_librm.

17 years agoAlmost all information in this file is now obsolete. Writing a new driver
Michael Brown [Sun, 10 Apr 2005 23:45:55 +0000 (23:45 +0000)]
Almost all information in this file is now obsolete.  Writing a new driver
should, with the new build system, just be a case of writing the .c file
and dropping it in place in drivers/net.  :)

17 years agoinitialise() doesn't take regs
Michael Brown [Sun, 10 Apr 2005 18:39:28 +0000 (18:39 +0000)]
initialise() doesn't take regs

17 years agoarch_initialise() is now sufficiently generic that we may as well just
Michael Brown [Sun, 10 Apr 2005 18:30:34 +0000 (18:30 +0000)]
arch_initialise() is now sufficiently generic that we may as well just
call it initialise() and place it in main.c.  :)