people/xl0/gpxe.git
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.  :)

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

17 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

17 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

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

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

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

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

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

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

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

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

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

17 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

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

17 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

17 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).

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

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

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

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

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

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

17 years agoRewritten in a much saner way, now that we don't have to worry about
Michael Brown [Sat, 9 Apr 2005 15:01:38 +0000 (15:01 +0000)]
Rewritten in a much saner way, now that we don't have to worry about
continually reallocating the real-mode stack.

17 years agoSplit out from etherboot.h
Michael Brown [Sat, 9 Apr 2005 15:01:09 +0000 (15:01 +0000)]
Split out from etherboot.h

17 years agoRemoved basemem.c prototypes
Michael Brown [Sat, 9 Apr 2005 15:00:28 +0000 (15:00 +0000)]
Removed basemem.c prototypes

17 years agobasememsize() updates the BIOS FBMS counter at 40:13.
Michael Brown [Sat, 9 Apr 2005 14:16:25 +0000 (14:16 +0000)]
basememsize() updates the BIOS FBMS counter at 40:13.

17 years agoPM function called by prot_call() should be allowed to modifying
Michael Brown [Sat, 9 Apr 2005 13:56:33 +0000 (13:56 +0000)]
PM function called by prot_call() should be allowed to modifying
registers returned to RM code.

17 years agoAdd relocate.h
Michael Brown [Sat, 9 Apr 2005 13:36:55 +0000 (13:36 +0000)]
Add relocate.h

Note that we can't make real-mode calls immediately after relocate_to().

17 years agoFirst version
Michael Brown [Sat, 9 Apr 2005 13:32:26 +0000 (13:32 +0000)]
First version

17 years agoRelocation code is arch-specific.
Michael Brown [Sat, 9 Apr 2005 13:28:59 +0000 (13:28 +0000)]
Relocation code is arch-specific.

17 years agorelocate() is called by arch_initialise().
Michael Brown [Sat, 9 Apr 2005 13:23:49 +0000 (13:23 +0000)]
relocate() is called by arch_initialise().

17 years agoAdded a lot of explanatory comments.
Michael Brown [Sat, 9 Apr 2005 13:12:22 +0000 (13:12 +0000)]
Added a lot of explanatory comments.
Preserves alignment requested via _max_align parameter to linker.

17 years agocallbacks.h no longer exists
Michael Brown [Sat, 9 Apr 2005 11:19:14 +0000 (11:19 +0000)]
callbacks.h no longer exists

17 years ago#ifdef 0 out the UNDI loader routine, since it refers to the obsolete
Michael Brown [Sat, 9 Apr 2005 11:17:29 +0000 (11:17 +0000)]
#ifdef 0 out the UNDI loader routine, since it refers to the obsolete
 callback mechanism.

17 years agoOld callbacks mechanism is obsolete.
Michael Brown [Sat, 9 Apr 2005 11:16:17 +0000 (11:16 +0000)]
Old callbacks mechanism is obsolete.

17 years agoRemoved references to old callback mechanism
Michael Brown [Sat, 9 Apr 2005 11:15:14 +0000 (11:15 +0000)]
Removed references to old callback mechanism