drivers/tc patch for DS5000/200
Hi linux-mips list,
First, I want to say, Linux/MIPS is great stuff - thanks for all your hard work, folks!
Now, it is my understanding that, having a pre-REX PROM, the DECstation 5000/200 would not be able to successfully execute the REX calls (rex_gettcinfo(), rex_slot_address()) in drivers/tc/tc.c. Therefore, I have found it necessary to use a patched kernel in my efforts to boot Linux on VMIPS (http://www.dgate.org/vmips), which has lately gained some (limited) DECstation 5000/200 emulation capabilities.
If you find this patch useful, you're quite welcome to it. I'm also interested in hearing from anyone who has access to a 5000/200 who can tell me whether I'm right or wrong, as I only have old manuals and header files to work from.
-Brian Gaeke
Signature · 38 lines
Brian R. Gaeke, brg at dgate.org -- GnuPG encrypted mail gleefully accepted
Index: tc.c
===================================================================
RCS file: /home/cvs/linux/drivers/tc/tc.c,v
retrieving revision 1.7.2.8
diff -u -a -d -p -r1.7.2.8 tc.c
--- tc.c 11 Aug 2003 11:52:38 -0000 1.7.2.8
+++ tc.c 3 Dec 2004 00:14:56 -0000
@@ -32,6 +32,7 @@ MODULE_LICENSE("GPL");
slot_info tc_bus[MAX_SLOT];
static int num_tcslots;
static tcinfo *info;
+static tcinfo ds5000_200_info;
unsigned long system_base;
@@ -196,8 +197,18 @@ void __init tc_init(void)
tc_bus[i].flags = FREE;
}
- info = (tcinfo *) rex_gettcinfo();
- slot0addr = (unsigned long)KSEG1ADDR(rex_slot_address(0));
+ if (mips_machtype != MACH_DS5000_200) {
+ info = (tcinfo *) rex_gettcinfo();
+ slot0addr = (unsigned long)KSEG1ADDR(rex_slot_address(0));
+ } else {
+ /* Hardcode these, because the old PROM lacks gettcinfo(). */
+ ds5000_200_info.revision = 0;
+ ds5000_200_info.parity = 0;
+ ds5000_200_info.clk_period = 40;
+ ds5000_200_info.slot_size = 4;
+ info = &ds5000_200_info;
+ slot0addr = 0xbe000000;
+ }
switch (mips_machtype) {
case MACH_DS5000_200:Quoted 6 lines · Brian R. Gaeke
Now, it is my understanding that, having a pre-REX PROM, the DECstation 5000/200 would not be able to successfully execute the REX calls (
rex_gettcinfo(),rex_slot_address()) indrivers/tc/tc.c. Therefore, I have found it necessary to use a patched kernel in my efforts to boot Linux on VMIPS (http://www.dgate.org/vmips), which has lately gained some (limited) DECstation 5000/200 emulation capabilities.
They've got it wrong. While there were a few DECstation 5000/200 systems
around 1990 that were shipped with pre-REX firmware, they were soon updated to REX fimware under service contracts. I'm inclined to believe there is no /200 system with pre-REX firmware in existence anymore. In particular there are no entries for these firmware versions on the NetBSD PROM list -- the oldest one reported is 5.3c which is already REX-compliant.
Quoted 4 lines
If you find this patch useful, you're quite welcome to it. I'm also interested in hearing from anyone who has access to a 5000/200 who can tell me whether I'm right or wrong, as I only have old manuals and header files to work from.
Real /200 systems work more or less correctly with Linux 2.4. A port of
2.6 hasn't really started yet -- some drivers are broken. The /200 is one of the best documented DECstations.
Maciej