Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Disabling 68030 PMMU + caches
Posted by: Klaz Feb,07.2012-10:55 

Hi guys,

having a question for those of you knowledgable with the PMMU in the 68030 CPU.

Basic problem I have is:
I want to disable the PMMU (especially for getting rid of protected memory), while at the same time keeping the CPU data and instruction caches working.
Alas, the system gets unstable when I try to do this.
It works perfectly when I have the CPU data and instruction caches off.

Here's the code I use:

lea tc_buf(pc),a0 * disable PMMU on 68030:
pmove.l tc,(a0) * get current tc status
and.l #$7fffffff,(a0) * clear PMMU enable bit
pmove.l (a0),tc * write it back
pflusha * flush ATC cache
nop
bsr flush_caches * flush data and instruction caches

From reading (but not 100% understanding) the Motorola user manual for the 68030, I realize that PMMU and CPU caches are quite closely tied, so I suspect I must have overlooked something here.

I case you wonder why I would want to do this: it's for running ST games in an ULS-like shell. Game code has to be copied down to low physical addresses that might be protected in Mint, for example.
As I said, the code is working fine and reliably in general, just not with CPU caches active.

TIA

Klaz









[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Disabling 68030 PMMU + caches Klaz Feb,07.2012-10:55
  Re: Disabling 68030 PMMU + caches mikro Feb,07.2012-17:52
    Re: Disabling 68030 PMMU + caches Klaz Feb,07.2012-18:27
      Re: Disabling 68030 PMMU + caches ggn Feb,07.2012-19:28
        Re: Disabling 68030 PMMU + caches Klaz Feb,08.2012-09:35
          Re: Disabling 68030 PMMU + caches ggn Feb,09.2012-19:22
      Re: Disabling 68030 PMMU + caches mikro Feb,08.2012-12:08
        Re: Disabling 68030 PMMU + caches Klaz Feb,08.2012-13:44
          Re: Disabling 68030 PMMU + caches mikro Feb,08.2012-17:23
  Re: Disabling 68030 PMMU + caches Klaz Feb,09.2012-09:17
    Re: Disabling 68030 PMMU + caches sqward Feb,09.2012-16:01
      Re: Disabling 68030 PMMU + caches Klaz Feb,09.2012-16:37
      Re: Disabling 68030 PMMU + caches mikro Feb,10.2012-10:31


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson