From paul@suede.sw.oz.au  Wed Dec  4 08:26:24 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id IAA16514 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 08:26:22 +0100 (MET)
Received: from staff.cs.su.OZ.AU ([129.78.8.1]) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA09684; Wed, 4 Dec 1996 08:25:52 +0100 (MET)
Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP
	id HAA05021; Wed, 4 Dec 1996 07:26:01 GMT (8.6.10/Unixware)
	(from paul@suede.sw.oz.au for <linux-mips@fnet.fr>)
Received: by suede.sw.oz.au
	id SAA12047; Wed, 4 Dec 1996 18:26:00 +1100 (SMI-8.6/1.34)
	(from paul for linux-mips@fnet.fr)
From: paul@suede.sw.oz.au (Paul Antoine)
Message-Id: <199612040726.SAA12047@suede.sw.oz.au>
Subject: Re: Timer setup code for DS5000/200
To: linux-mips@fnet.fr
Date: Wed, 4 Dec 1996 18:25:59 +1100 (EST)
In-Reply-To: <199611300051.BAA14947@vespa.unix-ag.uni-siegen.de> from "Michael Engel" at Nov 30, 96 01:51:32 am
Organization: Softway Pty Ltd
X-Face: 
	U)Kb/c%d9`JI>Y>s'evmMaR`z*WE$<,["^2)I8o?jkx/d^=dMa$GD(s6[p|npE}r0?)qQ7H
	*3S2vbK66POj?=%pCn?Bp}D/3A{`-.v0=%L9emS+|Pc91$EP0-;i\ON*p;Mwp$tt3wO~g1Z
	W.mIz'n~$U&uIM9ix=\1=~""=W?t$3b)>`foC8+3g$m2l;^D$?i}WI(Uxc@THJ9OBbk3g6
X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*]
Content-Type: text
Content-Length: 3701
Lines: 113

Hi folks,

Michael Engel wrote:

> well, this is the promised timer setup code that obviously works on my
> DS5000/200 and produces interrupts ... I still haven't got the interrupt 
> handler to return where it should, maybe Paul can help out with that.

I certainly can!

> 	/* WARNING :
> 	   This actually reads out time and date information, but manages
> 	   to mess up somehow with the RTC so that I get a ?RTC error on next
> 	   reboot and time/date information is reset to 0.0h 1.1.1972 (?) !! */

You should wait until there's no update in progress, but this isn't why
you're getting ?RTC errors on boot...

> I'm enabling interrupts via the following code sequence :
> 
> [decstation_setup.S]
>  
> decstation_setup_int:
>                 NESTED(decstation_setup_int, FR_SIZE, ra)
>                 .set    noat
>  
>                   mfc0 k0, CP0_STATUS 
nop needed here I think!
>                   ori  k0,0x0f15 
>                   mtc0 k0, CP0_STATUS
nop needed here I think!

> I inserted lots of pmax_printf calls in the interrupt handling code, and it
> never seems to call an interrupt routine (which should printk some panic
> message ...). Basically, it runs up to 

Remember printk and PANIC do *not* work yet - as the console driver
has not been written.  Repeat after me: "pmax_printf is a hack..."

> in dec_entry.S which is supposed to call the interrupt handler, right ?

Well, it would if the table was set up right...

> Failing that, I simply tried to increment the jiffies counter in 
> head.S in except_vec3 via

This is a better thing to do, but...

> NESTED(except_vec3, 0, sp)
> 	.set 	noat
> 
> 	SAVE_ALL
> 
> 	lw	t0, jiffies
> 	add	t0, 1
> 	sw	t0, jiffies

The SAVE_ALL has no corresponding RESTORE_ALL so you're going to loose
the stack after a while, and if you use k0/k1 you should have no probs.

Another problem is that the assembler will try to us $at given the
sequence above, try:

	la	k0,jiffies
	lw	k1,(k0)
	addiu	k1,1
	sw	k1,(k0)

...which seems correct to me, but still doesn't make them jiffies jump
the way I think it should... <sigh>  Maybe I've been away from MIPS
assembler too long...

My suggestion would be to limit this to just toggling the LED as an
indicator.

> just to get a BogoMips number :-) and return via

The BogoMips will only print if the console driver is working, unless
you use pmax_printf in place of printk in calibrate_delay.  The other
problem you'll encounter is that the code leading up to calibrate_delay,
specifically some of the initialisation code isn't happy with interrupts
turned on!

> 	mfc0	k0, CP0_EPC
> 	nop
> 	jr	k0
> 	rfe
> 
> as Ralf proposed in a previous mail.
> Well, this code doesn't return where is should. I get periodic interrupts,
> but the kernel code refuses to run any further.

Hmmm... at least one of the reasons for this is that you're not clearing
the interrupt on the RTC, so that as soon as the rfe completes it leaps
straight back into the exception routine... try:

	la	k0,0xbfe80030		# addr of RTC reg C on 5000/200
	lw	k1,(k0)

...which reads Register C and clears the pending interrupt on the RTC in
a 5000/200 (the appropriate addr for 5000/2x is 0xbc200030 for anyone
else that's following this and playing along :-).

Regards,
Paul
_______________________________________________________________________________
Paul M. Antoine, 				        Net: paul@sw.oz.au
Softway Pty Ltd						WWW: www.softway.com.au
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

From paul@suede.sw.oz.au  Wed Dec  4 09:45:31 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id JAA16757 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 09:45:30 +0100 (MET)
Received: from staff.cs.su.OZ.AU by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA11593; Wed, 4 Dec 1996 09:45:00 +0100 (MET)
Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP
	id IAA06689; Wed, 4 Dec 1996 08:45:07 GMT (8.6.10/Unixware)
	(from paul@suede.sw.oz.au for <linux-mips@fnet.fr>)
Received: by suede.sw.oz.au
	id TAA13310; Wed, 4 Dec 1996 19:45:02 +1100 (SMI-8.6/1.34)
	(from paul for linux-mips@fnet.fr)
From: paul@suede.sw.oz.au (Paul Antoine)
Message-Id: <199612040845.TAA13310@suede.sw.oz.au>
Subject: Re: Timer setup code for DS5000/200
To: linux-mips@fnet.fr
Date: Wed, 4 Dec 1996 19:45:01 +1100 (EST)
In-Reply-To: <199612040726.SAA12047@suede.sw.oz.au> from "Paul Antoine" at Dec 4, 96 06:25:59 pm
Organization: Softway Pty Ltd
X-Face: 
	U)Kb/c%d9`JI>Y>s'evmMaR`z*WE$<,["^2)I8o?jkx/d^=dMa$GD(s6[p|npE}r0?)qQ7H
	*3S2vbK66POj?=%pCn?Bp}D/3A{`-.v0=%L9emS+|Pc91$EP0-;i\ON*p;Mwp$tt3wO~g1Z
	W.mIz'n~$U&uIM9ix=\1=~""=W?t$3b)>`foC8+3g$m2l;^D$?i}WI(Uxc@THJ9OBbk3g6
X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*]
Content-Type: text
Content-Length: 1168
Lines: 44

Hi again folks,

Earlier I said:

> Another problem is that the assembler will try to us $at given the
> sequence above, try:
> 
> 	la	k0,jiffies
> 	lw	k1,(k0)
> 	addiu	k1,1
> 	sw	k1,(k0)

You will also need nops here, so:

	la	k0,jiffies
	lw	k1,(k0)
	nop
	addi	k1,1
	sw	k1,(k0)
	nop

> Hmmm... at least one of the reasons for this is that you're not clearing
> the interrupt on the RTC, so that as soon as the rfe completes it leaps
> straight back into the exception routine... try:
> 
> 	la	k0,0xbfe80030		# addr of RTC reg C on 5000/200
> 	lw	k1,(k0)

This should be:

 	la	k0,0xbfe80030		# addr of RTC reg C on 5000/200
	lb	k1,(k0)			# only a byte-wide device

Once you do the above, the interrupts work well.

Paul
_______________________________________________________________________________
Paul M. Antoine, 				        Net: paul@sw.oz.au
Softway Pty Ltd						WWW: www.softway.com.au
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

From paul@suede.sw.oz.au  Wed Dec  4 10:45:35 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id KAA17008 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 10:45:34 +0100 (MET)
Received: from staff.cs.su.OZ.AU by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA13430; Wed, 4 Dec 1996 10:45:04 +0100 (MET)
Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP
	id JAA08000; Wed, 4 Dec 1996 09:45:17 GMT (8.6.10/Unixware)
	(from paul@suede.sw.oz.au for )
Received: by suede.sw.oz.au
	id UAA13697; Wed, 4 Dec 1996 20:45:16 +1100 (SMI-8.6/1.34)
	(from paul for )
From: paul@suede.sw.oz.au (Paul Antoine)
Message-Id: <199612040945.UAA13697@suede.sw.oz.au>
Subject: More cleanups for DECstation
To: linux@mailhost.uni-koblenz.de (Systemkennung Linux)
Date: Wed, 4 Dec 1996 20:45:15 +1100 (EST)
Cc: linux-mips@fnet.fr (Linux MIPS mailing list)
Organization: Softway Pty Ltd
X-Face: 
	U)Kb/c%d9`JI>Y>s'evmMaR`z*WE$<,["^2)I8o?jkx/d^=dMa$GD(s6[p|npE}r0?)qQ7H
	*3S2vbK66POj?=%pCn?Bp}D/3A{`-.v0=%L9emS+|Pc91$EP0-;i\ON*p;Mwp$tt3wO~g1Z
	W.mIz'n~$U&uIM9ix=\1=~""=W?t$3b)>`foC8+3g$m2l;^D$?i}WI(Uxc@THJ9OBbk3g6
X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*]
Content-Type: text
Content-Length: 1021
Lines: 24

Ralf,

There is still plenty of x86-specific goo in the arch/mips/kernel
directory that's making it hard to move the DECstation port along,
mainly because I'd like to rip out great chunks of it and put them
somewhere else.

Can you tell I've been frustrated with interrupts all day? :-)

Could you have a look at those items when you look at the entry.S/head.S
issues.  I'm thinking specifically of stuff like time.c which assumes
the existance of setup_x86_irq etc.  In fact, the whole IRQ stuff needs
some thought... anything else you already have in mind?

Regards,
Paul
_______________________________________________________________________________
Paul M. Antoine, 				        Net: paul@sw.oz.au
Softway Pty Ltd						WWW: www.softway.com.au
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

From linux@mailhost.uni-koblenz.de  Wed Dec  4 14:25:47 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id OAA17785 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 14:25:46 +0100 (MET)
Received: from informatik.uni-koblenz.de (mailhost.uni-koblenz.de) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA19659; Wed, 4 Dec 1996 14:25:08 +0100 (MET)
Received: from ozzy (linux@ozzy.uni-koblenz.de [141.26.5.8]) by informatik.uni-koblenz.de (8.7.5/8.6.9) with SMTP id OAA20312 for <linux-mips@fnet.fr>; Wed, 4 Dec 1996 14:23:42 +0100 (MET)
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Message-Id: <199612041323.OAA20312@informatik.uni-koblenz.de>
Received: by ozzy (SMI-8.6/KO-2.0)
	id OAA03755; Wed, 4 Dec 1996 14:23:38 +0100
Subject: Re: Timer setup code for DS5000/200
To: linux-mips@fnet.fr
Date: Wed, 4 Dec 1996 14:23:38 +0100 (MET)
In-Reply-To: <199612040726.SAA12047@suede.sw.oz.au> from "Paul Antoine" at Dec 4, 96 06:25:59 pm
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 835
Lines: 39

Hi all,

> > NESTED(except_vec3, 0, sp)
> > 	.set 	noat
> > 
> > 	SAVE_ALL
> > 
> > 	lw	t0, jiffies
> > 	add	t0, 1
> > 	sw	t0, jiffies

> 
> sequence above, try:
> 
> 	la	k0,jiffies
> 	lw	k1,(k0)
> 	addiu	k1,1
> 	sw	k1,(k0)
> 
> ...which seems correct to me, but still doesn't make them jiffies jump
> the way I think it should... <sigh>  Maybe I've been away from MIPS
> assembler too long...

The problem might be that you're assembling that code in noreorder mode.
In that case there will be no nop be inserted after the lw instruction
and the effect of the addiu is undefined.

This will assemble into the shortest code for all CPUs:

	.set	push
	.set	reorder
	lui	k0,%hi(jiffies)
	lw	k1,%lo(jiffies)(k0)
	addiu	k1,1
	sw	k1,%lo(jiffies)(k0)
	.set	pop

> The BogoMips will only print if the console driver is working, unless
  Ralf

From linux@mailhost.uni-koblenz.de  Wed Dec  4 14:34:41 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id OAA17984 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 14:34:40 +0100 (MET)
Received: from informatik.uni-koblenz.de (mailhost.uni-koblenz.de) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA19944; Wed, 4 Dec 1996 14:33:54 +0100 (MET)
Received: from ozzy (linux@ozzy.uni-koblenz.de [141.26.5.8]) by informatik.uni-koblenz.de (8.7.5/8.6.9) with SMTP id OAA20997 for <linux-mips@fnet.fr>; Wed, 4 Dec 1996 14:33:17 +0100 (MET)
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Message-Id: <199612041333.OAA20997@informatik.uni-koblenz.de>
Received: by ozzy (SMI-8.6/KO-2.0)
	id OAA03788; Wed, 4 Dec 1996 14:33:12 +0100
Subject: Re: More cleanups for DECstation
To: linux-mips@fnet.fr
Date: Wed, 4 Dec 1996 14:33:12 +0100 (MET)
In-Reply-To: <199612040945.UAA13697@suede.sw.oz.au> from "Paul Antoine" at Dec 4, 96 08:45:15 pm
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 1218
Lines: 31

Hi all,

> There is still plenty of x86-specific goo in the arch/mips/kernel
> directory that's making it hard to move the DECstation port along,
> mainly because I'd like to rip out great chunks of it and put them
> somewhere else.

Yes, I know.  It was just easy to cheat for Jazz ...

> Can you tell I've been frustrated with interrupts all day? :-)

Probably phone interrupts :-)

> Could you have a look at those items when you look at the entry.S/head.S
> issues.  I'm thinking specifically of stuff like time.c which assumes
> the existance of setup_x86_irq etc.  In fact, the whole IRQ stuff needs
> some thought... anything else you already have in mind?

It's not the first time we discuss this on this list ...  just nobody
has anything done yet ...

I suggest that we reserve interrupts 0-15 for PC-style hardware because
there are some drivers out there which have interrupt numbers hardcoded.
All other interrupts go to numbers >= 16.

As for the specific case in arch/mips/kernel/time.c I've already implemented
a machine specific setup routine for this which should hopefully satisfy
your needs.  I'll still have to add support for those machines which
have CPU internal timers like the R4600.

  Ralf

From engel@unix-ag.uni-siegen.de  Wed Dec  4 23:13:59 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id XAA19721 for <linux-mips@guadalquivir.fnet.fr>; Wed, 4 Dec 1996 23:13:58 +0100 (MET)
Received: from vespa.unix-ag.uni-siegen.de by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA06781; Wed, 4 Dec 1996 23:13:29 +0100 (MET)
Received: (from engel@localhost)
          by vespa.unix-ag.uni-siegen.de (8.8.4/8.8.4/sfx-3.0)
	  id XAA24921 for linux-mips@fnet.fr; Wed, 4 Dec 1996 23:13:32 +0100 (MET)
From: Michael Engel <engel@unix-ag.uni-siegen.de>
Message-Id: <199612042213.XAA24921@vespa.unix-ag.uni-siegen.de>
Subject: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Wed, 4 Dec 1996 23:13:30 +0100 (MET)
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1285
Lines: 47


Hi Paul, Ralf and all you others,

the timer interrupt now seems to work well on the DS5000/200.

Thanks a lot, Paul & Ralf !

Now I'll try to adjust the HZ value to get a correct BogoMIPS number.
I'm currently using a timer interval of 64 Hz (15.625 ms) and set 
HZ to 64 in include/asm-mips/param.h [this _is_ the right place, I hope ...].

This shows us 3.11 BogoMIPS ... I don't think this is the correct value,
is it ? 

Btw., I forgot to mention that I indeed used pmax_printf in printk, so I got 
the BogoMIPS etc. printed. I changed printk to:

asmlinkage int printk(const char *fmt, ...)
{
        va_list args;
        int i;
        char *msg, *p, *buf_end;
        static char msg_level = -1;
        long flags;
 
        save_flags(flags);
        cli();
        va_start(args, fmt);
        i = vsprintf(buf + 3, fmt, args); /* hopefully i < sizeof(buf)-4 */
        buf_end = buf + 3 + i;
        va_end(args);

        for (p = buf + 3; *p ; p++) {
                pmax_printf("%c", *p);
        }
        restore_flags(flags);
        wake_up_interruptible(&log_wait);
        return i;
}
 
Bad hack, but actually works :-)

I'll also try changing the timer base address and run the kernel on my 
DS5000/20 ...

regards,
	Michael Engel	(engel@unix-ag.uni-siegen.de)

From linux@mailhost.uni-koblenz.de  Thu Dec  5 03:09:04 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id DAA22000 for <linux-mips@guadalquivir.fnet.fr>; Thu, 5 Dec 1996 03:09:03 +0100 (MET)
Received: from informatik.uni-koblenz.de (mailhost.uni-koblenz.de) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA12676; Thu, 5 Dec 1996 03:08:31 +0100 (MET)
Received: from thoma (linux@thoma.uni-koblenz.de [141.26.4.61]) by informatik.uni-koblenz.de (8.7.5/8.6.9) with SMTP id DAA01385 for <linux-mips@fnet.fr>; Thu, 5 Dec 1996 03:08:55 +0100 (MET)
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Message-Id: <199612050208.DAA01385@informatik.uni-koblenz.de>
Received: by thoma (SMI-8.6/KO-2.0)
	id DAA04951; Thu, 5 Dec 1996 03:08:51 +0100
Subject: Re: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Thu, 5 Dec 1996 03:08:50 +0100 (MET)
In-Reply-To: <199612042213.XAA24921@vespa.unix-ag.uni-siegen.de> from "Michael Engel" at Dec 4, 96 11:13:30 pm
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 1257
Lines: 32

> Hi Paul, Ralf and all you others,
> 
> the timer interrupt now seems to work well on the DS5000/200.

(crowd is clapping, girls fall unconsious ...)

> Now I'll try to adjust the HZ value to get a correct BogoMIPS number.
> I'm currently using a timer interval of 64 Hz (15.625 ms) and set 
> HZ to 64 in include/asm-mips/param.h [this _is_ the right place, I hope ...].

That's a bit hacky.  <asm/param.h> is also used by userland.  So far
we've used a value of 100 Hz.  Changing this will break all userland
stuff which depends on that assumption.  I'll think about a solution.

> This shows us 3.11 BogoMIPS ... I don't think this is the correct value,
> is it ? 

I don't think so.  Have to read what the latency for a taken branch
on the R3000 is.  Then I can say you what the theoretical value for
BogoMIPS is.

> Btw., I forgot to mention that I indeed used pmax_printf in printk, so I got 
> the BogoMIPS etc. printed. I changed printk to:

> Bad hack, but actually works :-)

More elegant solution:  Use register_console() (kernel/printk.c) to
register pmax_printf() as the printing function on startup.  The console
initialization will then register another console.  You can do that
cleanly in arch/mips/dec/setup.c:decstation_setup().

  Ralf

From engel@unix-ag.uni-siegen.de  Thu Dec  5 05:22:02 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id FAA22626 for <linux-mips@guadalquivir.fnet.fr>; Thu, 5 Dec 1996 05:22:01 +0100 (MET)
Received: from vespa.unix-ag.uni-siegen.de by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA15397; Thu, 5 Dec 1996 05:21:29 +0100 (MET)
Received: (from engel@localhost)
          by vespa.unix-ag.uni-siegen.de (8.8.4/8.8.4/sfx-3.0)
	  id FAA07129 for linux-mips@fnet.fr; Thu, 5 Dec 1996 05:21:32 +0100 (MET)
From: Michael Engel <engel@unix-ag.uni-siegen.de>
Message-Id: <199612050421.FAA07129@vespa.unix-ag.uni-siegen.de>
Subject: Re: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Thu, 5 Dec 1996 05:21:31 +0100 (MET)
In-Reply-To: <199612050208.DAA01385@informatik.uni-koblenz.de> from "Systemkennung Linux" at Dec 5, 96 03:08:50 am
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1769
Lines: 43


> > the timer interrupt now seems to work well on the DS5000/200.
> 
> (crowd is clapping, girls fall unconsious ...)
> 
:-)

> > Now I'll try to adjust the HZ value to get a correct BogoMIPS number.
> > I'm currently using a timer interval of 64 Hz (15.625 ms) and set 
> > HZ to 64 in include/asm-mips/param.h [this _is_ the right place, I hope ...].
> 
> That's a bit hacky.  <asm/param.h> is also used by userland.  So far
> we've used a value of 100 Hz.  Changing this will break all userland
> stuff which depends on that assumption.  I'll think about a solution.
> 
This might be a real problem, as the DECstation can be either programmed
for 64 or 128 ticks per second (several other powers of 2 are also possible).

> > This shows us 3.11 BogoMIPS ... I don't think this is the correct value,
> > is it ? 
> 
> I don't think so.  Have to read what the latency for a taken branch
> on the R3000 is.  Then I can say you what the theoretical value for
> BogoMIPS is.
> 
I assume it is sufficient to set HZ according to the actual tick frequency,
right ? Or is there anything else that must be done ???

>> Btw., I forgot to mention that I indeed used pmax_printf in printk, so I got 
>> the BogoMIPS etc. printed. I changed printk to:
> 
>> Bad hack, but actually works :-)
> 
Well, it actually only works on the DS5000/20 :-). My 5000/2x doesn't like
that hack - no output ... I'll try to do it the right way ...

The DS5000/25 seems to have another problem with the interrupts:
I got the interrupts running, but have the same problem as one the 5000/200
before - the kernel refuses to continue after IRQs are turned on.
I'm running off a serial console terminal on the 5000/25. May this cause any
problems (I don't think so, but I'm not 100% sure) ?

	Michael

From oeinckj@ahecas.ahec.edu  Thu Dec  5 19:14:54 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.3/8.7.3) with SMTP id TAA25307 for <linux-mips@guadalquivir.fnet.fr>; Thu, 5 Dec 1996 19:14:53 +0100 (MET)
Received: from ahecas.ahec.edu by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA15232; Thu, 5 Dec 1996 19:14:21 +0100 (MET)
Received: from ae1-2200.ahec.edu by AHECAS.AHEC.EDU (MX V4.1 VAX) with SMTP;
          Thu, 05 Dec 1996 11:12:34 MST
Received: by ae1-2200.ahec.edu with Microsoft Mail id
          <01BBE29D.2DE13F60@ae1-2200.ahec.edu>; Thu, 5 Dec 1996 11:12:19 -0000
Message-Id: <01BBE29D.2DE13F60@ae1-2200.ahec.edu>
From: James Oeinck <oeinckj@ahecas.ahec.edu>
To: "'linux-mips@fnet.fr'" <linux-mips@fnet.fr>
Subject: mips box
Date: Thu, 5 Dec 1996 11:12:17 -0000
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Length: 537
Lines: 16

Hello,

I have a couple of mips boxes from NEC, R2000, and a R4000.  Interested =
in getting some new life out of these guys, both our running winnt =
3.51wkst./server.  I have trouble finding any "typical" software to run =
on these things.  For example a windows based fax software (I dont want =
to pay upgade cost to 4.0 which supports such a beast) or get Autocad to =
port to these guys. =20

anyway, would like to get networked in to some sort of group that =
explores mips issues.

thanks

jim oeinck,=20
architect, sys. admins.

From gudmundur.gudmundsson@hiof.no  Fri Dec  6 14:29:11 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id OAA00448 for <linux-mips@guadalquivir.fnet.fr>; Fri, 6 Dec 1996 14:29:10 +0100 (MET)
Received: from fenris.hiof.no by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA15299; Fri, 6 Dec 1996 14:28:39 +0100 (MET)
Received: from gg.hiof.no by fenris.hiof.no with SMTP (PP) 
          id <21277-0@fenris.hiof.no>; Fri, 6 Dec 1996 14:28:46 +0100
Message-Id: <32A81F08.4474@hiof.no>
Date: Fri, 06 Dec 1996 14:26:32 +0100
From: Gudmundur Gudmundsson <gudmundur.gudmundsson@hiof.no>
Reply-To: gudmundur.gudmundsson@hiof.no
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Mime-Version: 1.0
To: linux-mips@fnet.fr
Cc: steinba@oleg.hiof.no
Subject: Can our Indy run Linux
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Length: 214
Lines: 6

I want to install Linux on a SGI Indy with a R4600 CPU.
Can I do this, how do I do it, and where do I find the software?


Thanks for any help.
Stein B. Andersen (steinba@oleg.hiof.no) (no, this is not my account)

From dom@algor.co.uk  Sat Dec  7 14:23:45 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id OAA04390 for <linux-mips@guadalquivir.fnet.fr>; Sat, 7 Dec 1996 14:23:38 +0100 (MET)
Received: from moorgate.algor.co.uk by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA17984; Sat, 7 Dec 1996 14:23:00 +0100 (MET)
Received: from gladsmuir.algor.co.uk (dom@gladsmuir.algor.co.uk [193.117.190.129]) by moorgate.algor.co.uk (8.7.4/8.7.3) with ESMTP id NAA14006; Sat, 7 Dec 1996 13:23:19 GMT
From: Dom Sweetman <dom@algor.co.uk>
Date: Sat, 7 Dec 1996 13:22:27 GMT
Message-Id: <263.199612071322@gladsmuir.algor.co.uk>
To: linux-mips@fnet.fr
Subject: Re: BogoMIPS working on DS5000/200 !
In-Reply-To: <199612050208.DAA01385@informatik.uni-koblenz.de>
References: <199612042213.XAA24921@vespa.unix-ag.uni-siegen.de>
        <199612050208.DAA01385@informatik.uni-koblenz.de>
Content-Length: 347
Lines: 11


> ... Have to read what the latency for a taken branch on the R3000
> is.

The R3000 is a nice simple 5-stage pipeline.  It always executes the
'branch delay slot' instruction (immediately after the branch in
memory order), but then continues with the branch target instruction.
There's no extra hidden latency.

Dominic Sweetman
dom@algor.co.uk

From linux@mailhost.uni-koblenz.de  Sun Dec  8 00:39:18 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id AAA06681 for <linux-mips@guadalquivir.fnet.fr>; Sun, 8 Dec 1996 00:39:13 +0100 (MET)
Received: from informatik.uni-koblenz.de (mailhost.uni-koblenz.de) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA28056; Sun, 8 Dec 1996 00:38:22 +0100 (MET)
Received: from thoma (linux@thoma.uni-koblenz.de [141.26.4.61]) by informatik.uni-koblenz.de (8.7.5/8.6.9) with SMTP id AAA23996 for <linux-mips@fnet.fr>; Sun, 8 Dec 1996 00:38:50 +0100 (MET)
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Message-Id: <199612072338.AAA23996@informatik.uni-koblenz.de>
Received: by thoma (SMI-8.6/KO-2.0)
	id AAA02911; Sun, 8 Dec 1996 00:38:42 +0100
Subject: Re: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Sun, 8 Dec 1996 00:38:41 +0100 (MET)
In-Reply-To: <263.199612071322@gladsmuir.algor.co.uk> from "Dom Sweetman" at Dec 7, 96 01:22:27 pm
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 395
Lines: 11

> > ... Have to read what the latency for a taken branch on the R3000
> > is.
> 
> The R3000 is a nice simple 5-stage pipeline.  It always executes the
> 'branch delay slot' instruction (immediately after the branch in
> memory order), but then continues with the branch target instruction.
> There's no extra hidden latency.

That means BogoMIPS should equal clock in MHz divided by 2.

  Ralf

From paul@suede.sw.oz.au  Sun Dec  8 23:15:24 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id XAA12416 for <linux-mips@guadalquivir.fnet.fr>; Sun, 8 Dec 1996 23:15:22 +0100 (MET)
Received: from staff.cs.su.OZ.AU ([129.78.8.1]) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA26064; Sun, 8 Dec 1996 23:14:48 +0100 (MET)
Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP
	id WAA22323; Sun, 8 Dec 1996 22:14:58 GMT (8.6.10/Unixware)
	(from paul@suede.sw.oz.au for <linux-mips@fnet.fr>)
Received: by suede.sw.oz.au
	id JAA24715; Mon, 9 Dec 1996 09:14:56 +1100 (SMI-8.6/1.34)
	(from paul for linux-mips@fnet.fr)
From: paul@suede.sw.oz.au (Paul Antoine)
Message-Id: <199612082214.JAA24715@suede.sw.oz.au>
Subject: Re: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Mon, 9 Dec 1996 09:14:55 +1100 (EST)
In-Reply-To: <199612050421.FAA07129@vespa.unix-ag.uni-siegen.de> from "Michael Engel" at Dec 5, 96 05:21:31 am
Organization: Softway Pty Ltd
X-Face: 
	U)Kb/c%d9`JI>Y>s'evmMaR`z*WE$<,["^2)I8o?jkx/d^=dMa$GD(s6[p|npE}r0?)qQ7H
	*3S2vbK66POj?=%pCn?Bp}D/3A{`-.v0=%L9emS+|Pc91$EP0-;i\ON*p;Mwp$tt3wO~g1Z
	W.mIz'n~$U&uIM9ix=\1=~""=W?t$3b)>`foC8+3g$m2l;^D$?i}WI(Uxc@THJ9OBbk3g6
X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*]
Content-Type: text
Content-Length: 2272
Lines: 49

> > > the timer interrupt now seems to work well on the DS5000/200.

Yay!

> > > Now I'll try to adjust the HZ value to get a correct BogoMIPS number.
> > > I'm currently using a timer interval of 64 Hz (15.625 ms) and set 
> > > HZ to 64 in include/asm-mips/param.h [this _is_ the right place, I
> > > hope ...].
> > 
> > That's a bit hacky.  <asm/param.h> is also used by userland.  So far
> > we've used a value of 100 Hz.  Changing this will break all userland
> > stuff which depends on that assumption.  I'll think about a solution.
> > 
> This might be a real problem, as the DECstation can be either programmed
> for 64 or 128 ticks per second (several other powers of 2 are also possible).

It is a real problem, and one that the MACH source refers to rather
obliquely. There is another source of (faster) periodic interrupts on
the DECstations which is used by MACH... I'll have to look up the code
again to try to figure out what they are really doing.

> > > This shows us 3.11 BogoMIPS ... I don't think this is the correct value,
> > > is it ? 

Better than the 0.8 I got when I hacked the timer interupt in... I
think my hack was somewhat nastier than yours :-)

> The DS5000/25 seems to have another problem with the interrupts:
> I got the interrupts running, but have the same problem as one the 5000/200
> before - the kernel refuses to continue after IRQs are turned on.
> I'm running off a serial console terminal on the 5000/25. May this cause any
> problems (I don't think so, but I'm not 100% sure) ?

Almost certainly... though it depends on whether the PROM uses
interrupts for input from the terminal.  I seem to remember your code
snippets only turning on the timer interupt, so maybe you should
actually read the old value and flip the bit rather than setting it
alone explicitly.

Regards,
Paul
_______________________________________________________________________________
Paul M. Antoine, 				        Net: paul@sw.oz.au
Softway Pty Ltd						WWW: www.softway.com.au
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

From paul@suede.sw.oz.au  Sun Dec  8 23:17:26 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id XAA12445 for <linux-mips@guadalquivir.fnet.fr>; Sun, 8 Dec 1996 23:17:25 +0100 (MET)
Received: from staff.cs.su.OZ.AU by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA26081; Sun, 8 Dec 1996 23:16:51 +0100 (MET)
Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP
	id WAA22403; Sun, 8 Dec 1996 22:17:05 GMT (8.6.10/Unixware)
	(from paul@suede.sw.oz.au for <linux-mips@fnet.fr>)
Received: by suede.sw.oz.au
	id JAA24848; Mon, 9 Dec 1996 09:17:04 +1100 (SMI-8.6/1.34)
	(from paul for linux-mips@fnet.fr)
From: paul@suede.sw.oz.au (Paul Antoine)
Message-Id: <199612082217.JAA24848@suede.sw.oz.au>
Subject: Re: BogoMIPS working on DS5000/200 !
To: linux-mips@fnet.fr
Date: Mon, 9 Dec 1996 09:17:03 +1100 (EST)
In-Reply-To: <199612050208.DAA01385@informatik.uni-koblenz.de> from "Systemkennung Linux" at Dec 5, 96 03:08:50 am
Organization: Softway Pty Ltd
X-Face: 
	U)Kb/c%d9`JI>Y>s'evmMaR`z*WE$<,["^2)I8o?jkx/d^=dMa$GD(s6[p|npE}r0?)qQ7H
	*3S2vbK66POj?=%pCn?Bp}D/3A{`-.v0=%L9emS+|Pc91$EP0-;i\ON*p;Mwp$tt3wO~g1Z
	W.mIz'n~$U&uIM9ix=\1=~""=W?t$3b)>`foC8+3g$m2l;^D$?i}WI(Uxc@THJ9OBbk3g6
X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*]
Content-Type: text
Content-Length: 1051
Lines: 24

> > Btw., I forgot to mention that I indeed used pmax_printf in printk, so I got 
> > the BogoMIPS etc. printed. I changed printk to:
> 
> > Bad hack, but actually works :-)
> 
> More elegant solution:  Use register_console() (kernel/printk.c) to
> register pmax_printf() as the printing function on startup.  The console
> initialization will then register another console.  You can do that
> cleanly in arch/mips/dec/setup.c:decstation_setup().

I tried this, and it didn't work!  I'm getting around this by writing
the real console code (tm) for the DECstation based heavily on the
SPARC code.


Paul
_______________________________________________________________________________
Paul M. Antoine, 				        Net: paul@sw.oz.au
Softway Pty Ltd						WWW: www.softway.com.au
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

From s100962@student.uq.edu.au  Mon Dec  9 03:54:32 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id DAA15318 for <linux-mips@guadalquivir.fnet.fr>; Mon, 9 Dec 1996 03:54:31 +0100 (MET)
From: s100962@student.uq.edu.au
Received: from student.uq.edu.au by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA02091; Mon, 9 Dec 1996 03:53:46 +0100 (MET)
Received: from localhost (s100962@localhost [127.0.0.1]) by student.uq.edu.au (8.8.4/8.8.3) with SMTP id MAA31360 for linux-mips@fnet.fr; Mon, 9 Dec 1996 12:54:05 +1000 (GMT+1000)
Message-Id: <199612090254.MAA31360@student.uq.edu.au>
X-Authentication-Warning: student.uq.edu.au: s100962@localhost [127.0.0.1] didn't use HELO protocol
To: linux-mips@fnet.fr
X-Url: http://lena.fnet.fr/
X-Mailer: Lynx, Version 2.5
X-Personal_Name: Andrew Noonan
Subject: Mail list for Linux Mips
Date: Mon, 09 Dec 96 12:54:05 +1000
Sender: s100962@student.uq.edu.au
X-Mts: smtp
Content-Length: 92
Lines: 5

Hi ,
	Can you give me directions to subscribe to the linux mips mail 
list please ?

Andrew

From imp@village.org  Mon Dec  9 16:50:21 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id QAA19500 for <linux-mips@guadalquivir.fnet.fr>; Mon, 9 Dec 1996 16:50:20 +0100 (MET)
Received: from rover.village.org by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA25121; Mon, 9 Dec 1996 16:49:43 +0100 (MET)
Received: from rover.village.org [127.0.0.1] 
	by rover.village.org with esmtp (Exim 0.56 #1)
	id E0vX7y8-00060d-00; Mon, 9 Dec 1996 08:50:12 -0700
To: linux-mips@fnet.fr
Subject: Linux/SGI
Date: Mon, 09 Dec 1996 08:50:12 -0700
From: Warner Losh <imp@village.org>
Message-Id: <E0vX7y8-00060d-00@rover.village.org>
Content-Length: 213
Lines: 5

I have a line on an SGI machine and that reminded me that I haven't
heard anything about Linux/SGI in a long time, other than some rumor
that it could never be released.  What's the status of the project?

Warner

From ralf@Julia.DE  Sat Dec 14 04:10:28 1996
Received: from Utopia.EUnet.fr (ns.fnet.fr [192.134.192.2]) by guadalquivir.fnet.fr (8.8.4/8.7.3) with SMTP id EAA15419 for <linux-mips@guadalquivir.fnet.fr>; Sat, 14 Dec 1996 04:10:26 +0100 (MET)
Received: from alles.intern.julia.de (loehnberg1.core.julia.de) by Utopia.EUnet.fr (5.65c8d/AFUU-4.2.3)
	via EUnet-France id AA04046; Sat, 14 Dec 1996 04:09:45 +0100 (MET)
Received: from kernel.panic.julia.de (kernel.panic.julia.de [194.221.49.153])
          by alles.intern.julia.de (8.8.4/8.8.4) with ESMTP
	  id DAA23093; Sat, 14 Dec 1996 03:58:06 +0100
From: Ralf Baechle <ralf@Julia.DE>
Received: (from ralf@localhost)
          by kernel.panic.julia.de (8.8.4/8.8.4)
	  id EAA16172; Sat, 14 Dec 1996 04:08:21 +0100
Message-Id: <199612140308.EAA16172@kernel.panic.julia.de>
Subject: Re: Linux/MIPS on SimOS
To: bugnion@cs.stanford.edu
Date: Sat, 14 Dec 1996 04:08:21 +0100 (MET)
Cc: linux-mips@fnet.fr
In-Reply-To: <199612132331.PAA20676@alliant> from "Edouard Bugnion" at Dec 14, 96 00:51:11 am
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 5518
Lines: 143

Hello,

> At Stanford, we developed a complete machine simulator called SimOS
> (http://www-flash.stanford.edu/SimOS) which simulates the hardware of a
> MIPS-based uniprocessor and multiprocessor in enough detail to boot
> an essentially unmodified version of IRIX, SGI's commercial OS. 
> SimOS has been released publicly a couple of months ago. 
> 
> We are in the process of porting Linux/MIPS to SimOS. The motivation
> is that we will then be able to release a free OS in source form to
> the research community along with the sources of SimOS. 
> 
> Our experience with IRIX is that the porting effort is pretty
> simple. Basically, we add device drivers that are compatible with the 
> devices modelled by SimOS for disks, tty, ethernet,... 
> 
> We have started our porting effort, starting from your source
> base. Our first configuration will be targeting:
> 
>   -the R4x00 processor
>   -running in 32-bit mode (-mips2)

You should have choosen mips3.  The mips2 stuff is intended to support the
R6000/R6000A CPUs which are very rare.

>   -big endian. 

All systems supported in my source tree are little endian.

> In the future, we will be looking at 64 bit support.

Me too :-)  The binutils support for 64 bit MIPS binaries is still very
buggy.  Someone is working on that problem currently.

> We have a few questions:

> (1) what is the state of Linux/MIPS on this configuration. For example,
>     we had problems compiling for the mips2 version as the r4x00.S file
>     was missing (the file that does the tlb handling). Does this mean
>     that no one has actually run in this mode?

You should have choosen mips3.  As already said above the mips2 stuff is
intended for the R6000/R6000A CPUs.

> (2) Our version was downloaded from the web a few weeks ago. Is there a
>     more recent version that we should be aware of? 

On my disk at home.  Much faster, more reliable and cleaner and to be
released rsn (TM).

> (3) Since we are running big-endian, we will need to recompile all
>     executables. Do you have a complete source tree of the basic
>     user-level programs that run on Linux. Would you aggree to give us
>     this source tree?

Of course.  Most of the tools I'm currently running a vanilla GNU
software packages with no changes.  For others like GCC and the binutils
changes are required.  These diff files are available on ftp.fnet.fr.

> (4) We will also need to build the image of the root disk (and other
>     filesystems) for one of the file systems supported by Linux. Do  
>     you have a tool that makes a filesystem? Does this tool generate
>     empty filesystems, or can it also build a filesystem and insert 
>     files in the hierarchy? Would you aggree to give this tool in
>     source form to us?  We will most likely have to modify it slightly
>     to target a file.

You can also use Linux's fsck and mkfs tools for the ext2 filesystem on
disk images:

kernel->~/ip> dd if=/dev/zero of=fs bs=1k count=2048
2048+0 records in
2048+0 records out
kernel->~/ip> ll fs
-rw-r--r--   1 ralf     users     2097152 Dec 14 03:18 fs
kernel->~/ip> /sbin/mke2fs fs 
mke2fs 1.06, 7-Oct-96 for EXT2 FS 0.5b, 95/08/09
fs is not a block special device.
Proceed anyway? (y,n) y
Linux ext2 filesystem format
Filesystem label=
512 inodes, 2048 blocks
102 blocks (4.98%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
1 block group
8192 blocks per group, 8192 fragments per group
512 inodes per group

Writing inode tables: done     
Writing superblocks and filesystem accounting information: done
kernel->~/ip> /sbin/e2fsck -f fs 
e2fsck 1.06, 7-Oct-96 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
fs: 11/512 files (0.0% non-contiguous), 82/2048 blocks
kernel->~/ip> 

As you see there is no problem at all - mke2fs just asks stupid questions.
Unfortunately there is no set of mtool style tools available for ext2fs
filesystems and running on UNIX.  You might write these based on the
libraries included with the ext2 utility package.

It is however far preferable to fix this problem the other way.  Get yourself
a Sparc (big endian) Linux source tree and look at the way how they
implemented to handle ext2fs filesystems with little endian byteorder,
then implement that for Linux/MIPS.  You can then create filesystem
ext2 images on a Intel Linux machine and simply use them.

My two MIPS machines are little endian, so be prepared to find byte order
bugs ...

> Could you please add the follwing e-mails to the developers mailing
> list: {bugnion,herrod,seamans}@cs.stanford.edu

Ok.

> Please let us know if you are interested in using SimOS too. We would
> be glad to help you setup with it. Our experience is that it is a
> great tool to develop and evaluate OSes.

Nice of you to borrow me an appropriate machine ;-)

> Merci d'avance. -Edouard Bugnion
> 
> PS: Simple curiosite: dans quel cadre se fait le development de

Le cadre, c'est moi :-(

Ok, French is a nice language and so I'll stick with English ...

> Linux-MIPS. Votre page http://lean.fnet.fr ne contient pas de links 
> exterieurs, ni de links vers vos page personelles.

Due to the current degree of information abuse I don't have a home page
and I won't build myself one.  Well, maybe on the day when all the
moneyworld.com type people are in Sing-sing ...

  Ralf

