[eros-cvs] cvs commit: eros/src/base/sys/scripts config.py
shap@eros.cs.jhu.edu
shap@eros.cs.jhu.edu
Sun, 25 Nov 2001 20:33:47 -0500
shap 01/11/25 20:33:47
Modified: src/base/sys config.common files.common
src/base/sys/arch/i486/conf ALL Makefile.pc files.pc
src/base/sys/arch/i486/kernel BadOpcode.cxx BptTrap.cxx
DebugException.cxx DivZeroFault.cxx FpuTrap.cxx
GPFault.cxx HardClock.cxx PageFault.cxx
PseudoInstr.cxx ReservedFault.cxx SSFault.cxx
SegPresFault.cxx
src/base/sys/kernel kern_Checker.cxx kern_IdleThread.cxx
kern_PhysPageSource.cxx kern_PreloadObSource.cxx
kern_main.cxx
src/base/sys/scripts config.py
Removed: src/base/sys/arch/i486/kernel AutoConf.cxx
src/base/sys/kernel kern_AutoConf.cxx kern_Twiddler.cxx
src/base/sys/kerninc AutoConf.hxx
Log:
Nuke the autoconfiguration support logic, as the kernel no longer
configures devices (yeah!)
Revision Changes Path
1.21 +0 -8 eros/src/base/sys/config.common
Index: config.common
===================================================================
RCS file: /cvs/eros/src/base/sys/config.common,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- config.common 2001/11/26 01:05:36 1.20
+++ config.common 2001/11/26 01:33:46 1.21
@@ -153,11 +153,3 @@
#####################################################################
defoption("persistent")
defoption("romable")
-
-#####################################################################
-#
-# Controls whether the kernel automatically runs some built-in
-# test processes that let us validate things like interrupt timing.
-#
-#####################################################################
-defoption("test_procs")
1.37 +0 -2 eros/src/base/sys/files.common
Index: files.common
===================================================================
RCS file: /cvs/eros/src/base/sys/files.common,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- files.common 2001/11/26 01:05:36 1.36
+++ files.common 2001/11/26 01:33:46 1.37
@@ -21,7 +21,6 @@
file("kernel/kern_CpuReserve.cxx")
file("kernel/kern_CoreObHash.cxx")
file("kernel/kern_CoreObSleep.cxx")
-file("kernel/kern_AutoConf.cxx")
file("kernel/kern_Node.cxx")
file("kernel/kern_util.cxx")
file("kernel/kern_Thread.cxx")
@@ -45,7 +44,6 @@
file("kernel/kern_Checker.cxx")
file("kernel/kern_IdleThread.cxx")
file("kernel/kern_Task.cxx")
-file("kernel/kern_Twiddler.cxx")
#file("kernel/kern_Persist.cxx")
file("kernel/kern_Profile.cxx")
file("kernel/kern_qsort.cxx")
1.20 +0 -81 eros/src/base/sys/arch/i486/conf/ALL
Index: ALL
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/ALL,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ALL 2001/11/26 01:05:36 1.19
+++ ALL 2001/11/26 01:33:47 1.20
@@ -50,86 +50,5 @@
# pseudo_device("bpfilter", count=8)
-#############################################
-#
-# Devices associated with the entire machine
-#
-#############################################
-
-# NPX "device" is always present if option NPX is enabled, but in that
-# case may be implemented in software. This template lets us
-# autoconfigure the emulation code if the NPX unit is not present.
-if isoption("npx"):
- base_template("npx")
-
-
-# RAM Disk pseudo-device:
-# base_template("ramdisk")
-
-#############################################
-#
-# Devices associated with the main board
-#
-#############################################
-
-#if isoption("ddb"):
-# isa_template("dbserial")
-
if isoption("ddb") and not isoption("ddb_on_console") and not isoption("ddb_on_tty0"):
option("ddb_on_console")
-
-# PC's have a legacy of hard drive interfaces. These include:
-#
-# + RLL (ancient)
-# + ST506
-# ESDI
-# * IDE
-# * EIDE
-#
-# ESDI and (E)IDE controllers can appear on a variety of busses,
-# including ISA, EISA, VLB, and PCI. The primary (and often the
-# secondary) hard disk controller customarily supply a backward
-# compatible register interface.
-#
-# While this makes life easy for older BIOS chips to support newer
-# technologies, it creates a problem for EISA and PCI autoconfiguration.
-# Unless you handle block devices as a special case, you end up
-# recognizing the device first as a PCI/EISA device and again later
-# at the legacy register interface.
-#
-# For this reason, we currently handle such block devices as a special
-# case. At some point, we will undoubtedly come across an architecture
-# on which this does not work.
-#
-# In the case of the primary IDE interface, we can't tell the
-# difference between IDE and ISA (prehistoric) cases until we are well
-# into the probe routine. We resolve this by pretending that the IDE
-# driver is an ISA driver, which guarantees that the probe will occur
-# *after* the PCI or EISA bus (if present) is configured.
-#
-# We leave it up to the IDE configuration routine to configure all of
-# the IDE interfaces that are present, and attach them to the
-# appropriate points in the configuration tree.
-#
-# Note that this means the IDE driver configuration procedure should
-# not believe its alleged parent bus information.
-
-#base_template("ide")
-
-# Network controllers:
-#isa_template("3c509")
-#pci_template("3c59x")
-
-#############################################
-#
-# Kernel threads
-#
-#############################################
-
-base_template("checker")
-base_template("idler")
-
-if isoption("test_procs"):
- base_template("twiddler")
-
-# base_template("todclock")
1.41 +0 -5 eros/src/base/sys/arch/i486/conf/Makefile.pc
Index: Makefile.pc
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/Makefile.pc,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- Makefile.pc 2001/11/20 04:28:57 1.40
+++ Makefile.pc 2001/11/26 01:33:47 1.41
@@ -118,11 +118,6 @@
%objects
-autoconf.o: autoconf.cxx
-.autoconf.m: autoconf.cxx
-
-OBJECTS += autoconf.o
-
include $(EROS_SRC)/build/lib/make/makerules.mk
lostart.o: ../../kernel/lostart.S
1.23 +0 -1 eros/src/base/sys/arch/i486/conf/files.pc
Index: files.pc
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/conf/files.pc,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- files.pc 2001/11/26 01:05:36 1.22
+++ files.pc 2001/11/26 01:33:47 1.23
@@ -52,7 +52,6 @@
file("arch/i486/device/ide_chipset.cxx", ifdevice("ide"))
# machine-specific objects not related to IPC
-file("arch/i486/kernel/AutoConf.cxx")
file("arch/i486/kernel/IDT.cxx")
file("arch/i486/kernel/TSS.cxx")
file("arch/i486/kernel/HardClock.cxx")
1.42 +0 -1 eros/src/base/sys/arch/i486/kernel/BadOpcode.cxx
Index: BadOpcode.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/BadOpcode.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- BadOpcode.cxx 2001/11/26 01:05:37 1.41
+++ BadOpcode.cxx 2001/11/26 01:33:47 1.42
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.35 +0 -1 eros/src/base/sys/arch/i486/kernel/BptTrap.cxx
Index: BptTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/BptTrap.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- BptTrap.cxx 2001/11/26 01:05:37 1.34
+++ BptTrap.cxx 2001/11/26 01:33:47 1.35
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.35 +0 -1 eros/src/base/sys/arch/i486/kernel/DebugException.cxx
Index: DebugException.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/DebugException.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- DebugException.cxx 2001/11/26 01:05:37 1.34
+++ DebugException.cxx 2001/11/26 01:33:47 1.35
@@ -25,7 +25,6 @@
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
#include "IDT.hxx"
1.32 +0 -1 eros/src/base/sys/arch/i486/kernel/DivZeroFault.cxx
Index: DivZeroFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/DivZeroFault.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- DivZeroFault.cxx 2001/11/26 01:05:37 1.31
+++ DivZeroFault.cxx 2001/11/26 01:33:47 1.32
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.13 +0 -1 eros/src/base/sys/arch/i486/kernel/FpuTrap.cxx
Index: FpuTrap.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/FpuTrap.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- FpuTrap.cxx 2001/11/26 01:05:37 1.12
+++ FpuTrap.cxx 2001/11/26 01:33:47 1.13
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.74 +0 -1 eros/src/base/sys/arch/i486/kernel/GPFault.cxx
Index: GPFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/GPFault.cxx,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- GPFault.cxx 2001/11/26 01:05:37 1.73
+++ GPFault.cxx 2001/11/26 01:33:47 1.74
@@ -23,7 +23,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/util.h>
1.58 +0 -1 eros/src/base/sys/arch/i486/kernel/HardClock.cxx
Index: HardClock.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/HardClock.cxx,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- HardClock.cxx 2001/11/26 01:05:37 1.57
+++ HardClock.cxx 2001/11/26 01:33:47 1.58
@@ -23,7 +23,6 @@
#include <kerninc/Machine.hxx>
#include <kerninc/SysTimer.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/AutoConf.hxx>
#include <eros/i486/io.h>
#include "IDT.hxx"
1.190 +0 -1 eros/src/base/sys/arch/i486/kernel/PageFault.cxx
Index: PageFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/PageFault.cxx,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- PageFault.cxx 2001/11/26 01:05:37 1.189
+++ PageFault.cxx 2001/11/26 01:33:47 1.190
@@ -30,7 +30,6 @@
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Depend.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.20 +0 -1 eros/src/base/sys/arch/i486/kernel/PseudoInstr.cxx
Index: PseudoInstr.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/PseudoInstr.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- PseudoInstr.cxx 2001/11/26 01:05:37 1.19
+++ PseudoInstr.cxx 2001/11/26 01:33:47 1.20
@@ -23,7 +23,6 @@
#include <eros/target.h>
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/Debug.hxx>
#include <kerninc/util.h>
1.33 +0 -1 eros/src/base/sys/arch/i486/kernel/ReservedFault.cxx
Index: ReservedFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/ReservedFault.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ReservedFault.cxx 2001/11/26 01:05:37 1.32
+++ ReservedFault.cxx 2001/11/26 01:33:47 1.33
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Process.hxx>
#include "IDT.hxx"
1.37 +0 -1 eros/src/base/sys/arch/i486/kernel/SSFault.cxx
Index: SSFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/SSFault.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- SSFault.cxx 2001/11/26 01:05:37 1.36
+++ SSFault.cxx 2001/11/26 01:33:47 1.37
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.34 +0 -1 eros/src/base/sys/arch/i486/kernel/SegPresFault.cxx
Index: SegPresFault.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/arch/i486/kernel/SegPresFault.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- SegPresFault.cxx 2001/11/26 01:05:37 1.33
+++ SegPresFault.cxx 2001/11/26 01:33:47 1.34
@@ -24,7 +24,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Debug.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
#include <kerninc/util.h>
#include <kerninc/Process.hxx>
1.62 +3 -18 eros/src/base/sys/kernel/kern_Checker.cxx
Index: kern_Checker.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_Checker.cxx,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- kern_Checker.cxx 2001/11/26 01:05:38 1.61
+++ kern_Checker.cxx 2001/11/26 01:33:47 1.62
@@ -27,17 +27,10 @@
#include <kerninc/Check.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/Node.hxx>
#include <kerninc/IRQ.hxx>
-static bool Probe(AutoConf *);
-static bool Attach(AutoConf *);
-struct Driver ac_checker = {
- "checker", Probe, Attach
-} ;
-
#ifdef STRESS_TEST
#define DELAY 2ll
#define INVAL_MODULUS 1
@@ -72,21 +65,13 @@
CheckThread TheCheckThread;
-static bool
-Probe(AutoConf *)
+void
+StartCheckThread()
{
CpuReserve::KernIdleCpuReserve.AddKernelThread(&TheCheckThread);
-
- return true;
-}
-
-static bool
-Attach(AutoConf* ac)
-{
TheCheckThread.Wakeup(); /* let it initialize itself... */
- printf("%s (no vector)\n", ac->name);
- return true;
+ printf("Checker...\n");
}
static uint32_t pass = 0;
1.39 +3 -18 eros/src/base/sys/kernel/kern_IdleThread.cxx
Index: kern_IdleThread.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_IdleThread.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- kern_IdleThread.cxx 2001/11/26 01:05:39 1.38
+++ kern_IdleThread.cxx 2001/11/26 01:33:47 1.39
@@ -21,15 +21,8 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/CpuReserve.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Machine.hxx>
-static bool Probe(AutoConf *);
-static bool Attach(AutoConf *);
-struct Driver ac_idler = {
- "idler", Probe, Attach
-} ;
-
const uint32_t StackSize = 256;
static uint32_t Stack[StackSize];
@@ -54,21 +47,13 @@
IdleThread TheIdleThread;
Thread *pIdleThread = &TheIdleThread;
-static bool
-Probe(AutoConf*)
+void
+StartIdleThread()
{
CpuReserve::KernIdleCpuReserve.AddKernelThread(&TheIdleThread);
-
- return true;
-}
-
-static bool
-Attach(AutoConf* ac)
-{
TheIdleThread.Wakeup(); /* let it initialize itself... */
- printf("%s (no vector)\n", ac->name);
- return true;
+ printf("IdleThread...\n");
}
/* Unlike all other threads, this one runs once and then exits (or at
1.5 +0 -1 eros/src/base/sys/kernel/kern_PhysPageSource.cxx
Index: kern_PhysPageSource.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_PhysPageSource.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- kern_PhysPageSource.cxx 2001/11/26 01:05:39 1.4
+++ kern_PhysPageSource.cxx 2001/11/26 01:33:47 1.5
@@ -23,7 +23,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/util.h>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/ObjectSource.hxx>
1.3 +0 -1 eros/src/base/sys/kernel/kern_PreloadObSource.cxx
Index: kern_PreloadObSource.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_PreloadObSource.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- kern_PreloadObSource.cxx 2001/11/26 01:05:39 1.2
+++ kern_PreloadObSource.cxx 2001/11/26 01:33:47 1.3
@@ -23,7 +23,6 @@
#include <kerninc/kernel.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/Machine.hxx>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/util.h>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/ObjectSource.hxx>
1.82 +5 -6 eros/src/base/sys/kernel/kern_main.cxx
Index: kern_main.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/kernel/kern_main.cxx,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- kern_main.cxx 2001/11/26 01:05:39 1.81
+++ kern_main.cxx 2001/11/26 01:33:47 1.82
@@ -35,7 +35,6 @@
#include <kerninc/Machine.hxx>
#include <kerninc/ObjectCache.hxx>
#include <kerninc/util.h>
-#include <kerninc/AutoConf.hxx>
#include <kerninc/Thread.hxx>
#include <kerninc/IRQ.hxx>
#include <kerninc/Debug.hxx>
@@ -97,6 +96,9 @@
InitialThread.context->Resume();
}
+extern void StartIdleThread();
+extern void StartCheckThread();
+
void
main_thread_entry()
{
@@ -106,11 +108,8 @@
Debugger();
#endif
- /* Configure the machine's hardware: */
- AutoConf::ArchConfigure();
- AutoConf::Configure();
-
- printf("After AutoConfigure()\n");
+ StartIdleThread();
+ StartCheckThread();
#if 0
{
1.20 +0 -172 eros/src/base/sys/scripts/config.py
Index: config.py
===================================================================
RCS file: /cvs/eros/src/base/sys/scripts/config.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- config.py 2001/06/15 20:29:53 1.19
+++ config.py 2001/11/26 01:33:47 1.20
@@ -131,94 +131,6 @@
for nm in glob.glob("%s/*" % targdir):
os.remove(nm)
-################################################
-##
-## Device template class and function to build
-## them
-##
-################################################
-
-class ConfTemplate:
- Counter = 0
-
- def __init__(self, name, cls, irq, port, mem, sz):
- self.name = name
- self.index = ConfTemplate.Counter
- self.irq = irq
- self.io_port = port
- self.io_addr = -1
- self.mem_addr = mem
- self.mem_size = sz
- self.devClass = cls
- self.attach = None
- self.nInstance = 0
-
- if (port and type(port) != type([])):
- error("Ports must be specified as a list")
-
- if (mem and type(mem) != type([])):
- error("Memory addresses must be specified as a list")
-
- if (port):
- self.port_table_offset = len(port_table)
- for p in port:
- port_table[len(port_table)] = p
- port_table[len(port_table)] = -1 # terminator
- else:
- self.port_table_offset = 0
-
- if (mem):
- self.mem_addr_table_offset = len(mem_addr_table)
- for p in mem:
- mem_addr_table[len(mem_addr_table)] = p
- mem_addr_table[len(mem_addr_table)] = -1 # terminator
- else:
- self.mem_addr_table_offset = 0
-
- ConfTemplate.Counter = ConfTemplate.Counter + 1
-
- def irq_value(self):
- if (self.irq == None): return 0
- elif (type(self.irq) == type(5)):
- return 1 << self.irq;
- else:
- for i in self.irq:
- value = value | (1 << i)
- return value;
-
-
-# def process_options(self, line, can_irq):
-# while (len(line) >= 2):
-# print line
-#
-# if (can_irq and line[0] == "irq"):
-# self.irq = string.atol(line[1])
-# elif (line[0] == "port"):
-# self.io_port = string.atol(line[1])
-# elif (line[0] == "mem"):
-# self.mem_addr = string.atol(line[1])
-# elif (line[0] == "sz"):
-# self.mem_size = string.atol(line[1])
-# else:
-# error("unknown option")
-#
-# line = line[2:]
-#
-# print line
-# if (len(line) != 0):
-# error("syntax")
-
- def __repr__(self):
-
- attach = self.attach
- if (attach): attach = attach.name
-
- return "\n{{ %s %-5s irq=%s port=%s mem=%s sz=0x%x attach=%s}}\n" % (
- device_classes[self.devClass],
- self.name,
- str(self.irq), str(self.io_port), str(self.mem_addr),
- self.mem_size, attach)
-
def error(s):
# print "Error in \"%s\" at line %d: %s" % (current_file, current_line, s)
print "Error: %s" % s
@@ -228,34 +140,6 @@
config_table = {};
config_by_name = {};
-def add_conf(tmpl):
- global config_table
- global config_by_name
- config_table[tmpl.index] = tmpl
- config_by_name[tmpl.name] = tmpl
-
-def template(name, cls, irq = None, port = None, mem = None, sz = 0):
- global config_by_name
-
- tmpl = ConfTemplate(name, cls, irq, port, mem, sz)
- add_conf(tmpl)
-
-def base_template(name, irq = None, port = None, mem = None, sz = 0):
- template(name, BT_BASE, irq, port, mem, sz);
-publish('base_template')
-
-def isa_template(name, irq = None, port = None, mem = None, sz = 0):
- template(name, BT_ISA, irq, port, mem, sz);
-publish('isa_template')
-
-def eisa_template(name, irq = None, port = None, mem = None, sz = 0):
- template(name, BT_EISA, irq, port, mem, sz);
-publish('eisa_template')
-
-def pci_template(name, irq = None, port = None, mem = None, sz = 0):
- template(name, BT_PCI, irq, port, mem, sz);
-publish('pci_template')
-
#def device(name, parent=None, irq = None, port = None, mem = None, sz = 0):
# global config_by_name
# if (parent):
@@ -557,36 +441,6 @@
out.write(" 0x%x" % value)
out.write("\n};\n")
-def dump_conf(i, comma):
- tmpl = config_table[i]
- ac_template_name = "ac_%s" % tmpl.name
-
- if tmpl.devClass in conf_busses:
- out.write(
- " { %-10s, %-8s, &%-13s, 0x%04x, &::ports[%d], &maddr[%d] }%s\n" % (
- "\"%s\"" % tmpl.name,
- device_classes[tmpl.devClass],
- ac_template_name,
- tmpl.irq_value(), tmpl.port_table_offset,
- tmpl.mem_addr_table_offset,
- comma))
-
-def dump_templates(out):
- out.write("\n/* Configuration template table: */\n")
-
- out.write("struct AutoConf\nAutoConf::ConfigTable[] = {\n")
-
- out.write(
- "/* %-10s, %-8s, %-13s, irq , ... */\n" % (
- "name", "bus", "driver"))
-
- for i in range(len(config_table)-1):
- dump_conf(i, ",")
- dump_conf(len(config_table)-1, "")
-
- out.write("};\n");
- out.write("uint32_t AutoConf::MaxConfig = sizeof(AutoConf::ConfigTable)/sizeof(AutoConf);\n")
-
def dump_optvar(out):
for b in device_classes.keys():
if b < 0: continue; # that one is a placeholder
@@ -638,32 +492,6 @@
#def dump_targets(out):
# for o in conf_targets:
# out.write("TARGETS += %s\n" % o)
-
-################################################
-##
-## Write out the autoconfiguration table
-##
-################################################
-
-filename = "%s/autoconf.cxx" % targdir
-out = open(filename, 'w')
-out.truncate()
-out.write("/* This file is automatically generated -- DO NOT EDIT */\n\n")
-
-out.write("#include <eros/target.h>\n")
-out.write("#include <kerninc/AutoConf.hxx>\n")
-
-dump_ac_types(out)
-
-out.write("\n/* Tables referenced from template list: */\n")
-dump_table("ports", port_table, out)
-dump_table("maddr", mem_addr_table, out)
-
-dump_templates(out)
-
-out.close()
-
-# print port_table
# dump_options(sys.stdout)