English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 01 December 2018, 15:19   #1
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
Lightbulb TurboMMU040+ released!

TurboMMU040+ 1.7 ©SpeedGeek 2019

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 4GB 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 - 4GB 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
4GB 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:
*************************************************
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!
*************************************************

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 4K aligned (MMU
remapping 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.

UPDATE:
Added MapConTM060 1.0 to archive. MapConTM060 supports the
very proprietary TekMagic 68060.library. See MapConTM060.txt
for more info. Since v1.5 TurboMMU040+ allocates 16KB of RAM
to handle the (few) libraries which use 4K aligned remapping
of the $FFFF8000 space.

HISTORY:
v1.0 - First release
v1.1 - Added code to keep the Zero page remapping if it meets
the 8K alignment requirement (So you got a 50/50 chance)
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.
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.
v1.4 - Added code to detect and report FastCache040+ as a
helpful reminder.
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.
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.
v1.7 - Fixed typo bug for ITTx options. Now shows 4GB size.
Attached Thumbnails
Click image for larger version

Name:	TURBOMMU040+.PNG
Views:	164
Size:	9.4 KB
ID:	61024   Click image for larger version

Name:	TURBOMMUBENCH.PNG
Views:	102
Size:	10.2 KB
ID:	61066  
Attached Files
File Type: lha TURBOMMUBENCH11.LHA (1.8 KB, 56 views)
File Type: lha TURBOMMUTOOLS13.LHA (4.3 KB, 28 views)
File Type: lha TURBOMMU040+17.LHA (4.6 KB, 9 views)

Last edited by SpeedGeek; 08 February 2019 at 15:56.
SpeedGeek is offline  
Old 03 December 2018, 15:40   #2
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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 by SpeedGeek; 03 December 2018 at 23:48.
SpeedGeek is offline  
Old 04 December 2018, 19:36   #3
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
* 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.
SpeedGeek is offline  
Old 05 December 2018, 16:02   #4
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 3RD NEWS UPDATE **

TurboMMUtools 1.1 released

- 1.1 Added RemapZero 1.0
SpeedGeek is offline  
Old 09 December 2018, 02:00   #5
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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.
SpeedGeek is offline  
Old 16 December 2018, 23:03   #6
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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 by SpeedGeek; 18 December 2018 at 02:19.
SpeedGeek is offline  
Old 17 December 2018, 00:41   #7
trixster
Guru Meditating

 
Join Date: Jun 2014
Location: England
Posts: 1,251
Thanks for this! I will try it this week
trixster is offline  
Old 19 December 2018, 20:33   #8
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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 by SpeedGeek; 20 December 2018 at 20:48.
SpeedGeek is offline  
Old 29 December 2018, 14:43   #9
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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 by SpeedGeek; 29 December 2018 at 16:53.
SpeedGeek is offline  
Old 31 December 2018, 16:24   #10
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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?
SpeedGeek is offline  
Old 01 January 2019, 14:30   #11
MartinW
Registered User

 
Join Date: Mar 2017
Location: United Kingdom
Posts: 301
Question (possibly a noob one!): How does this sit with Thors 680x0 libraries? Can it be used with it? Is it used instead of (I assume not)? If it is / can be used is there any guide as to specific things that you must or must not do within Thors libs package?

Apologies if this is obvious stuff. I'm pretty technical but admit to not really knowing what I'm doing when it comes to CPUs and MMU etc.

I have a 68060 (GBA) with 8MB sram + 128MB sdram configured in 32bit address space on boot via flash boot rom. The mmu config file is used to set the various modes of the boot rom (F00000), the Kickstart ROM (F80000) and the 32bit memory.

I don't recall offhand if I use any of the mutools that come with the library.
MartinW is offline  
Old 01 January 2019, 16:28   #12
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
Quote:
Originally Posted by MartinW View Post
Question (possibly a noob one!): How does this sit with Thors 680x0 libraries? Can it be used with it? Is it used instead of (I assume not)? If it is / can be used is there any guide as to specific things that you must or must not do within Thors libs package?

Apologies if this is obvious stuff. I'm pretty technical but admit to not really knowing what I'm doing when it comes to CPUs and MMU etc.

I have a 68060 (GBA) with 8MB sram + 128MB sdram configured in 32bit address space on boot via flash boot rom. The mmu config file is used to set the various modes of the boot rom (F00000), the Kickstart ROM (F80000) and the 32bit memory.

I don't recall offhand if I use any of the mutools that come with the library.
The mmu.library does not qualify as most 68040/060 libraries. While it may be a functional substitute for some of them it will not function exactly the same as the libraries it replaces. So TurboMMU040+ does not "Sit" with the mmu.library for quite a number of reasons:

1) There absolutely no compatibility testing or support
2) The MMU config and table set up is expected to differ considerably from the libraries this tool supports
3) There is a much larger API (with 4K dependency issues) than the P5 libraries which are supported with some caution.
4) Many systems are configured with a DMA driver which requires the use of FastCache040+. Since FastCache040+ does NOT support virtual memory it was never recommended for and does NOT support the mmu.library

Sorry, you can't use this tool to replace a library. A library contains a lot of code to handle unimplemented FPU and integer instructions and many system patches in addition to the MMU setup code.

Last edited by SpeedGeek; 04 January 2019 at 19:57.
SpeedGeek is offline  
Old 07 January 2019, 16:17   #13
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 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.
SpeedGeek is offline  
Old 08 February 2019, 13:43   #14
SpeedGeek
Registered User
SpeedGeek's Avatar
 
Join Date: Dec 2010
Location: Wisconsin USA
Age: 55
Posts: 441
** 9TH NEWS UPDATE **

TurboMMU040+ 1.7 released.

v1.7 - Fixed typo bug for ITTx options. Now shows 4GB size.
SpeedGeek is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Roadshow 1.13 released AndreasM News 26 08 May 2018 18:58
Never released??? tomcat666 project.aGTW 18 18 January 2010 15:44
ScummVM 0.12.0 released! Shoonay News 14 05 September 2008 14:15
16.6 Released alexh project.WHDLoad 6 09 June 2006 11:02
E-UAE-0.8.28 released Mr Creosote News 0 21 September 2005 19:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07775 seconds with 13 queries