Subject: Re: Fixed! And some questions (Was Re: R5K L2 Cache problem again)
To: Rafal Boni <rafal@mediaone.net>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: port-sgimips
Date: 12/18/2001 07:05:28
Hi Rafal,

> In message <200112180249.fBI2nKX09187@mrynet.com>, you write: 
> 
> -> OK, I've found a hack I was missing to get the current kernel sources
> -> to build a working kernel for the R5K.  Here are the patches that allow
> -> the kernel to work on both the R4400 and the R5K:
> [...]
> -> --- /usr/src/sys/arch/sgimips/sgimips/cpu.c.orig        Mon Dec 17 19:58:04 
> -> 2001
> -> +++ /usr/src/sys/arch/sgimips/sgimips/cpu.c     Mon Dec 17 20:06:08 2001
> -> @@ -71,8 +71,10 @@
> ->         case COMPONENT_TYPE_SecondaryDCache:
> ->         case COMPONENT_TYPE_SecondaryCache:
> ->                 mips_sdcache_size = COMPONENT_KEY_Cache_CacheSize(comp->Key)
> -> ;
> -> +#ifdef NOTYET
> ->                 mips_sdcache_line_size =
> ->                     COMPONENT_KEY_Cache_LineSize(comp->Key);
> -> +#endif
> ->                 /* XXX */
> ->                 mips_sdcache_ways = 1;
> ->                 break;
> -> 
> -> I'm about to release on my site a snapshot with installation
> -> images for bootp, netboot/NFS and bootable CDrom.  I'll be 
> -> using the above patches for the kernels distributed.
> -> 
> -> Now the questions:
> -> 
> -> o	Can anyone tell me what the ramifications of running this
> -> 	mod on the R4400 are?  I see it disabling the L2 Cache on the
> -> 	R5000, but I'm not sure what the second patch affects--does
> -> 	running such a kernel on the R4400 affect performance?
> 
> I think the second change is safe as the R4400 sets the cache line size
> in the generic MIPS cache detection code from the config register.  I'd
> say we want to pull out the setting above until the R4600/R5000 caches
> work, as it'll have the expected effect of disabling L2 on those machines
> and not on the R4k ones.
> 
> That said, (and I'm not looking at the code right now, so I may be off),
> I think the second patch also obsoletes the first (it forces line size
> to zero, which should fall into the "disabling SysAD cache" code).

OK.  Since rolling this stuff out takes so long, I'm going to leave
both patches in the kernels being built.  I'm trying furiously to get
the release snapshot out as-we-speak.  Gotta see what's broken next :)

> -> o	The elf 'boot' program is necessary on the R4400 and R5000
> -> 	machines I have here.  What machines require the ecoff boot
> -> 	block?
> 
> Older I2's certainly do (my I2 won't boot ELF).
> 
> -> o	My R4400 and R5000 require the elf kernel as well.  What
> -> 	machines require the ecoff kernel?
> 
> The same machine as above, assuming you want to net-boot them.  If the
> booter will always be loading the kernel, then we can get away with no
> ECOFF kernel.

I'm distributing the CD image now with both boot and boot.elf, as well as
the ecoff install kernel for bootp.

I'm not going to build ecoff for other kernels loaded by boot so we'll
see how the logistics work out.

Expect mail after a few hours indicating the release readiness.

Cheers,
-scott