people/balajirrao/gpxe.git
15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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

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

15 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.

15 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 :(

15 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.

15 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.

15 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.

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

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

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

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

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

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

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

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

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

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

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

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

15 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.

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

15 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

15 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.

15 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

15 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

15 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

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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

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

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

15 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

15 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

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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

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

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

15 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

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

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

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

15 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.

15 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.

15 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.

15 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.

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

15 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.

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

15 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.

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

15 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.

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.  :)

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

15 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.  :)

15 years agoUse librm_arch_initialise for librm, arch_initialise for others.
Michael Brown [Sun, 10 Apr 2005 18:22:31 +0000 (18:22 +0000)]
Use librm_arch_initialise for librm, arch_initialise for others.

15 years agoHeading towards a sane set of control functions
Michael Brown [Sun, 10 Apr 2005 18:21:53 +0000 (18:21 +0000)]
Heading towards a sane set of control functions

15 years agoAll the icky stuff is now taken care of by librm_arch_initialise
Michael Brown [Sun, 10 Apr 2005 18:21:27 +0000 (18:21 +0000)]
All the icky stuff is now taken care of by librm_arch_initialise

15 years agoFix up init ordering.
Michael Brown [Sun, 10 Apr 2005 18:20:38 +0000 (18:20 +0000)]
Fix up init ordering.

Make init function table name fixed; it's a static variable anyway.

15 years agoarch_rm_main no longer exists.
Michael Brown [Sun, 10 Apr 2005 18:19:59 +0000 (18:19 +0000)]
arch_rm_main no longer exists.

15 years agoDrag in relocate unless NORELOCATE is defined, since it's now called
Michael Brown [Sun, 10 Apr 2005 18:19:05 +0000 (18:19 +0000)]
Drag in relocate unless NORELOCATE is defined, since it's now called
only via the initialisation function table.

15 years agoAdded post-relocation function table.
Michael Brown [Sun, 10 Apr 2005 18:18:37 +0000 (18:18 +0000)]
Added post-relocation function table.

15 years agoRemoved obsolete initialisation calls.
Michael Brown [Sun, 10 Apr 2005 18:13:24 +0000 (18:13 +0000)]
Removed obsolete initialisation calls.

15 years agoFixed debug messages
Michael Brown [Sun, 10 Apr 2005 16:58:19 +0000 (16:58 +0000)]
Fixed debug messages

15 years agosetup16() now calls initialise(); we don't have to do it.
Michael Brown [Sun, 10 Apr 2005 16:48:04 +0000 (16:48 +0000)]
setup16() now calls initialise(); we don't have to do it.

15 years agoSetup now calls initialise() directly, rather than expecting the
Michael Brown [Sun, 10 Apr 2005 16:46:46 +0000 (16:46 +0000)]
Setup now calls initialise() directly, rather than expecting the
prefix to do it.

15 years agoAdd librm_base.
Michael Brown [Sun, 10 Apr 2005 16:44:49 +0000 (16:44 +0000)]
Add librm_base.

15 years agohooks.o is now a single object, rather than having separate hooks.o and
Michael Brown [Sun, 10 Apr 2005 16:44:29 +0000 (16:44 +0000)]
hooks.o is now a single object, rather than having separate hooks.o and
hooks_rm.o

15 years agoMake prot_call() able to transparently return via the newly installed copy
Michael Brown [Sun, 10 Apr 2005 15:51:10 +0000 (15:51 +0000)]
Make prot_call() able to transparently return via the newly installed copy
of librm.

15 years agoDon't build relocate() under KEEP_IT_REAL
Michael Brown [Sat, 9 Apr 2005 17:05:35 +0000 (17:05 +0000)]
Don't build relocate() under KEEP_IT_REAL

15 years agolgdt needs data32 prefix, otherwise it loads only 24 bits. (sgdt
Michael Brown [Sat, 9 Apr 2005 16:42:50 +0000 (16:42 +0000)]
lgdt needs data32 prefix, otherwise it loads only 24 bits.  (sgdt
always saves 32 bits).

15 years agoAdd INIT_FNs to make sure that librm gets reallocated when needed.
Michael Brown [Sat, 9 Apr 2005 16:42:07 +0000 (16:42 +0000)]
Add INIT_FNs to make sure that librm gets reallocated when needed.

15 years agoDon't zero freed base memory; one block will contain librm.
Michael Brown [Sat, 9 Apr 2005 16:14:37 +0000 (16:14 +0000)]
Don't zero freed base memory; one block will contain librm.

15 years agoAllow ourselves to be freed by basemem.c without being damaged.
Michael Brown [Sat, 9 Apr 2005 16:14:09 +0000 (16:14 +0000)]
Allow ourselves to be freed by basemem.c without being damaged.

15 years agoNeed to provide sizeof(struct free_base_memory_header) to assembly code.
Michael Brown [Sat, 9 Apr 2005 16:13:19 +0000 (16:13 +0000)]
Need to provide sizeof(struct free_base_memory_header) to assembly code.

15 years agoNote basemem API change.
Michael Brown [Sat, 9 Apr 2005 15:56:03 +0000 (15:56 +0000)]
Note basemem API change.

15 years agoAdd INIT_LIBRM before INIT_CONSOLE.
Michael Brown [Sat, 9 Apr 2005 15:26:38 +0000 (15:26 +0000)]
Add INIT_LIBRM before INIT_CONSOLE.