Welcome, Guest. Please login or register.

Author Topic: UAE w/mmu patch...any success compiling?  (Read 2852 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show only replies by Failure
    • http://awhitlock.net/
UAE w/mmu patch...any success compiling?
« on: August 02, 2004, 02:45:37 AM »
I discovered that there is a patch to emulate an mmu for UAE 0.8.20.  It's linked right from the main page:

http://www.freiburg.linux.de/~uae/bin/patches/mmu/uae-0.8.20.2-mmu.diff.gz

Has anybody ever gotten this to compile?  I haven't had any luck with it so far.  So far I have only tried on Debian unstable on x86, with a variety of ./configure options.

I'd like to try and use this to create an emulated Amiga running Amix, to speed compiling stuff.  Otherwise, I mean, I'll just wait on the 3000 to compile it but...even without JIT, UAE should blow the 3000 away.
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show only replies by Failure
    • http://awhitlock.net/
Re: UAE w/mmu patch...any success compiling?
« Reply #1 on: August 02, 2004, 03:06:46 AM »
Well answered my own question.  It doesn't like gcc 3.x.x.  Compiled fine with 2.95.

Now to see if it will run anything that needs an mmu.
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: UAE w/mmu patch...any success compiling?
« Reply #2 on: August 02, 2004, 03:35:19 AM »
Just curious: Ever heard of cross-compiling?

[EDIT]Though it might be tricky to cross-compile for AMIX... :-)[/EDIT]

The MMU emulation must be really slow btw. Could be slower than the real A3000...
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show only replies by Failure
    • http://awhitlock.net/
Re: UAE w/mmu patch...any success compiling?
« Reply #3 on: August 02, 2004, 02:18:08 PM »
Yes, I would love to cross-compile so I can run gcc native, but as you said it is "tricky" for Amix ;-)

The MMU emulation seems to be for 040, which makes it useless for Amix but possibly useful for Linux and other stuff that runs on 040.  Isn't one of the major differences between 030 and 040 the way that the MMU behaves?  This is from memory so I might be dead wrong.  Also there are no docs with the MMU patch, I am making a best guess from reading the patch source code.

If I have time today I'm going to tell it to enable the MMU emulation for the 68020 + FPU combo (requires a source code change) and recompile.  I doubt it will work but hey, I'm always interested in seeing new and improved ways of crashing a system!  Even if it's just emulated.

*edit* argh I keep saying 030 when I mean 020...020 runs Amix too
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: UAE w/mmu patch...any success compiling?
« Reply #4 on: August 02, 2004, 02:30:52 PM »
I dimly recall that a major difference between the 68040 and 68030 MMU is that the 68040 can only handle two page sizes (4 and 8 KB), while the 68030 is much more versatile with around eight or ten. The instruction set to handle the MMU is, from what I remember, more or less the same. Someone with better memory and access to Motorola reference manuals can probably explain things a lot better.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show only replies by Failure
    • http://awhitlock.net/
Re: UAE w/mmu patch...any success compiling?
« Reply #5 on: August 02, 2004, 08:56:38 PM »
Well as expected, forcing the 68020 to use the MMU had nifty results:

Building CPU table for configuration: 68020/881
1866 CPU functions
Building CPU function table (3 0 0).
Using 24 bit visual, 32 bits per pixel
Using normal image buffer.
Resetting frame rate hack
M68K: RESET!
MMU: enabled=1 page=0
MMU: invalid root descriptor for f800d2
MMU: table search for logical=00f800d2 FC=1 ri=00 pi=3e pgi=000 page_frame=00f80000 root_ptr=00000000
MMU: root_des_addr = 0  val=00000000
MMU: ptr_des_addr = 0  val=00000000
MMU: page_des_addr = 0  val=00000000

**SNIP!**

BUS ERROR: fc=1 w=0 log=00f800d2 ssw=0501 fslw=01001040
Exception 2!!

**SNIP!  Lots of fun crash stuff...**

BUS ERROR: fc=5 w=0 log=00000008 ssw=0505 fslw=01001040
HALT: Double Bus Error means bad news!
Internal error; file newcpu.c, line 749
Aborted
failure@kos-mos:~/uae-0.8.20$



Oh well.  This is the system not even coming up, so I can't really go any further from here.  Bummer.
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: UAE w/mmu patch...any success compiling?
« Reply #6 on: August 02, 2004, 10:56:49 PM »
Quote
The instruction set to handle the MMU is, from what I remember, more or less the same.

Unfortunately not so. 68030 and 68040 use different supervisor instructions to access registers, (some) different supervisor registers and the register bit mappings are different, as well as page descriptors.

68030 MMU indeed supports more pagesizes, and in general is more flexible. I guess the MMU design was simplefied for 68040 to gain speed and reduce complexity.

68040 and 68060 MMUs are almost identical, 68060 just adding some more restrictions on cacheability of mmu tables and renaming few cachemodes. MMU exception processing is different on 68060, too.
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: UAE w/mmu patch...any success compiling?
« Reply #7 on: August 02, 2004, 11:01:41 PM »
Quote
Piru wrote:
Unfortunately not so. 68030 and 68040 use different supervisor instructions to access registers, (some) different supervisor registers and the register bit mappings are different, as well as page descriptors.

Ick. MMUs were never my strong point, I simply didn't understand what they were doing. And when I did, I knew I didn't want to get involved with them too much. Thanks for the info.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline FailureTopic starter

  • Lifetime Member
  • Sr. Member
  • ****
  • Join Date: Jun 2004
  • Posts: 332
    • Show only replies by Failure
    • http://awhitlock.net/
Re: UAE w/mmu patch...any success compiling?
« Reply #8 on: August 02, 2004, 11:19:38 PM »
From going through the patch, the emulated MMU only supports 4K and 8K pages :-/
You can\'t spell evil without "vi"
AMIX Wiki | AmixBP