Michael Brown [Thu, 14 Apr 2005 11:50:26 +0000 (11:50 +0000)]
compiler.h is now always included on the command line.
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.
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.
Michael Brown [Thu, 14 Apr 2005 11:35:45 +0000 (11:35 +0000)]
Automatically create DBG() macro based on debug_<object> macro.
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.
Michael Brown [Wed, 13 Apr 2005 13:48:26 +0000 (13:48 +0000)]
Stripped references to variables in C code.
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
Michael Brown [Wed, 13 Apr 2005 12:45:38 +0000 (12:45 +0000)]
Extraced from 3c509.c
Michael Brown [Wed, 13 Apr 2005 12:20:59 +0000 (12:20 +0000)]
Add EISA as a bus type.
Michael Brown [Wed, 13 Apr 2005 12:15:14 +0000 (12:15 +0000)]
Don't use htons, for compatibility with PCI :(
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.
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.
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.
Michael Brown [Wed, 13 Apr 2005 03:00:50 +0000 (03:00 +0000)]
Add MCA devices
Michael Brown [Wed, 13 Apr 2005 03:00:30 +0000 (03:00 +0000)]
Minor fixups
Michael Brown [Wed, 13 Apr 2005 02:59:13 +0000 (02:59 +0000)]
Extracted from 3c509.c
Michael Brown [Wed, 13 Apr 2005 02:05:43 +0000 (02:05 +0000)]
Whoops
Michael Brown [Wed, 13 Apr 2005 02:02:08 +0000 (02:02 +0000)]
Finished by hand
Michael Brown [Wed, 13 Apr 2005 01:45:20 +0000 (01:45 +0000)]
Finished by hand
Michael Brown [Wed, 13 Apr 2005 01:31:44 +0000 (01:31 +0000)]
Finished by hand
Michael Brown [Wed, 13 Apr 2005 01:28:43 +0000 (01:28 +0000)]
Fix type of dummy_irq()
Michael Brown [Wed, 13 Apr 2005 01:01:33 +0000 (01:01 +0000)]
Finished by hand
Michael Brown [Wed, 13 Apr 2005 00:21:59 +0000 (00:21 +0000)]
Hand-finished
Michael Brown [Wed, 13 Apr 2005 00:19:01 +0000 (00:19 +0000)]
Avoid compiler warnings.
Michael Brown [Wed, 13 Apr 2005 00:18:35 +0000 (00:18 +0000)]
Use NIC's connect method.
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.
Michael Brown [Wed, 13 Apr 2005 00:15:45 +0000 (00:15 +0000)]
Hand-finished
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
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.
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
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
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
Michael Brown [Tue, 12 Apr 2005 23:13:54 +0000 (23:13 +0000)]
Minor regexp tweaks to catch degenerate cases.
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
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.
Michael Brown [Tue, 12 Apr 2005 22:43:25 +0000 (22:43 +0000)]
Add print_info method to dev_operations.
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.
Michael Brown [Tue, 12 Apr 2005 19:11:42 +0000 (19:11 +0000)]
Able to at least compile again now.
Michael Brown [Tue, 12 Apr 2005 19:11:13 +0000 (19:11 +0000)]
Add dummy_connect and dummy_irq
Michael Brown [Tue, 12 Apr 2005 18:32:20 +0000 (18:32 +0000)]
Remove debugging by default
Michael Brown [Tue, 12 Apr 2005 18:23:00 +0000 (18:23 +0000)]
Updated to new device API.
Michael Brown [Tue, 12 Apr 2005 18:21:38 +0000 (18:21 +0000)]
Cope with nic.h being included before (or without) dev.h
Michael Brown [Tue, 12 Apr 2005 18:15:12 +0000 (18:15 +0000)]
Include dev.h, since several drivers just include nic.h
Michael Brown [Tue, 12 Apr 2005 18:13:59 +0000 (18:13 +0000)]
Fixed up PCI-scanning code to use new PCI interface.
Michael Brown [Tue, 12 Apr 2005 18:10:57 +0000 (18:10 +0000)]
Make adjust_pci_device global, since many drivers call it.
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.
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.
Michael Brown [Tue, 12 Apr 2005 16:54:09 +0000 (16:54 +0000)]
Tie into new boot device framework.
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.
Michael Brown [Tue, 12 Apr 2005 16:51:26 +0000 (16:51 +0000)]
Needs to be updated to new probe logic.
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.
Michael Brown [Tue, 12 Apr 2005 16:49:11 +0000 (16:49 +0000)]
Global struct dev is now in main.c
Michael Brown [Tue, 12 Apr 2005 16:48:45 +0000 (16:48 +0000)]
print_drivers() is now unified.
Michael Brown [Tue, 12 Apr 2005 16:46:57 +0000 (16:46 +0000)]
Now obsolete. :)
Michael Brown [Tue, 12 Apr 2005 16:46:15 +0000 (16:46 +0000)]
All boot device drivers are now lumped together in boot_drivers
Michael Brown [Tue, 12 Apr 2005 16:45:40 +0000 (16:45 +0000)]
Matches new pci.c interface.
Michael Brown [Tue, 12 Apr 2005 16:45:16 +0000 (16:45 +0000)]
Add INIT_PCIBIOS
Michael Brown [Tue, 12 Apr 2005 16:44:50 +0000 (16:44 +0000)]
For pci_io.c
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.
Michael Brown [Tue, 12 Apr 2005 16:42:14 +0000 (16:42 +0000)]
16-bit PCI BIOS interface also now known to work.
Michael Brown [Tue, 12 Apr 2005 16:39:03 +0000 (16:39 +0000)]
main.c contains the global struct dev.
Michael Brown [Tue, 12 Apr 2005 16:38:38 +0000 (16:38 +0000)]
Obsoleted by new device probing mechanism.
Michael Brown [Tue, 12 Apr 2005 16:38:23 +0000 (16:38 +0000)]
New device probing mechanism
Michael Brown [Tue, 12 Apr 2005 16:36:55 +0000 (16:36 +0000)]
New PCI scan functions now work.
Michael Brown [Tue, 12 Apr 2005 16:27:27 +0000 (16:27 +0000)]
Improved debug messages
Michael Brown [Tue, 12 Apr 2005 13:35:31 +0000 (13:35 +0000)]
Should work for KEEP_IT_REAL as well now.
Michael Brown [Tue, 12 Apr 2005 13:31:36 +0000 (13:31 +0000)]
Nearly there...
Michael Brown [Tue, 12 Apr 2005 12:59:21 +0000 (12:59 +0000)]
Removed pci_find_device_x; it was too ugly to live.
Michael Brown [Mon, 11 Apr 2005 19:19:35 +0000 (19:19 +0000)]
New device probing mechanism written, not tested.
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
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.
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.
Michael Brown [Mon, 11 Apr 2005 10:17:00 +0000 (10:17 +0000)]
Removed references to no-longer-existent CFLAGS options.
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.
Michael Brown [Mon, 11 Apr 2005 09:24:10 +0000 (09:24 +0000)]
Cleaner separation of functionality between post_reloc and
initialise_via_librm.
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. :)
Michael Brown [Sun, 10 Apr 2005 18:39:28 +0000 (18:39 +0000)]
initialise() doesn't take regs
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. :)
Michael Brown [Sun, 10 Apr 2005 18:22:31 +0000 (18:22 +0000)]
Use librm_arch_initialise for librm, arch_initialise for others.
Michael Brown [Sun, 10 Apr 2005 18:21:53 +0000 (18:21 +0000)]
Heading towards a sane set of control functions
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
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.
Michael Brown [Sun, 10 Apr 2005 18:19:59 +0000 (18:19 +0000)]
arch_rm_main no longer exists.
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.
Michael Brown [Sun, 10 Apr 2005 18:18:37 +0000 (18:18 +0000)]
Added post-relocation function table.
Michael Brown [Sun, 10 Apr 2005 18:13:24 +0000 (18:13 +0000)]
Removed obsolete initialisation calls.
Michael Brown [Sun, 10 Apr 2005 16:58:19 +0000 (16:58 +0000)]
Fixed debug messages
Michael Brown [Sun, 10 Apr 2005 16:48:04 +0000 (16:48 +0000)]
setup16() now calls initialise(); we don't have to do it.
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.
Michael Brown [Sun, 10 Apr 2005 16:44:49 +0000 (16:44 +0000)]
Add librm_base.
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
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.
Michael Brown [Sat, 9 Apr 2005 17:05:35 +0000 (17:05 +0000)]
Don't build relocate() under KEEP_IT_REAL
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).
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.
Michael Brown [Sat, 9 Apr 2005 16:14:37 +0000 (16:14 +0000)]
Don't zero freed base memory; one block will contain librm.
Michael Brown [Sat, 9 Apr 2005 16:14:09 +0000 (16:14 +0000)]
Allow ourselves to be freed by basemem.c without being damaged.
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.
Michael Brown [Sat, 9 Apr 2005 15:56:03 +0000 (15:56 +0000)]
Note basemem API change.
Michael Brown [Sat, 9 Apr 2005 15:26:38 +0000 (15:26 +0000)]
Add INIT_LIBRM before INIT_CONSOLE.