[Main] [Docs] [Installs] [Search] [Team] [Guestbook] [Links]

WHDLoad and the Memory Management Unit (MMU)

A MMU is contained in the following processors of the 68000 family: 68030, 68040, 68060. There are also so called EC versions of these processors which have a broken, out of function MMU. For example, all standard A4000/030 have only a 68EC030 CPU. On third party accelerator boards this varies, look in the appropriate documentation to learn about it. As far as known, all 68040/68060s built into an Amiga are full CPUs containing a working MMU. This is because Zorro III requires MMU mapping of IO space. The distinction between a full CPU and a EC version cannot be done by software. Therefore the user must do this by setting the right options for WHDLoad.
For the 68020 there is an external MMU called 68851, but this is currently not supported by WHDLoad.

Features of a MMU and using in WHDLoad

The main purpose of the MMU is to translate logical addresses to physical ones. This is required for virtual memory and separated address spaces. Another feature is to specify special properties like Supervisor Only, Write Protected and Caching mode for every physical address space, configured on a page base, where a page used in WHDLoad has a size of 4096 bytes. WHDLoad does not use logical to physical address translation. But it uses the MMU for memory protection, cache management and some special features like Snooping and resload_Protect#?.

Memory protection in WHDLoad

On startup, WHDLoad scans the present memory list and will build a translation tree which includes all accessible memory. It marks the following address spaces as valid and accessible: $0...BaseMem (using the information from the Slave), $dff000...$dff200 (Custom registers), $bfd000...$bff000 (CIA registers) and the memory used by the Slave and WHDLoad. If a Freezer is found in memory, the memory used by the Freezer will also be marked as valid. All other memory is marked as invalid, and therefore every access to such an area (Read or Write) will create an Access Fault Exception which will end in an appropriate error requester created by WHDLoad.

User control of the MMU handling in WHDLoad

There are 3 different modes how WHDLoad does affect an existing MMU.
  1. ignore MMU:
    In this mode WHDLoad does not change any MMU related registers. This may be useful if you have running programs which are banging the MMU and you want that the functionalities of these programs to remain intact (for example a software freezer like TK).
    Warning: Because WHDLoad does not control the MMU itself a lot of problems are possible. These problems may cause crashes, malfunctions or other unforseeable misbehaviors. Here a list of existing risks:
  2. disable MMU:
    In this mode, which is possible only on 68030, the MMU will be switched off by WHDLoad, no MMU related features are available.
  3. use MMU:
    In this mode WHDLoad takes full control over the MMU and realizes memory protection and cache management as explained above.
On the 68030 the default mode is disable MMU. On the 68040/68060 default is use MMU. There are two options to control this behavior. MMU/S forces WHDLoad to use the MMU and is required on 68030 systems to get the MMU features. NoMMU/S disables the MMU usage by WHDLoad (ignore MMU).

An Enforcer hit is an Enforcer hit, period. (Michael Sinz)

[Main] [Docs] [Installs] [Search] [Team] [Guestbook] [Links]