Port-atari archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 68030 CPU cache



Thanks a lot for the detailed explanation!

David Ross
dross%pobox.com@localhost


----- Original Message ----- From: "Ignatios Souvatzis" <is%netbsd.org@localhost>
To: <port-atari%netbsd.org@localhost>; <port-amiga%netbsd.org@localhost>
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



Home | Main Index | Thread Index | Old Index