TurboMMU040+ released!

SpeedGeek

Member
AmiBayer
Joined
Jan 21, 2011
Posts
934
Country
USA
Region
Wisconsin
[FONT=Arial,Helvetica]TurboMMU040+ 1.0 ©SpeedGeek 2018

INTRODUCTION:
TurboMMU040+ is an MMU tool to maximize the MMU performance of
most* 68040 and 68060 libraries. The MMU is a most excellent
and valuable feature of advanced 68K CPUs. Unfortunately, it's
usage does not come without any performance loss. How much
performance is lost depends on many factors, but this tool
deals specifically with the MMU configuration factors.

FEATURES:
- Enables 8K page mode MMU operation!
- Converts existing 4K page tables to 8K page tables
- Does NOT increase memory usage for MMU tables
- Enables (optional) ITTx management for 32GB of address
space!
- Uses 68040/060 library detection code
- 100% Assembler code

REQUIREMENTS:
- Amiga with 68040 or 68060 CPU and MMU
- 68040.library or 68060.library

PERFORMANCE AND TECHNICAL ISSUES:
The 8K page size provides a 2x increase in the address space
which resides in the ATC. When a page address "Hits" in the
ATC it provides a "Zero" wait state address translation.
When a page address "Misses" in the ATC the MMU performs a
table search in memory to find the page address. Hence, many
wait states are incurred which result in a performance loss.
Both the 68040 and 68060 have a 64 entry ATC so 64 x 4K = 256K
and 64 x 8K = 512K.

The ITTx registers manage the instruction page descriptors
for a 16MB - 32GB size of address space. They are typically
disabled but may be enabled for part of the address space by a
few libraries. TurboMMU040 optionally enables it for the full
32GB of address space. This effectively bypasses the MMU
and provides "Zero" wait state performance for all instruction
translations. The ITTx usage trade off is the loss of the of
the performance benefit (if any) from remapping the Kickstart
ROM(s) into Fast memory. Also, if the library has already
enabled the ITTx you may want to keep the default settings.

WARNINGS:
Failure to disable or unmap MMU remapped Kickstart ROM(s)
will result in a loss of memory which can NOT be reclaimed
after conversion to 8K pages (YOU HAVE BEEN WARNED!).

Attempted usage of this tool with existing 4K MMU tools is
VERY risky! Some tools will check the page size and safely
exit, but others will just assume the page size is correct
and proceed to crash your system! Likewise, libraries which
have a built in API (e.g. Phase 5) should be used with
caution.

This tool does NOT always provide an identical memory map to
the original. Specific cases when mapping will change are:

1) MMU remapping of the Zero page area is disabled.
2) SRP table differs from URP table (URP table replaces SRP
table).
3) The Kickstart MMU remap warnings have been ignored (All
physical ROM addresses are restored).

*Compatibility support for most 68040 and 68060 libraries does
NOT mean all of them!

NOTES:
The executable file name excludes the "+" character to avoid
problems with the Amiga Shell. See TurboMMUtools.txt for info
on the initial support tools.

HISTORY:
v1.0 - First release

Here is the link:

http://eab.abime.net/showthread.php?p=128823
[/FONT]
 
** NEWS UPDATE **

TurboMMU040+ 1.1 released

v1.1 - Added code to keep the Zero page remapping if it meets
the 8K alignment requirement (So you got a 50/50 chance)

EDIT:
Joe Regulars (TM) kolla require a benchmark tool to convince themselves anything is worthwhile. So TurboMMUbench 1.1 has been released! See image in post #1.
 
Last edited:
* 2ND NEWS UPDATE **

TurboMMU040+ 1.2 released.

v1.2 - Added code to compare Page table address at 8K blocks
vs. 4K blocks. This might improve indirect mapping accuracy only since direct mapping is always converted to the physical address.
 
** 3RD NEWS UPDATE **

TurboMMUtools 1.1 released

- 1.1 Added RemapZero 1.0
 
This sounds very cool. In what software have you noticed this make a tangible difference?
 
All software including the OS will have a tangible benefit. But large memory hungry apps (e.g. web browsers) will benefit the most. ;)
 
** 4TH NEWS UPDATE **

TurboMMU040+ 1.3 released.

v1.3 - Updated code to allow indirect mapping of the "Extended"
Zero page area. Added NOITTx option so the libraries default ITTx
settings can be maintained.
 
All software including the OS will have a tangible benefit. But large memory hungry apps (e.g. web browsers) will benefit the most. ;)

Great! Will try to get a feel for before and after :cool:
 
** 5TH NEWS UPDATE **

UPDATE:
Added MapConTM060 1.0 to archive. MapConTM060 supports the
very proprietary TekMagic 68060.library. See MapConTM060.txt
for more info.

TurboMMUtools 1.2 released.

- 1.2 TurboRom040+ 1.4 released

EDIT:
************************************************************
Systems configured with a DMA driver MUST install
FastCache040+ before using this tool! Otherwise, the
CachePreDMA/PostDMA API of the 68040/060 library will assume
the 4K page size and fail to modify the correct pages
resulting in eventual data transfer errors!
************************************************************
 
Last edited:
** 6TH NEWS UPDATE **

TurboMMU040+ 1.4 released.

v1.4 - Added code to detect and report FastCache040+ as a
helpful reminder.

EDIT: TurboMMU040+ 1.4 and TurboMMUtools 1.2 archives have slightly smaller executable(s) as this (edit) update.
 
Last edited:
** 7TH NEWS UPDATE **

TurboMMU040+ 1.5 released.

v1.5 - Added code to keep direct remapping of $FFFF8000 space for libraries which don't use indirect. Lha_68K gets a psuedo Enforcer hit for relying on MMU remapping here

EDIT:
TurboMMUtools 1.3 released.

-1.3 RemapZero 1.1 released
 
Last edited:
** COMMENT UPDATE **

Now here is the real Enforcer hit:

New Shell process 3
3.System3.9:> version c:lha
LhA 2.15 68040+ Jan 3 2011

BYTE-READ from FFFFFFFF PC: 07184298
USP: 07116668 SR: 0004 SW: 0121 (U0)(-)(-) TCB: 07159660
Data: 00000000 00000000 00000001 07100000 00000000 00000005 0711669C 00030057
Addr: 00000001 071166F3 00000000 FFFFFFFF 07105D6C 0711689C 071069F8 --------
Stck: 0003A046 072301A8 00000000 071168F0 00000002 0003A0D3 00000000 00000000
Stck: 071882D3 00000001 00000000 00000000 00005702 57002D6C 68642D00 00000000
Name: "Shell Process" CLI: "lha" Hunk 0000 Offset 000063C8

As you can see, it's from the latest Lha 2.15 from Aminet. But this post is NOT made to complain about typical Software bugs. It's about the questionable policy of relying on the MMU to keep buggy Software working.

If the bugs don't get reported to the developer the bugs can't be fixed. Eventually, most Software becomes "Abandonware" and the bugs never will be fixed! But what if you want to use the Software and you only have a stock A500 (68000), stock A1200 (68020) or an accelerator card with a EC030, EC040, EC060? :roll:
 
Feedback:

Docs folder in the archive, TurboMMU040+.txt has a reference under 2MB ROM Usage: to 'See ConfigROMA8 (REQUIRED!) and included - but not included.

Document is headlined "MapRom040+ 1.4"

There are other notes of inclusions that are not in the archive (anymore?)

Full boot, 68060.library 2.3 (Babel) with Kickstart remap enabled. OS is 3.1.4. TekMagic 060/A4000T (ultrasound). 64MB on card, 16MB on mobo.

MuForce / MUGA enabled.

MapConTM060 called (success)
TurboMMU040 called (v1.5, 8K Page mode Enabled, warning that FastCache040+ not NOT Detected)
TurboMMU040 called (assume unmap based on docs) - I get a MuGA hit on a memory cookie - I'll post it here shortly from the laptop I use as a terminal.

Crap - And now input device spawns continuous hits after clicking and scrolled the hit off the buffer. Trying to reproduce, but not yet.

After a fresh reboot, not getting the stomped cookie now, but...
Calling the TurboMMU040 a second time to disable is not giving me a disable message. I get the same message (8K page mode enabled).

Edit/Variation
Added the FastCache040 after MapConTM060, TurboMMU040 recognized it, but still no disable message when it is run a second time. No enforcer/cookie hit, either.

Note: TurboMMUBench values change between running of the TurboMMU Command - assuming it's just an output message logic error.

TurboMMUBench:
Elapsed time values between toggle of TurboMMU command (no MuForce/MuGA running):
Base: 385565
MapConTM060:386758
FastCache040:394294
TurboMMU040:172549

Elapsed time values between toggle of TurboMMU command (MuForce/MuGA running):
Base: 394086
MapConTM060:392213
FastCache040:396194
TurboMMU040:168084

Edit: After enabling MuForce/MuGA, and then turning on the above 3, the system is generating (after sitting idle about 15 minutes) repeated hits on the debug from just the DIR command being called. I am guessing the MMU tool warning in the documentation applies here? Further Edit: Saw the EAB post/reply for 1/1/2019. Noted. Disable message still applies.
 
Last edited:
The MapRom040+ files can be found in the MapRom040+ archive so they were not included (for reasons of redundancy) in the TurboMMUtools archive.

MuForce is an almost certainly a 4K MMU tool which will cause problems with TurboMMU040+. Also, you need to install FastCache040+ BEFORE you install TurboMMU040+. See the TurboMMU040+ WARNINGS.

The EAB thread now contains a detailed explanation of why the mmu.library is not supported by TurboMMU040+. I never understood how most* 68040 and 68060 libraries = mmu.library to some users...:picard
 
Last edited:
** 8TH NEWS UPDATE **

TurboMMU040+ 1.6 released.

v1.6 - Added code to disable the DTTx registers. This is a quick fix to support the very proprietary Apollo 68060.library. Apollo gets away with the default DTTx enable only because the SCSI controller doesn't use DMA.
 
** 9TH NEWS UPDATE **

TurboMMU040+ 1.7 released.

v1.7 - Fixed typo bug for ITTx options. Now shows 4GB size.
 
I owed you a test.




TurboMMUbench 1.1 ©SpeedGeek 2018
---------------------------------
512KB Public memory reads.: 5000
Elapsed time Microseconds.: 320347

TurboMMU040+ 1.7 ©SpeedGeek 2019
8K page mode enabled!
FastCache040+ detected!

(Latest posted versions enabled)

TurboMMUbench 1.1 ©SpeedGeek 2018
---------------------------------
512KB Public memory reads.: 5000
Elapsed time Microseconds.: 157880

And for a performance reference on the system's 32-bit memory:

Babel 68060.library 2.3, FastROM Remap, TekMagic 2060 68060/66 32MB RAM, burst memory setting enabled, copyback, Rev 6 CPU

BusSpeedTest 0.19 (mlelstv) Buffer: 262144 Bytes, Alignment: 32768
========================================================================
memtype addr op cycle calib bandwidth
fast $040F8000 readw 43.6 ns normal 45.9 * 10^6 byte/s
fast $040F8000 readl 72.6 ns normal 55.1 * 10^6 byte/s
fast $040F8000 readm 73.6 ns normal 54.3 * 10^6 byte/s
fast $040F8000 writew 44.3 ns normal 45.2 * 10^6 byte/s
fast $040F8000 writel 87.5 ns normal 45.7 * 10^6 byte/s
fast $040F8000 writem 87.8 ns normal 45.6 * 10^6 byte/s
 
** 10TH NEWS UPDATE **

- TurboMMUtools 1.4 released!
- TurboMMU040+ FAQ 1.0 released!
 
** 11TH NEWS UPDATE **

TurboMMU040+ 1.8 released!
TurboMMUtools 1.5 released!

- Added code to disable Zero page remapping when the Chip RAM start addr is not remap compatible. Otherwise, OS3.1 systems in particular could crash if the Zero page was remapped.
 
Back
Top Bottom