Subject: MIPS3_FLUSH error message
To: None <port-pmax@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: port-mips
Date: 10/04/1998 19:51:32
I just tried to build a GENERIC kernel from the weekend -current
tarballs and came across a problem with the new mips_L2CachePresent
check in mips/mips/mips_machdep.c.  I got the following error when I
booted my /240:

	cpu0 at mainbus0: MIPS R3000 CPU Rev. 3.0 with MIPS R3010 FPC Rev. 4.0
		L1 cache: 64kb/0b Instruction, 64kb/0b Data. Direct mapped.
		No L2 cache.
	This kernel doesn't work without L2 cache.
	Please add "options MIPS3_FLUSH"to the kernel config file.
	halted.

The R3000 is only a MIPS1 CPU, however the check for mips_L2CachePresent
is in a section of code that is "#ifdef MIPS3", but not checking if we
are on a MIPS3-type CPU.  It looks like I can just add an options line
to the kernel config, but I think the test should be changed as well.
One thing that's not clear is if the check L2 cache check is only for
MIPS3 CPUs or all CPUs.  If it's for all CPUs, then the option to fix
it should not start with MIPS3_.

Whatever the correct solution is, I believe I should be able to build a
GENERIC kernel and boot it on any machine...


Also, should the cache line sizes not be printed out if they are not
known?  I think

	L1 cache: 64kb Instruction, 64kb Data. Direct mapped.

would look better than

	L1 cache: 64kb/0b Instruction, 64kb/0b Data. Direct mapped.

Hmm, maybe even:

	L1 cache: Direct mapped 64kb Instruction, 64kb Data.

would read better....

Simon.
(Hmm, I probably should send-pr this - I will tomorrow if no solutions
to this problem com in overnight.)