Re: 68030 CPU cache
Ignatios Souvatzis <[email protected]> Wed, 21 Jan 2009 08:33:22 +0100
| Newsgroups | gmane.os.netbsd.ports.amiga,gmane.os.netbsd.ports.atari |
|---|---|
| Message-ID | <[email protected]> |
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