Re: 68030 CPU cache

"David Ross" <[email protected]> Wed, 21 Jan 2009 21:55:53 -0800
Newsgroups gmane.os.netbsd.ports.atari,gmane.os.netbsd.ports.amiga
Message-ID <[email protected]>
Thanks a lot for the detailed explanation!

David Ross
[email protected]


----- Original Message ----- 
From: "Ignatios Souvatzis" <[email protected]>
To: <[email protected]>; <[email protected]>
Sent: Tuesday, January 20, 2009 11:33 PM
Subject: Re: 68030 CPU cache


> On Tue, Jan 20, 2009 at 10:54:02PM -0800, David Ross wrote:
>> Random question...
>> In the Atari OS (TOS) for the TT030 there's a way to view/set the state 
>> of the 68030 cache.  I've been curious to find out if the CPU cache is 
>> enabled when I'm in NetBSD.  Anyone know, or know a quick way to to get 
>> the info at runtime w/o learning 68030 assembler?  =)
> 
> You can't - but it is. Details: it is selectively enabled via the
> MMU for main memory during early boot time. Lines about 1013 and
> following in sys/arch/atari/atari/locore.s:
> 
> ... movl #CACHE_ON,%d0 ;valid for '020/'030
> cmpl #MMU_68040,_C_LABEL(mmutype)
> jne Lcacheon
> [68040 and 68060 code here]
> 
> Lcacheon:
> movc %d0,%cacr
> 
> (The cache control register is priviledged-code-only, you can't even
> read it from user code, that's why you can't easily check it.)
> 
> The MMU tables are set in a way that memory regions are using the
> cache. Device registers, of course, are mapped uncached.
> 
> -is
>