The mmu.library project © 1998-2019 the mmu.library development group, THOR ----------------------------------------------------------------------------- Release 46.18.1 --------------- - The EnvArc/MMU-Configuration.ACA file was missing from the distribution. Outch! Thanks to Jan-Erik for reporting this problem. - Added new releases of ACAInit and ACAIdentify that also cover the ACA1233n. - Added a new version of MuFastZero that also attempts to copy the KickMem and KickTag Ptrs to the non-mirrored version of ExecBase over, hopefully allow programs to install resident modules even if SysBase is remapped. Release 46.18 ------------- - Unlike documented, the dos.library FGets() function does not always zero-terminate its result, potentially causing an infinite loop when reading the preferences. This version includes a workaround. - The data caches are no longer disabled during context building if a context does not yet have a root pointer. This may speed up initial MMU table creation somewhat. Release 46.17 ------------- - The ColdReboot() patch of the mmu.library triggered a full coldstart on A3000 boards, erasing all resident modules, including LoadModule. This has been fixed. Note, however, that the A3000 SuperKickstart support has one bug that erraneously reserves 512K of RAM space with the mmu.library loaded. If you use LoadModule, add the option "HeaderForwards" to make it working. Release 46.16 ------------- - In case the mmu.library was run on top of a soft-loaded exec.library, the startup-code did not generate the implicit "ClearTTx" and hence could have left some IO boards configured as WriteThrough instead of CacheInhibit. This release now also recognizes versions of exec that have been injected via LoadModule and other related tools. Release 46.15 ------------- - This release includes an updated mmu.library which fixes the handling of expansion boards that have been "shut up" because the system run out of expansion space. All previous releases would have flagged erraneously the entire system memory as "I/O space" if that happened. This version ignores such (absend, and de-configured) boards correctly. Release 46.14.3 --------------- - This relase provides a new version of the 68030.library which includes now better support for the 68EC030 processors, especially on GVP boards. For these boards, caching needs to be disabled for the entire lower 16MB. Typically, the MMU and the mmu.library do that, but not if an EC processor lacking a MMU is in the system. - Updated scripts (installer scripts and rexx scripts) to support older ACA boards and install ACAInit if such a board is identified or requested by the user. - Updated MuGuardianAngel which failed to test whether it AllocAbs() had been patched over after MuGA was run. Release 46.14.2 --------------- - This release provides a new version of the 68060.library which includes now a more careful test for the I4 bug of the 68060. Apparently, the test used before could fail to detect the erratum on revision 5 68060 processors. - This distribution also includes a new (still experimental) MMU setup helper "ACAInit" that opens the MMU pages for some older ACA (icomp) cards such that ACATune will hopefully continue to operate on them. To use ACAInit, copy it to LIBS:mmu, and add this command at the end of ENVARC:MMU-Configuration. Feedback welcome. Release 46.14.1 --------------- - The configuration for the Merlin graphics card was not right as it uses 4MB in the Z3 area, but only 2MB in the Z2 area. An appropriate switch was added to the default config files and the configuration builder file. Release 46.14 --------------- - A arithmetic overflow in a {base+delta} or {size+delta} expression in ENVARC:mmu-configuration triggered a yellow alert, even if the result is never used because the corresponding board is not installed. This has been fixed. - This release ships with a new disassembler.library which no longer classifies btst with a PC-relative target as invalid. Release 46.13.1 --------------- - The configuration for the VA2000 was apparently not yet ideal as the first 64K are IO and not grahics memory, hence fixed the MMU-Configuration for the board. Release 46.13 --------------- - Added MMU information about the VA2000 graphics card. - Fixed a bug in PhysicalLocation() that crashed on mmu-less systems. Release 46.12.1 --------------- - The core library and most tools remain identical. - The processor libs were updated to release 46.3. ColdReboot() was potentially broken in case the code was run from MEMF_CHIP (rather unusual, but possible) and hence the CPU could not prefetch the jump to ROM. - MuProtectModules was updated to 45.5 and fixes a bug in not carrying over the cache inhibit settings correctly when enabling remapping. - LoadModule was updated to 45.9 and fixes a bug for not clearing module remapping addresses on a reset correctly. - The installer script did not create path names of the MuTools correctly and hence might have created an incorrect startup sequence. - Thanks to Hyperion, Installer 43.8 could be provided along with the distribution making the installation stand-alone. Release 46.12 --------------- - MMUInit is now also called during early setup of the library, that is in particular when the library is resident in memory. Release 46.11 --------------- - The setup and detection of CD32 ROMs was partially broken and several iterations were required to fix this. - Added another LVO to ease the layout of ContextWindows() upon creation. There is no longer a need to setup the target context correctly manually. In the autodocs, see LayoutContextWindow() for details. Release 46.7 --------------- - The interface of P5Init/p5emu.library to the CPU libraries changed again to make it a bit more future proof. The new interface allows P5Init to replace multiple CPU library call-ins to optimize compatibility. - Merging entries in the high-level MMU table description as used by SetPropertiesA() could have resulted in erasing side information required by MAPP_BUNDLED/MAPP_REMAPPED/ MAPP_INVALID/MAPP_SWAPPED/MAPP_WINDOW. Fixed. - MuMapRom was reworked again to improve compatibility with motherboard RAM on the A600 and A1200. - A debug version MuMapRom.debug is now included. - MuMapRom always mapped the A4000 and A3000 motherboard RAM, even on systems where this RAM is not present. - Erasing one of the MMU properties that require side information no longer erases the side information of other properties that remain set. Release 46.5 --------------- - This is beta release with a couple of bug fixes of the mmu.library and new functions of the tools. - Building a MMU context that was completely blank caused an infinite loop in the table builder process, fixed. - Removed duplications in the MMU default context creation. - Added support to tell the CD32 and CDTV apart, as the former has ROM in the 0x00e0-space, whereas the latter has motherboard resources there. - Added new mmu.library functions to create windows in mmu contexts and to enable fast window switching. - Updated MuScan to report on context windows. - Updated MuForce to report context windows. - Updated MuFastRom to be aware of the CD32 lower ROM area. - Updated MuMapRom to be aware of the CD32 lower ROM area, and to setup the MMU context for the reset-resident ROM mirror more carefully. - Bumped CPU libraries to V46. Release 43.14.2 --------------- - Not a new release. Apparently, the database command of the installer only consults ExecBase to detect a 68060, which may not always be correct. Added a work- around. Release 43.14.1 --------------- - Not a new release. The only difference is that we are now including also a patch for SetPatch 40.16, the version that came with Os 3.1. Release 43.14 --------------- - This version of the mmu.library introduces a new source of the MMU configuration, namely a resident module named "MMUInit". This module, if found on the exec resident list, is used to setup the MMU context during initialization before the user based configuration is called. - The 68060.library now uses an explicit test to disable the load/store bypass of the 68060 in case the CPU is faulty. Previous versions parsed the CPU revision, though created false negatives by a test that is too conservative when disabling the load/store buffer bypass. - MuMove4K includes now an explicit check whether it is run in front of SetPatch. Release 43.13.2 --------------- - One minor bug-fix in P5Init, namely handling of out of memory in the creation of the p5emu.library was not handled gracefully. - All CPU libraries check now for the presence of the p5emu.library and install "trampoline functions" to the emulation in case it is detected. This may help to avoid compatibility problems to P5 programs that jump into undocumented LVOs of the CPU libraries. Release 43.13.1 --------------- - Minor tweak in the CPU libraries to ensure that the visible "old" MMU configuration is also set to the configuration initialized by the CPU libraries. - The 68030.library now initializes the TTx registers on EC-based models explicitly such that the Z-II are is not-cacheable for write-accesses, working around a bug in the on-chip caching logic. Read accesses may be cached and are in control of the external board logic. Release 43.13 -------------- - Some utilities unfortunately release the previous MMU tables after initializing the mmu.library, then causing a hang whenever the library restores them for a reset. This release no longer attempts to do that if it finds that it has been loaded by an mmu-aware CPU library. - ENVARC:mmu-configuration is no longer strictly necessary if the library is initialized from a CPU library. Release 43.12 -------------- - This release fixes one (or possibly even two) serious but unfortunate bugs in the 68060.library: Loading single precision numbers as sources from unimplemented opcodes was unfortunately broken and caused wrong data to be loaded, and generated bogus bus errors at times. Release 43.11.1 -------------- - Bumped the CPU libraries to V43 for consistency, no functional changes. - The 68060.library clears now also the branch cache on a CacheClearU() and CacheClearE(). - 64 bit multiplication slightly streamlined for 68060. Release 43.11 -------------- - This release merges the changes made by Etienne back in the main development branch. - The MMU detection code is now also able to identify 68060's during the system bootstrap where some P5 boards only identify them as 68010's for compatibility reasons. - Fixed a harmless bug in the 68030/68581 MMU table reader. - CPU libraries: This release patches the private exec function ExitIntr() to address spurious interrupts happening on fast accelerator boards. On such boards Paula did not yet clear the interrupt bits when the CPU leaves the interrupt processing, causing a second spurious interrupt as soon as the processor leaves the exec interrupt handler. - LoadModule: Merged changes by Etienne back into the main branch. - MuGuardianAngel: Merged fixes by Christian Sauer back into the main development branch. Release 43.10 -------------- - Fixed nasty 43.9 exception crashes on 030 systems (and probably 020/881 as well). These crashes were caused by PhxAss default optimizations which converted explicit BRA.W to BRA.S in the exception handler and messed up calculated jumps. The MuLib is now assembled with branch optimization explicitely turned OFF *grunt* Release 43.9 -------------- - Made the mmu.library assemble with PhxAss by decoding DevPac only macros. - Added safeguard to the mmu.library AddMem command for switchable accelerator boards: memory in the 32bit address space (above the first 16Mb) will only be added if the CPU is at least a 68020. - Made the mmu.library ClearMMU command more effective: it will now reset areas incorrectly marked valid in the boot configuration to blank space. - THOR: Added workaround for some Appolo 060 boards that apparently misuse some undocumented 060 MMU table bits. Release 43.8 -------------- - mmu.library: I seem to have updated something here in 2002, but I really forgot. Anyhow, this is the latest release I have. - 68060.library: Added patches for the utility.library division support since some kickstart versions apparently do not patch in the optimized versions. - 68040.library: Added patches for the utility.library division and multiplication routines because some kickstart routines do not seem to patch the optimized versions in. - disassembler.library: Fixed all issues Christian Sauer fixed in 40.5, and also fixed garbled output on disassembly of floating point constants. Release 43.7 -------------- - mmu.library: Added a workaround against invalid MMU tables setup by utilities that do not satisfy the stronger alignment restrictions of the 68060 compared to the 68040. The MMU table scanner is now a bit more relaxed for these tables. - 68060.library: Improved the divu.l 64:32 division emulation somewhat. Motorola used Knuth's "Algorithm D" out of the book, which is, however, a bit overweighted for the purpose of the library. I replaced it by a somewhat simpler and faster algo- rithm. Won't make a difference unless the program to be emulated uses way too many divu.l computations. - Applied the same changes to MuRedox and its divu emulation. Release 43.6 -------------- - mmu.library: Added another safety check for the DMA property list. - MuMapRom: The reset-and-stay resident mechanism of MuMapRom makes now use of the ColdCapture exec vector and a nice little extra hack. - MuMapRom: Adds now a 16MB "safety zone" around memory areas to keep some wierd memory tests working. - memory.library: Changed the memory administration functions a bit by adding a "ranger pointer". Release 43.5.1 -------------- - 680x0.library: Handled the low-memory area of MuMove4K unproperly and therefore broke MuFastZero. Fixed. - MuMapRom: Did not work at all if the "ROMINFAST" option was not present at the command line. Should be much better now. - memory.library: The library does no longer allow the attachment of an address space to the global MMU context. - memory.library: The library does no longer support attachments of address spaces to supervisor contexts. This wouldn't have worked anyhow. - MuGuardianAngel: AllocAbs() was still broken and returned the wrong register. Release 43.5 -------------- - CPU libraries: All CPU libraries reset the VBR now before restarting the ROM. - mmu.library: Fixed a possible race condition of the 68060 exception handler. The 68060 can report a misaligned access even though the fault address and the access fault size do not indicate that a page boundary is crossed. - Included a new test tool: "SwapTest" will check whether the 68060 or 68040 library support some race conditions on swapping correctly. Note that this test will fail for most third-party libraries. - Included MuForce 40.30 (Aminet release) that is required for the latest MuGA. It won't work with former releases. Release 43.4.2 (Internal release only) -------------- - memory.library: - fixed possible memory leak of the swap hooks. They should have closed files/devices on VMPACK_EXIT, not VMPACK_CLOSE. - Updated the documentation of the mmu.library for the new functions. - Included a first version for the memory.library documentation. Release 43.4.1 (Internal release only) -------------- - mmu.library: Forgot to include the 43.4 of the mmu.library in the last distribution. - memory.library: - fixed broken handling of private swap hooks for virtual memory pools. - fixed broken handling of "Retry" of error requesters. - added more sophisticated error handling for out of memory and swap alerts. The code will no longer try to repeat for obvious errors. - mmap.c: - fixed missing result code on error. Release 43.4 (Internal release only) -------------- - mmu.library: The 68040 race condition fix of the 43.3 wasn't as good as I though. Reworked this mess again. It will now be able to handle the wierd condition where a write-back is busy and detected from a word-sized movem, even though it comes from a different instruction. Yuck! - mmu.library: Added workarounds for the V37 ObtainSemaphoreShared() bug. - mmu.library: Made all context locks shared as far as possible. - mmu.library: Fixed a possible register trash for the shared context locks. - memory.library: Worked again a bit on the memory allocation routines - Examples: vmem.c and mmap.c are now ready for release. The examples look now like they are supposed to. - Updated the mmu.library autodocs a bit. - memory.library: - added another cache at the swap hook side of the library. This should hopefully help to improve the performance a bit as it tries to bundle I/O accesses. - the library limits now the virtual memory range of the address space to the user defined limit before asking the hook for the maximal size. This avoids unnecessary disk- trashing for the file hook. - the library should behaive much better now for low memory situations and errors on the swap hook. The hook remains responsive in these situations. - added a (localizable) error requester for failures of the three built-in swap hooks. - All file I/O goes now over packets rather the dos.library. This would avoid trouble in case the dos.library gets patched over. Release 43.3 (Internal release only) -------------- - mmu.library: Fixed a possible race condition of the Motorola "Diva", the 68040. Unlike what the documentation suggests, the CM bit is not directly related to access errors of movem's. )-: - memory.library: - Fixed a bug in the final page disposal routine that could have caused MuGA hits. Fixed. - Fixed a bug in the swap daemon that could have tried to deliver a motor tick to the swap hook even though the hook has been released already. - Reworked the internal memory handling. The memory pools come now with scratch lists to speed up the allocation of tiny chunks, and to avoid unnecessary virtual memory accesses. Further, the library uses now its own set of pooled allocation/deallocation routines. First of all, this avoids clashes with whatever patch might sit there and doesn't know how to handle virtual memory correctly, especially the rather harsh Forbid()/Disable() rules. Second, the new pooled allocation tries a combination of a "best fit" plus "buddy chunk" allocation that is less naive than the native exec allocation. (but still naive enough to allow improvements...) - Fixed bugs in the computation of the swap pool size that happened mainly on machines with Z2 memory only. - Added documentation for the PoolVSize() function that was forgotten for the 0.0 release last time. - Added a tag to restrict the size of the virtual memory pool created. - MuGA: Fixed Deallocate()/Allocate() patches that forgot to align memory correctly. - MuRedox: Aparently, the new version never made it to Aminet, even though it was uploaded. It provides one new option, SHOWPATCHEDINSTRS, which shows the list of instructions it was able to replace by its own set of stub-routines. If the vmem example program shows an "Allocation Failed" report, do not worry. This is just because the memory pool run out of data. This is likely to happen due to the way how this stress-test works. The memory.library got tested now on the 030,040 and 060. Release 43.2 (Internal release only) -------------- - mmu.library: Added support for the mmu.resource. This is a system resource that defines the interface to the true hard- ware MMU. The library will make use of this resource whenever it is present, and will fall back to its build-in routines otherwise. The purpose of the resource is to allow emulation of the MC68K MMU on non-native CPUs (i.e. x86) without the need to re-write the entire library from scratch. - mmu.library: "shared" pages are finally officially supported. Note that most of this stuff worked already in V42. - mmu.library: Fixed a bug in PhysicalLocation() that did not return the true physical location in case the memory was marked as MAPP_SHARED. - mmu.library: Added GetPageUsedModified() to parse the Used/Modified flags more easely than with Get/SetPage- Properties(). This is still to be documented and mainly for the purpose of the memory.library. - MuGA: Fixed a register trash that broke AllocAbs() and related calls. - NEWS FLASH! Finally, the first release of the memory.library is available. The purpose of this release is to supply virtual memory to the AmigaOs in a flexible and compatible way. There is not yet much documentation, but there are includes and autodocs. Testing: -------- - After a long pause, it's testing time again! The current test suite contains two example programs, source code included, that demonstrate the power and the flexibility of the library. Please experiment a bit with these two programs! - mmap: Expects a file name as input. The corresponding file should be a simple ASCII text file whose contents should be printed onto the consolse. This doesn't sound spectaculous at all, but the way *how* this is done is a bit "unusual". The program mirrors the complete file in memory without having to load it completely, and then uses only memory/pointer arithmetic to print the contents of the file. - vmem: Demonstrates "virtual memory management". Similar to the "MemoryMess" test program of "PoolMem", this program just allocates and releases virtual memory very often as some kind of a "stress test" for the memory.library. This will be *slow* due to a lot of swapping operations. The program expects either a file name as input that will be used as a swap file, or the name of a dos device, to be used as a swap partition. *** BE WARNED! *** In case you use the swap partition method, ***************************************************** *** ALL CONTENTS OF THIS PARTITION WILL BE ERASED *** ***************************************************** Please test this program with both a swap file (64MB free space will be required), and a swap partition. Note that due to the nature of the FFS, swapping to a swap file might be very slow; other filing systems might perform better. *** DO NOT YET WRITE PROGRAMS FROM THESE EXAMPLES *** The presented examples are not yet optimal in the sense that you would be encouraged to build a private MMUContext, unlike the example programs. This will be fixed in a future release. Release 42.11 -------------- - MuForce, MuGuardianAngel: The documentation stated that you must not exit MuForce as long as MuGuardianAngel is running. Since some folks do not want to read documentation, this behaivour is now enforced. (pun intended) - mmu.library: The MMU memory type tag was ignored for the spare pages for MAPP_BLANK, fixed. - MuFastZero: Returns now a separate error code in case FASTEXEC has been specified but exec is already in fast memory. - MuMove4K: PREPAREEMUL did not work correctly on boards with true autoconfig memory due to a missing MEMF_CHIP. Fixed. - MuGuardianAngel: Added the new critical PROTECTPOST option to enhance out-of-bounds error detection. - mmu.library: Added some private tags to GetContextData(), not to be documented. - MuFastRom: Got modified to work with even already remapped ROM images. - fpsp.resource (within the 68040 and 68060.library): Fixed the generation of the "store" flag that should have been set in exception conditions. - FastIEEE: Development passed over to Gunther Nikl; included a new 40.2 that fixes some bugs of the 40.1 and works around some old bugs of the V37 math libraries. Thanks, Gunther! - mathieeexxxx.library: The V45 math libraries support now the fpsp.resource and hence faster mathematics. They are part of Os 3.9 and not included in this distribution. - MuMapRom: This is a new MuTool that allows booting from a different kickstart release if the board is well-behaived. Be warned, this is a hack. - MuRedox: Another new MuTool that patches on-the-fly unsupported 040 and 060 instructions similar to the Oxypatcher or the CyberPatcher. Be warned, this is a hack. - Included FPSPSnoop for debugging purposes of MuRedox. - Included LoadModule as "base tool" for MuProtectModules. Release 42.9.1 --------------- - MuForce: Marked the ROM area as WRITEPROTECTED rather than ROM on exit, causing GURUs on erraneous writes into that area. Release 42.9 --------------- - Due to a bug in the MMU-Configuration scan, Imprecise and NonSerial were mutually exclusive within the MMU-Configuration file. Result could have been less-optimal MMU setups on 68040 boards that could not have caused any instabilities, though. (Hence, this is mainly a cosmetical fix...) - MuProtectModules was updated to support to the LoadProtectModules release 40.5 and beyond. - FixP5SCSI: Added a check for the 1230scsi.device. Release 42.8.1 --------------- - MuGuardianAngel: Fixed a bug in the page access handler that could have invalidated pages under some alignment race conditions, thanks Stephen. - 68060.library and 68040.library: Added explicit masking within CacheClearE() which might work around a potential firmware bug of the 68060 or of DMA driver firmware. - 68060.library: Fixed a bug in the "unsupported FPU data type" handler due to a register trash. Urgh! Thanks for the bug report, Luca. Release 42.8 --------------- - mmu.library: Fixed a fatal bug in the RebuildTree(s) calls that trashed the DMA relevant MMU table mapping in case the MMU context remained untouched and RebuildTree(s) could have exited immediately. - MuFastChip: Added a check whether the program is really required, and prints a warning in case it is not. - MuFastZero: Tries now to detect the lower limit of the chip memory automatically and will remap all memory below this boundary. Should help when using the ShapeShifter and "MuMove4K". - Documentation: exd_Internal was at the wrong place in the C header files. (Urgh!) It was always correct in the .i files, though. Release 42.6 --------------- - mmu.library: Fixed some very rare problems on access errors of pre-decrement movems for both the 68040 and the 68060. - MuMove4k: The PREPAREEMUL (without the A1200 switch) option was broken and might have caused crashes on a reboot. MuMove4K installs now itself into MEMF_KICK and no longer MEMF_CHIP. If this causes problems on your machine, try the INCHIPMEM option. - MuFastZero: If ExecBase was remapped by means of the FastExec option, installation of reset-proof programs behind MuFastZero failed since these programs installed only into the non-resident copy of ExecBase. MuFastZero includes now a patch to SumKickData() which will avoid this problems. - MuForce: MuForce installed an interrupt handler directly into the autovector base which is not very system friendly. Fixed by using the official interrupt handler. If MuForce crashes on exit, disable your favourite "SaferPatches" clone and either avoid these tools, or get "TRSaferPatches.lha" from Aminet. - MuGuardianAngel: Supports now some not yet available memory pool enhancement patches. - P5Init: Fixed a potentially dangerous unaligned CopyMemQuick(). - A new MuLib based, tested and VMM aware 68060.library is now available. - Included a new tool, MuProtectModules. This will write-protect resident modules loaded by "LoadModule". (See Aminet). - MuEVD: Forgot an ATC table flush, result might have been partial display gliches caused by erraneously dropped refresh cycles. - FPU: Forgot to include this FPU control program. Fixed. - 680x0.library: Did not identify a 68060 FPU correctly if used to bootstrap the 68060.library by the patched SetPatch. - 68060.library: Fixed a fatal bug in the fpsp core that could cause crashes and hangs on execution of fscc instructions. - 68060.library: Included a replacement function for CacheClearU() since a 68060 version might not be available. - 68040/68060.library: Included a new and improved CacheClearE() function. Especially gvpscsi and omnscsi owners might profit from this improvement. - Included PatchWork 0.15 from Richard Körber. Thanks, Richard! - Updated the documentation and the include files. - Added the IGNORE keyword to MuFastZero. Release 42.4.1 --------------- - CPU libraries: The FPU test was super-critical and failed if the FPU could not complete a float->integer conversion before starting a concurrent frestore. - CPU libraries: The GetMsg() replacement is now more conservative and will return NULL in case the message list of the port is not properly initialized or the linkage field of a node is (incorrectly) NULL. Thanks Ian! Release 42.4 --------------- - Fixed several flaws of the 68060.library: Several cache flushes have been missing, FPU setup has been fixed as well. - Fixed the installer script: FixCybAccess must be "run" in background. - MuGuardianAngel did not record the return PC correctly for the pooled memory allocations. - The mmu.library crashed on a plain 68000. Fixed. Release 42.3 --------------- - Included an alpha release of a new 68060.library which provides a fpsp.resource and is virtual memory aware. This alpha release can be found in the LIBS/alpha directory. Thanks goes to Stephen Brookes and Etienne Vogt for performing some tests. Note though that I do not own a 68060 and could not test this library for correctness. - Included a MMU driven ShapeShifter video driver, MuEVD. (new) - MuGuardianAngel: Does no longer call RawIOInit() and hence will no longer conflict with programs using the serial port even in cases MuGuardianAngel never required the port in first place. - MuForce: Does no longer call RawIOInit() but fully relies on the Os and/or the user to initialize the serial port correctly, in the same way the old Enforcer did. This means that MuForce will now safely cooperate with software that requires the serial port in cases MuForce output goes to the parallel port or other destinations. - Note that there is now a new release of "BlizKick" which fixes the problems mentioned below. - Updated the documentation, fixed a minor mistake in the MMU developer's manual. - Included an upgrade patch from SetPatch 44.13 to 44.14 which, once again, opens the 680x0.library instead of the 68040.library. The RamLibFix is then no longer required since it is included now in SetPatch anyhow. - MuGuardianAngel: The DUMPLIST routine had a bug and might have allocated too less memory. Luckely, this had the only side effect that not all of the mung list would have been dumped correctly, it did not trash any memory. - MuGuardianAngel: The DUMPLIST option now also makes use of the SegTracker to print segment/hunk information of the allocating routine. - Installation scripts: Due to a bug in the BuildMMUConfig.rexx script, the on-board hardware of certain P5 boards has been disabled completely. Urgl. - mmu.library: Added a new command for the ENVARC:MMU-Configuration, "FOR". It executes the command given as argument if the manufacturer product code fits, possibly several times if more than one board is in the machine. - mmu.library: The MMU-Configuration file can now be put into DEVS: as well since some people seem to have problems with the library and HappyEnv. - mmu.library: Added another new command "ClearMMU" which will re-run the MMU setup procedure at least partially. The intention behind this is to override or ignore a previously loaded MMU tree at least partially in places where it is sub-optimal or incorrect. This seems to be required by some Apollo boards. - mmu.library: EnterContext() and LeaveContext() are no longer running into the risk of breaking a Forbid(), provided AllocMem() doesn't. NOTE THAT I NEVER DOCUMENTED THIS FEATURE ANYHOW. This might help for some critical applications where a launched task must run in a new context. Due to a feature of exec, you cannot enter a context before you AddTask() a new task, sigh. - mmu.library: Due to a trashed register, the library crashed upon detection of an 68040 or 68060 with a disabled or otherwise non- functional MMU. Note that it would have detected the EC processors correctly, though, including the 68EC030. This release should do better. Thanks to Pavel for detecting this. - Fixes: Added a fix to repair the UMult64()/SMult64() bug of the Os for the 68000 and 68010 processors. Not required for the up-to-date release of SetPatch, but otherwise recommended. - mmu.library: AddConfigDev() is now supported, but the implementation depends on some internals of the expansion.library. Hopefully, nobody will change them. The MuLib tries to check whether the ROM function is still installed. In case it is, the code will jump into the old ROM code. In case it isn't, a replacement routine is used. - 680x0.libraries: AddConfigDev() is now passed thru, presumably to the mmu.library function. - Installation: Finally, wrote a (rather complicated) installation script for automated installation. - Included various fixes for the BVisionPPC driver and more "software fluff" for the installation process. - 68040.library: Impoved the GetMsg() workaround for programs that call GetMsg() in a tight loop. - 68040.library: Fixes now a bug in the mathieeesingbas.library which doesn't use a FPU since it is setup before this library is setup. Release 42.2 --------------- - The 42.1 release automatically marked all hardware pages as cacheinhibited serialized. Looks like even that was too much for some hardware boards, I don't know why. This should be the proper default anyhow. I disabled this again, even though this means, as for 42.0 and before, that a MMU-Configuration is *mandatory* if you use the library as "stand-alone" instead on top of a third- party 68040/68060 library. Release 42.1 --------------- - MuFastChip: Forgot to include the latest mmu.library in the latest upload. Sorry. - Installation: P5Init, PPCIdentify, P5Identify reworked again, it enables now explicitly the bus error generation of the A4000 motherboard resources. - Installation Rexx scripts: Added a "NoP5" keyword to disable ex- plicitly the P5 identification steps which seem to be problematic for some boards for reasons that are beyond me. - MuManual: Fixed some typos, corrected some mistakes, clarified some formulations. Thanks to Etienne Voigt for proofreading! - Organization: The "MMULib" archive is now the user archive, all developer information went into the "MuManual" archive, including the autodocs, the includes, the bmaps and some example sources. This will help to keep the archive short. - mmulib: The CurrentContext() function forgot to Forbid() properly. Note that you still need a Forbid() bracketing or the result code might be pretty useless. The propability that this broke code is very low, though. - mmulib: GetMappingProperties() was simply broken in V42.0 and below. Sorry, this got fixed. This function hasn't been used yet, so this bug was left unnoticed. - mmulib: Even if "ClearTTX" is missing in the MMU-Configuration, the library cache-inhibits now the access to expansion boards. This is just a safety bonus. - Included a debug version of the library in the MuManual archive. - BlizKick: In order to avoid a yellow alert, either BlizKick must be modified or must be run behind SetPatch. The reason for the alert is that BlizKick opens the mmu.library before the 68060/68040 lib is open, which is and never has been legal. I just added an explicit check for this condition in V42 because too many people ignored it. As I said, "no discussion". This is a side effect of how the library works and has to work. Release 42.0 --------------- - mmu.library: Added more error checking for the startup code, esp. the MMU-Configuration file. Added a check for proper config- uration, i.e. whether the library was (incorrectly) loaded in front of SetPatch. - Added a new function: RunOldConfig(). It runs a small supervisor routine with the boot MMU configuration. - 68040.library: Added an explicit check for correct configuration, it will generate a requester in case no 68040 is available. - MuGuardianAngel: Fixed a bug in the mung-wall check which could have reported one additional mung-wall damage in case the front wall was found defective. Added a workaround for a possible 68060 firmware bug, the "U" bit is now always set in the MMU descriptors to avoid unnecessary MMU writebacks. - In case you see MuGuardianAngel hits of the z3scsi.device, run the FixCybAccess program. It will work around the z3scsi.device hits as well. Thanks, Helmut. - MuMove4K PREPAREEMUL moves now the low chip memory end to the 16K line, not to the 8K line. This might fix some Fusion problems. Thanks, Pavel. - Improved the error messages of MuFastZero a little bit. - Reworked P5Identify and PPCIdentify to make these two more stable. - Added another external MMU setup command, P5Init. It should keep care about all P5 specific cache settings and should setup the PPC and the BOOT-MMU-Port automatically. All manual P5 specific entries in the MMU-Configuration except graphic board cachings are obsolete now and should be replaced by P5Init. - Rewrote both setup scripts to reflect the changes in the P5 setup logic, i.e. ScanMMUPort has been replaced by P5Init and all P5 specific cache settings have been removed. - Added stack increasement patches for the mfm.device (CrossDos) and IPrefs 40.7 in case you do not yet use Os 3.5. Thanks Gene. - Added a fix for two bugs in ramlib. First, its stack is too low. Second, it uses SIGF_SINGLE as message bit for its process port which could cause some race conditions with semaphores in library setup code. - The MuGuardianAngel patch report and automatic IRQ check have been reworked a bit. The "patches overwritten" message is now no longer periodically generated, but will be suspended up to the next "real" hit where another message will be generated. - The MuGuardianAngel automatic IRQ stack was not only useless, but in fact broken. This does not go for the stack check of the exec memory handling functions which was and still is fine. Good enough it was recommended to leave the IRQ check disabled. "Nearly out of stack" warnings were not generated by the IRQ code at all, and the stack overflow and stack underflow messages usually report "bogus" hits due to its construction. Stack snooping is now by default ENABLED, except for "out of bounds" reports, which still requires STACKSNOOP option explicitly. Added an option to adjust the minimal stack size for the "Nearly out of stack" reports, but it can be made only larger, i.e. more "picky". - mmu.library: The pre-42 releases only marked the zero page as non-blank which might have caused problems for some Mac emu- lators. It now marks the lowest 32K as valid. Former versions set it to "cacheinhibit", it is now set to "cacheinhibit nonser- ialized imprecise". - mmu.library: The low-memory limit up to which the mmu.library has to software-emulate accesses has been made adjustable. - mmu.library: Due to a bug in the high-level mapping list manage- ment, MAPP_INDIRECT did not work correctly. - mmu.library: BuildIndirect() performs now a few more consistency checks and is less restrictive for MAPP_INVALID and MAPP_SWAPPED. - Updated the DMAInitiate() function, it provides now a return code instead going guru if it doesn't like the parameters. - Updated MuOmniSCSIPatch to reflect the changes made to DMAInitiate(). - Fixed many documentation errors in mmu.doc, updated and checked exception.doc again. - Included a demo program for indirect descriptor handling. - Speedup SetIndirect() somewhat by placing this routine directly in the MMU drivers as a "native" operation. - Added a new LVO "SetIndirectArray()" to set more than one indirect descriptor at once. Should be *very* fast. - The startup command "DescriptorCacheInhibit" did not pass a proper result code on success and hence caused a yellow alert. This bug was only noticable in some of the V42 betas where proper result code checking was introduced. - mmu.library: WithoutMMU() disables now the CPU caches as well to allow a safe access to non-cacheable addresses. - MuFastZero: In case MuFastZero is removed (why?) the unmapped chip memory is set to IMPRECISE and NONSERIALIZED to provide at least a minimal speedup. - Added "AmigaGuide" versions of the autodocs. - Included a new version of BPPCFix by Frank Wille. Thanks, Frank! Using this program will allow you to replace the ROM-based libraries of the Blizzard-Boards. Thanks Stephen for working this out, and for making this trick possible! - Included a "RKRM" style manual and tutorial for the MuLib in "dvi" and "postscript" format. Release 41.4 --------------- - mmu.library: The CachePre/PostDMA() functions are now a bit more error tolerant and handle cases where a DMA device attempts DMA transfer to a non-existing memory region more gracefully. - 680x0.library: Sets now the memory attributes of the supposed-to- be remapped low-memory header to MEMF_FAST instead to 0 to avoid a zero return value of TypeOfMem(). - MuFastZero: Sets now the memory attributes of the supposed-to- be remapped low-memory header to MEMF_FAST instead to 0 to avoid a zero return value of TypeOfMem(). Lowered the priority of the rendezvous port. - FastIEEE: Optimized the IEEEDPFloor and IEEESPFloor in case a 060 processor has been found. Note that this makes currently no difference at all since there is currently no 68060.library that provides the fpsp.resource. Release 41.3 --------------- - disassembler.library: fmovem.x ,memory was disassembled incorrectly. Fixed. - mmu.library: SetPropertiesMapping() accepts now base=0 and lenght=0 as a special case to transfer the complete list. - 68040.library: Removed some unnecessary strings and references to the math libraries. - mmu.library: Added workarounds for possible DMA disable counter under- runs that might have happened in case the library gets active while DMA is active. - MuMove4K: Added more options: IGNOREVERIFY/S Disables the verify check for the reboot code REVERSE/S Allocates the memory for the resident tags in reverse direction LOWPRI/S Lowers the priority of the MuMove4K resident tag as a possible workaround for some wierd other hacks. Added more error messages in case something goes wrong. - MuForce: Forgot to restore the Z-page mode and physical location on removal. Ooops. Thanks, Heinz! - MuFastZero: Added a "FastVBR" option because it was easy to do and canonical to have. NOTE THAT THIS OPTION IS NOT REQUIRED IF YOU REMAP THE VECTOR BASE ANYHOW. - MuGuardianAngel: Prints now the stack boundaries in case of stack problems, let it be overflow, underflow or nearly out of stack. Thanks to Heinz, again. Provides an option to disable these warning messages, but beware! This doesn't mean bugs will go away, it just silences MuGuardianAngel. Remember, this program is provided to scream upon problems it detects. - Setup scripts: Greatly enhanced! The new setup script will also re-set the memory caching modes for boards whose boot-roms already run the MMU. Fixed a minor glinch that produces a (bogus) error report in case LIBS:MMU already existed. Remember that you can't run the ppc.library on the MuLib setup, sorry. - Added a new setup script "ScanToConfig" that takes a "MuScan" output from a system running under a third-party 68040/68060.library and generates an MMU-Configuration file from it. To use it, re-install a non-MMU-aware processor library, boot the system, then enter the "Install" directory and run the script. MuScan must be available in the current directory as it is in the archive. Please let me know how this new script goes, maybe it's smarter. - Added a new program "MemModes" to the installation tools. It will auto-generate the memory caching setup as the mmu.library does if the MMU is found non-active. Possibly an improvement for those boards which - strange enough - turn on the MMU before booting. - Added a patch for the new SetPatch in the BoingBag, check the "Fixes" directory. - Again: When will people finally learn to read the FAQ? *Sigh* In case MuFastZero complains "The zero page is already remapped", ---> READ THE GUIDE. <--- Release 41.2.1 --------------- - Updated the 68040.library to 40.6. It builds now the fpsp.resource which offers opcode emulation to external hosts. - Included FastIEEE which re-directs the mathieee-library routines to the fpsp.resource for optimal performance. - FastIEEE fixes, too, some bugs in the mathieee libraries. IEEEDPCmp() is broken and orders some numbers "the wrong way". IEEEDPPow() and IEEESPPow() are broken and return non-sense for special arguments. Release 41.2 --------------- - The MMU Library build-in AddMem failed in case the base or length were not aligned to 64K boundaries. It now rounds to the next 64K boarders such that the supplied area is at least mounted partially. - The idea to disable the TTx registers in the mmu.library was unfortunately not a very smart idea as it broke the code on some machines. Re-established the old rule with the only exception that the TTx registers are initialized for the EC040. - The ColdReboot() patch of the 68040.library used the MMU registers even on a system without MMU. Fixed. - MuMove4K checks now all libraries, devices, ports, resources and resident modules whether they violate the 8K boundary. - 68040.library: Forgot to disable the caches in ColdReboot(). - 68040.library: The motorola OpErr handler did not consider tracing correctly. Fixed. - Finally wrote and included the 68020.library and the 68030.library, hence "FPU" will work on these machines. - Updated MuGuardianAngel: Added a new keyword "DUMPWALL" that prints the contents of a broken mung-wall and of broken memory cookies. Release 41.1 --------------- - ScanMMUPort was broken and scanned for the wrong port. *Sigh* This release should work better on Blizzard boards. - AddMemList() uses now RebuildTreesA() to rebuild user and supervisor tables at once and is therefore a bit more error tolerant. - The mmu.library will now support CachePreDMA/CachePostDMA for the EC040 and EC060 processors as well. - The 68040.library will now disable the TTx registers manually such that the "generic" board does no longer require an ENVARC:MMU-Configuration file. - The 68040.library will now enable copyback caches for the EC040. - Some of the MuTools did not unload properly if loaded from the workbench, fixed. - The MuTools are now a bit more error tolerant due to a new function in the V41 mmu.library which gets used. Release 40.60 ------------- - fixed the shutdown code of MGA, thanks to Stephan! - disabled a kludge in the mmu.library which write protected a kickstart image at 0x00200000 and up by checking the name of execbase. This kludge might have conflicted with some softkickers. - Because people tend not to read guides, I added the arguments "WRITEPROTECTED" and "INVALID" to the library build-in "SetCacheMode". Note that they work different to what "MuSetCacheMode" does. Here, "WRITEPROTECTED" and "INVALID" are just aliases to "ROM" and "BLANK", hence enable the most defensive protection strategy. - Added a new LVO "RebuildTreesA" which is "officially" not yet existing and will be documented in V41. More LVOs might be added up to V41, but please *DO NOT* yet call them as they did not exist in V40.50. - Fixed the installation script, due to a typo the P5 MMU boot hack was not detected. - Fixed the P5Detect program which just looked to the wrong identification resources. Ooops. Installation on "non-standard" boards should be smoother now. - Fixed a bug in the disassembler.library which disassembled the lea (offset.L,pc) wrong. The offset was wrong by two bytes. - The release number in the MuForce guide was wrong. - When will people finally learn to read the FAQ? *Sigh* In case MuFastZero complains "The zero page is already remapped", ---> READ THE GUIDE. <--- Release 40.51.1 ------------- - disabled the layers.library kludge for MuGuardianAngel if V40 is found active. It is luckely no longer required. Release 40.51 ------------- - fixed a bug in the 68060 startup logic which left the MMU disabled in case it was disabled before. This made the custom 68060.library useless. - included the 40.17ß3 release of Carten Schlote's 68060.library which (for the first time) makes use of the MMU.library. Installation of this library requires some care as IT DOES NOT automatically auto-detect P5 hardware and special setup magic for this hardware. This is not because the library is "broken" in some sense, but because P5 didn't follow the CBM guidelines when designing their hardware. Therefore, an experimental installation script has been written. This script must be run as follows: - Unpack the archive to disk, - Enter the following commands: cd /Install ;where is the directory you unpacked this ;archive to SYS:Rexxc/rx BuildMMUConfig.rexx ENVARC:MMU-Configuration - The last command builds the MMU configuration and writes it to ENVARC:MMU-Configuration. It might also copy ScanMMUPort to LIBS:MMU. This is an external setup command for the library and might or might not be required. Older P5 hardware does *not* require it (I would guess that this is explicitly for the Blizzards, but I'm not sure). Non-P5 hardware will not require it at all. You might want to hand-edit or optimize this script if you need, as it will contain several optimizations for graphics cards and other known boards. - KEEP THE OLD 68060.library IN A SAFE PLACE. - Make sure to install the 40.51 edition of the mmu.library - Copy the 68060.library to LIBS: - Reboot the computer and wish the new library luck. (-: This edition of the '060 lib does *not yet* include correct VMM management and FPU control functions (hence, C:FPU will not yet work). It is shorter and costs less memory because it leaves the MMU setup to the mmu.library. (Note that this release contains still debugging information). In case the installation failed: - Make sure the mathieedoubbas.library you're using is truely the official 38.x or the patched and bugfixed 39.1. Some other third- party products may fail to work correctly if the 68060 support code is not yet loaded. In case running the library fails (i.e. system doesn't boot): - Make sure LIBS:mmu/ScanMMUPort is really available at boot-up - Please re-boot the computer without the startup-sequence, - Keep ENVARC:MMU-Configuration in a safe place, - Re-install the old 68060.library. - Boot the computer again, - Run "MuScan" and keep the output. Then, please sent me the output of MuScan, and the ENVARC:MMU-Configuration file with a tiny note what exactly happened (or did not happen). Release 40.50 -------------- - added external command scanning in case a setup command is not found "resident". - included Richard Körber's PatchWork and Olaf Barthel's Sashimi. The "PatchWork" edition is *NEW* and *NOT YET AVAILABLE* otherwise. Big "thank you" to Richard for updating it for this archive. Big thanks to Olaf Barthel for allowing me to include his "Sashimi" in the archive. - bumped the version number. - Final release. Release 0.48 -------------- - mmu.library: Added a new command in the MMU-Configuration file, "DescriptorCacheInhibit". It controls whether the MMU library should disable the data cache for the descriptors. This is by default OFF as this feature means more trouble for the library, and is not required for using the library. However, this might be a workaround for programs that hack the MMU table themselves, which is not supported anyhow. Set it to "ON" if you MUST use these programs. - Added another VMM support function. - MuGuardianAngel: The "memory header" output was broken, fixed. Added more security checks, MuGuardianAngel will warn you in case its function entries have been patched (which is not supported) - MuGuardianAngel: Added automatic stack checking within the memory allocation functions - an overrun stack seems to be the most common source of MuGuardianAngel problems. MuGuardianAngel will now detect an "nearly out of stack" condition in the memory handling, and will provide an "emergency" stack in case this happens. It will then generate a warning, regardless of whether stack snooping is enabled or not. Interestingly, the RAM-Handler and the FastFilingSystem are the most common sources of stack-overflows. This should be fixed for the RAM handler with "PatchRAM" in this archive, the FFS stack should be added manually in the RDB, though. The smallest re- commended stack size is 786 bytes, not less! - P96: (yes, you read this correctly) supports now the mmu.lib if it is available. - Added an experimental GfxCard setup program to optimize cacheing. This function is included in P96 anyhow, so not really required. - mmu.library: MOVE16 is now "sort of" supported, in the sense that the exception handler will be able to handle it. However: - MOVE16 is not supported by all Amiga hardware, it may crash, - A MOVE16 on a 68040 is potentially dangerous due to a bug in the CPU. A MOVE16 might invalidate cache lines which are not related to the MOVE16 operation at all. There is currently a workaround for this, namely: Do not set the "imprecise", or "user page" bits 0-3 for swapped, invalid or supervisor only pages. I do not guarantee that this workaround will remain valid. *JUST DON'T USE MOVE16.* - A MOVE16 may cause double reads, do not use this to read from hardware registers that cannot tolerate this. Do NOT use it at all! - A MOVE16 which causes the exception handler to enter may be completed by means of ordinary writes, which means that in this situation no burst access is used, and the order of the data written out or read might be different from that of a true MOVE16. *JUST DO NOT USE IT, OK!* - mmu.library: On read/modify/write accesses, the library might have reported a write protection fault instead of a simple write fault on the write cycle of the instruction. Fixed. - MuGuardianAngel: Added more consistency checks, added checks and support for memory pools, made some error messages more informative. - MuMove4K: Added the NOREBOOT option to avoid unnecessary reboots if the system is rebooted by a second program afterwards anyhow. - Included a patch for the V44 SetPatch. Release 0.47 -------------- - mmu.library: Changed again the cache control logic a bit. Please try DMA transfers again. The new logic does not block interrupts as long as the old logic, hence might avoid problems if fast interrupt processing is required. It should be *slightly* faster as well. - MuForce: MuForce catches now supervisor exceptions as well if you specify the "CAPTURESUPER" keyword. This requires patching of some autovectors. - Added a new drawer "Contributions", containing more tools from other people I regard as very useful. This is "Sashimi" by Olaf Barthel, and "PatchWork" by Richard Körber. Thanks Olaf, thanks Richard for allowing me to include your great work! - Run all guides thru ISpell, hopefully correcting most typos. - MuMove4K: The PREPAREEMUL option disabled the CPU instruction cache. I expected the ROM would re-enable it somewhat later, but it didn't. Fixed. Release 0.46 -------------- - mmu.library: Found that the "ramlib" task is really very low on stack. I'm now swapping the stack on library startup to avoid problems. - updated the mmu.lib exception handler. It is now possible to use the exception mechanism to auto-extend the stack and to keep the user stack on virtual memory. The new "message hook" mechanism does not require user stack space. However, an additional patch to the exec switch function is required for this trick. This patch is currently not included in the mmu.library - basically because this is not directly MMU related. - MuGuardianAngel will now stop to check for a valid free memory counter if it finds a problem and reports the problem immediately. - MuForce is now able to capture even "ordinary" MC68K exceptions. This can be disabled with the new "NOGURUPATCH" option. - Included a "synchronous" version of the 680x0.library because the asynchronous outsmarted several systems. - mmu.library: The chip ram is now by default marked as cacheinhibit imprecise nonserialized. This will speed up chip ram access a bit for the 68060 and 68040. Works of course only if the MMULib is used to setup the MMU tables, i.e. for users of the V40 68040 lib. Video RAM of several graphics cards can be setup in the same way as well, but since there's no way to identify expansion hardware as video ram, you've to do that manually. - mmu.library: The F-Space is now by default marked as cacheinhibit to allow (IMHO misdesigned) hardware to map in here without telling the system. This can be disabled by using the MMU-Configuration file. - Added a new MuTool: MuFastChip. This tool will enable the imprecise or nonserialized cache mode for chip memory and will hence improve chip memory access performance for systems where a third-party 040 or 060 library does not setup the MMU tables in the optimal way. The MMU.library (and hence the V40 68040.lib) *will* build its own MMU tables with this feature enabled anyhow if it doesn't find an MMU table to start from. - Fixed the SetPatch fix. (You kept the original, right? :-) It might have been that the 43.7 edition installed a fix for the mathieeesingbas.library even if this fix is unnecessary and fatal, as it is for the 68881/68882 FPU. Release 0.44 -------------- - mmu.library: The "AddMem" command in the MMU-Configuration file was broken. Added the memory twice, causing nothing but a mess. - Added a safety check for "AddMem", the command is now ignored in case the memory in question is already added. - "SetCacheMode" argument "valid" was broken and did not validate the memory at all. - AddMem'd memory was added after the MMU table setup, hence wasn't used for the MMU descriptors. The library *tries now* to add it as soon as possible to make some use of it for building the MMU trees. - MuFastZero: The FORCENATIVE option generated a failure code in case the zero page wasn't remapped, stopping additional options like MOVESSP from working. - MuGuardianAngel: The "MemHeader free counter incorrect" error handler did not save back one register and hence caused additional hits. - MuGuardianAngel: Ooops, found a problem of the RAM-Handler. Not a MuGuardianAngel problem, but a real design fault of RAM: DO NOT try to delete and write to the RAM: disk at the same time, this will cause lots of trouble. - Included a fix for the CBM mathieeedoubbas.library 38.2. This library fails to compare floating point numbers below zero correctly in some cases. The P5 library patches mathieeedoubbas to fix this, but the 68040.library should not be a replacement for SetPatch. To apply the patch, 1) Copy the file LIBS:mathieeedoubbas.library to RAM: 2) Copy the file mathieeedoubbas.pch in the directory "Fixes" to RAM: 3) Copy the "spatch" program at the same place to RAM: 4) Change the directory to ram: with "cd RAM:" 5) Apply the patch with "spatch mathieeedoubbas.library" 6) Copy the file RAM:mathieeedoubbas.new to LIBS:mathieeedoubbas.library. It contains the fixed library. - In case the V40 68040.library slowed your computer down: copy the file "MMU-Configuration" from the "ENVARC" drawer into "ENVARC:". In case this causes crashes with Z-II memory, follow the instructions in the file and remove one semicolon in front of the "SetCacheMode" command. - Removed the debugging information from all files. - Added the MMU master guide. Please check this, is this understand- able? In case I forgot to mention you in the credits, please let me know! - Moved all libraries to a separate directory, "Libs" - Included a new library, the 680x0.library. This is the CPU unspecific CPU driver. It's job is to detect which CPU is avail- able in your system, and to load the CPU specific code. It there- fore acts very much like the P5 68040dummy.library, except that it remains in the system and provides user-callable function entries for querying the CPU/FPU/MMU type and to setup the FPU exceptions. The CPU specific library *should never be called directly*, this library will re-route the calls to the correct library. Furthermore, it loads the library in background, helping to speed up the boot process a bit. - A special edition of SetPatch is available that loads the 680x0 library instead the 68040.library, regardless of which processor is available. The 680x0.library will then even try to load an 68000.library or 68020.library. This library could be used, for example, to install line-F instructions to emulate the FPU completely in software, even for a 68020 or 68000 without FPU. To patch "SetPatch", 0) Keep a copy of SetPatch in a safe place. 1) Copy the file C:SetPatch to RAM: 2) Copy the file SetPatch.pch in the directory "Fixes" to RAM: 3) Copy the "spatch" program at the same place to RAM: 4) Change the directory to ram: with "cd RAM:" 5) Apply the patch with "spatch SetPatch" 6) Copy the file RAM:SetPatch.new to C:SetPatch. This is the inofficial 43.7 edition of SetPatch. - Included a new program, "FPU" in the "Shell only" drawer. This program controls the exception generation of the FPU. It will only work with the 680x0.library and the V40 68040.library installed. Release 0.42 -------------- - 68040.library: Only cosmetic changes. Added a AN_Zombie guru in case the ColdReboot() function returned. I've no idea how this could happen. - mmu.library: I don't thrust the AFF_68060 flag any more. The 68060.library of the LC75 Apollo board does not set this bit correctly and hence identifies the 060 as 040. Hence, the library tried to install the wrong driver and crashed desparately. The library tries now to identify an 060 in case at least an 040 is indicated. The library updates then its own AttFlags copy correctly. Outch! I don't know whether this is a typo in the sources of the 68060.lib, or this intended and something "sneaky" I fail to understand. - Fixed one bug in the disassembler.library. It failed to disassemble 64 bit arithmetics correctly. - MuFastRom: In case no argument is given, the program uses now the default "On". - MuFastZero: Again, made "On" the default argument. Added the "MoveSSP" and "StackSize" arguments to relocate the supervisor stack to fast ram. This does not make use of the MMU. - Added the "CheckFPU" command, in the "Shell_Only" drawer. This program prints the version number of a 68040 FPU if one is avail- able. Two versions exist, the V40 "original" which is very buggy and the V41 "revised" with less bugs. The 68040.library supports currently both, with lots of workarounds for the V40. Please contact me in case you find a V40 edition in your Amiga. Release 0.41 -------------- - Forgot to update the version number in 0.40. Reported 0.38. Oops. - TTx parsing was still not 100% correct, but much better. Fixed. - Due to a typo, branch cache flushes were effectively disabled. Outch! Forgot one single "$". - Added branch cache flushes on context switches, recommended by Motorola. - Added includes, autodocs and .fd files for the 68040.library. - Updated MuFastZero and MuFastROM to include and set the cache flags according to the mirrored RAM. This is of importance in case non-cacheable Z-II fast RAM is used to build the mirror. - Made mild modifications to the FPSP FPU emulator package to speed it up a bit. The 40.1 release is now unnoticably faster than the Mike Sinz 37.30 release, which is again unnoticably faster than the P5 release. - Added a workaround in GetMsg() to keep some brain-dead programs working that call GetMsg() in a tight loop without giving interrupts a chance to occur. These programs tend to block the computer completely, especially if the ROM is remapped to cacheable, burstable memory. The workaround is a single NOP. Release 0.40 -------------- New in this release: - Added four internal undocumented LVOs for external CPU drivers. - Fixed a bug in the CPU detection routine. A 060 EC or LC was not recognized. Outch! Which smart guy at Motorola decided to use the same processor ID for both products? The EC doesn't have a MMU, the LC - as for example used by the LC75 Apollo board - does. This might well explain a lot of problems of the Apollo board.... - Fixed a bug in the library init routine which would cause a guru in case no MMU is available at all. The library MUST load, and some functions will be available even without an MMU. - Fixed several minor bugs of the TTx parsing routine, hopefully correcting problems with some ancient 040 library releases that didn't make use of the MMU (how should that work?) - Fixed a serious bug of the Alert() replacement function, the stack was used plain wrong. Thanks Etienne! - Included an updated and more streamlined version of MuLockLib, thanks to Gunther Nikl for providing it. - Updated MuSetCacheMode, added more options. - Added a configuration/preferences file and a preferences file parser. - Included now the "stripped" versions of the libraries in a sub- directory of the same name. These editons don't contain the de- bugging information and are therefore shorter. - *News flash* This release comes with an upgraded version of the 68040.library. This library is still in "beta" stage, but makes already use of the mmu.library for the MMU configuration. It is for that reason even shorter than the 37.30 release, even though it uses the latest 68040 FPU emulation code from Motorola. FPU exceptions are configurable thru an LVO vector of the library, but I haven't written a control tool yet. This will follow in the next distribution. This release *will only work* if the 37.30 runs on your machine, you should, however, edit the ENVARC:MMU-Configuration file to to make some P5 boards working. The file should contain this line: SetCacheMode from 0x00f00000 size 0x00080000 valid iospace If you use this edition of the 68040.library, it might disable caches for the Z-II address space completely. If this is not desired, you may turn them on again with the following line in the MMU-configuration file: ClearTTX The path of the preferences file is ENV:MMU-Configuration or ENVARC:MMU-Configuration if the first file is not found. The file looks like a standard shell script except that only three commands are known. All other commands are ignored silently for forwards compatibility, more might be made available in the future. The semicolon is used to separate comments from the commands, the text following a semicolon is ignored. Release 0.38 -------------- New in this release: - Added four internal undocumented LVOs for external CPU drivers. - Fixed a bug in the CPU detection routine. A 060 EC or LC was not recognized. Outch! Which smart guy at Motorola decided to use the same processor ID for both products? The EC doesn't have a MMU, the LC - as for example used by the LC75 Apollo board - does. This might well explain a lot of problems of the Apollo board.... - Fixed a bug in the library init routine which would cause a guru in case no MMU is available at all. The library MUST load, and some functions will be available even without an MMU. - Fixed several minor bugs of the TTx parsing routine, hopefully correcting problems with some ancient 040 library releases that didn't make use of the MMU (how should that work?) - Fixed a serious bug of the Alert() replacement function, the stack was used plain wrong. Thanks Etienne! - Included an updated and more streamlined version of MuLockLib, thanks to Gunther Nikl for providing it. Release 0.37 -------------- New in this release: - Added two tags for Get/SetContextData in preparation for the memory library. - Wrote a replacement AddMemList() function because some versions of the 68040/68060.library functions patch this function. This release will adjust the MMU tables for the DEFAULT CONTEXT only, which means that all memory must be ready AT LEAST AS SOON AS A PRIVATE CONTEXT IS CREATED. In case you've problems with this library release: o) Please install the mmu.library_debug ON TOP of the mmu.library, i.e. use copy mmu.library_debug to LIBS:mmu.library o) Reset the system o) Run Sushi or Sashimi to fetch the output. Give them a HUGE buffer o) Load the library. MuLockLib would do that, for example. Release 0.36 -------------- News in this release: - Fixed MuMove4K, added the A1200 option and fixed the shutdown code. - Fixed MuLockLib, there was a slight chance for a crash (thanks to Gunther Nikl for reporting) - Fixed the .fd-File. I forgot to include two functions making the table useless, and forgot to include one library function in the library lvo jump table. Outch! - Fixed the new memory map functions. - Tested indirect descriptor functions, included a new test, see MuIndirectTest. I'm planning to upload the 0.36 to the Aminet next saturday, I won't be in town from July 18th to August 8th. Release 0.35 ------------- News in this release: Something in the library, even though no real serious bugs have been found. More functions, but more power- ful debugging tools. - Added support functions for memory maps, likely untested. - Added support functions for indirect descriptors and *VERY FAST* indirect page swapping. - Fixed a tiny bug in the 060 support which might have failed to detect physical bus errors correctly. - Fixed a bug in GetPageProperties which might have failed to read remapped memory correctly. - Streamlined the tag item parse functions. - Updated documentation and includes. - Wrote the disassembler.library, added to the distribution. - Updated MuForce: The program makes use of the disassembler.library and prints now a disassembly of the faulty code on demand. - Fixed a bug in MuGuardianAngel, stack dump was broken. - Updated MuGuardianAngel, included disassembly function. - Updated MuMove4K a lot, included a PREPAREEMUL function, wrote a better guide, drew a shell icon. - Included more shell tools, PrintBusError, ResetBusError and ClearTTx. The Apollo LC060 75Mhz showed problems with the mmu.library. I don't know how these problems arose, but it might be that the MMU doesn't like the over- clocking. To test this, please run the "ClearTTx" program with the NATIVE Apollo setup and check whether this works or not. The PrintBusError tool will dump the bus error vector. It should always point to the library. The ResetBusError will repair the bus error vector in case it was messed up by a program. It should be run WITHOUT an active debugger, or the result will be worse, not better. An application for this program is to restore the correct bus error handler after having used the "SoftBoot" program or "SetCPU FastROM" or "CPU FastROM". Note that the latter two are obsolete and replaced by MuFastROM. Release 0.34.1 -------------- I'm pretty happy with the 0.34 how it is now, I haven't found new bugs. This doesn't mean there are none, though. (-; New in this release: - Updated MuGuardianAngel a bit. The "hit" messages are now more informative and contain more detailed information about the cause of the hit, as for example which memory chunk was released etc... Thanks to Simon for the hint. - Added a new program "MuLink" to the MuTools. This is a shell-only developer tool for automatic "self-protection" of software. A program that gets "MuLink'd" will get its code (or other selected) segments automatically write protected. This is most important for software that has to run on critical systems, as BBS's and the like. MuLink is a post-processing tool much like ATOM. More about this tool in its documentation. - Added a "MuGuardianOff" icon. - Updated the documentation. - Included E developer files, thanks to Daniel Kasmeroglu. Remaining problems: - The usual ppc.library problem. Not about to be fixed. - The library still refuses to work correctly on an Appollo 75Mhz 060EC board, I don't know why. TTx setup of this board is now supported correctly, but this doesn't seem to help. Wierd. Release 0.34 ------------ Sigh, the 0.33 DMA logic was still buggy.... - Fixed (another) bug in CachePostDMA(). The routine failed to check the CPU AttnFlags correctly and hence did not restore the cache mode to copyback. This could have been resulted in slowdown of your machine, and hands of several MuTools. - Removed all references to the 68040 and 68060.library. This will allow a possible future 680x0 library to use the mmu.library to build its MMU tree instead of implementing this function a second time. I M P O R T A N T: THIS MEANS THAT ALL THE MUTOOLS *MUST* BE RUN A F T E R SetPatch. The only exception to this rule is MuMove4K. Please DO NOT run the MMURemapTest with the cybscsi or cybppc.device. Both devices are not designed to allow memory remapping (not my fault). In worst case, they will trash your hard disk!!! Thanks goes to Ulrich Falke for helping me to find these bugs, and furthermore to Michaela Prüß for supplying the includes and protos for the vbcc compiler! Release 0.33 ------------ Outch, the 0.30 was buggy! - Fixed a bug in the GetPageProperties() routine for the 030 and 020 support code. The cache control functions overwrote an important CPU register and therefore crashed MuForce. - Fixed a bug in the DMA control logic. Outch! This really broke things! - Fixed a bug in the MMU table rounding logic. Fixed one overflow problem that makes the procedure hang on some machines. Additionally, I forgot to merge adjacent property nodes here. - I must have been crazy to remove the PROTECT option in MuFastROM. Fixed! - MuFastZero OFF improved, and the FORCENATIVE flag was broken completely. - MuGuardianAngel showed a few bogus exceptions on startup, depends on the system configuration. TRSaferPatches caused this, fixed. - Added the FixCybAccess workaround. It fixes - or actually works around - a really bad design fault of the cybscsi.device. More on this in its readme. - Changed the SegTracker output style of MuForce and MuGuardianAngel to the Enforcer style. This is most useful for tools interpreting these lines. Thanks to all the nice folks that reported bugs, and sorry for the inconvenience about all the bugs. This distribution contains again a "mmu.library_debug". In case you encounter problems, please rename this to "mmu.library", install "Sushi" or "Sashimi" with a *LARGE* I/O buffer and run the tests again. Alternatively, connect a terminal to the serial port, 9600 baud, 8 bit, 1 stop bit, no parity. Please collect the output and sent it to my email address. This will help me a lot debugging the library. -----> When reporting bugs, PLEASE PLEASE let me know: o) About which version of the library you're running. I might have sent some of you an updated version. o) About which processor your system is running on. o) A MuScan output. o) Which SCSI/IDE device you're using. In case you see a crash: o) Please write down the guru number. o) Try to reproduce the crash, try to find out which program causes the crash. This means that you should try to edit your startup sequence and to remove patches from there until the crash disappears. You don't need to strip the startup-sequence permanently, but just to let me know which program causes the incompatibility. Please understand that a "It won't work on my computer" doesn't help me much to fix the problem. Try to be as concrete as possible, this will increase the propability enourmously that bugs get fixed. (-; A special note about the 0.3x releases: I introduced a new guru, namely "AN_PostSetup 0x3e000015". In case you see this specific guru, let me know which program caused this. A special note about MuGuardianAngel: This program is NOT compatible with PoolMem. Try not to install PoolMem on top of this, this won't work. MuGuardianAngel will be smart enough to cancel PoolMem if it is running, but it is not smart enough to prevent its installation. A special note about "version" and related utilities aka "verscheck": These tools OPEN the libraries in question. Hence, if you run "version" on a - possibly existant - 68040old.library, it will open this library and re-install a MMU table on top of the already loaded table. Either do not try this or remove the 68040new.library and the 68040old.library from your LIBS: drawer. A special note about "MMUCacheTest": If this program hangs on your system, please report this. Furthermore, please run it *AGAIN*, but this time with the "NOMMU" option on the command line and *WITHOUT ANY* tools that require the mmu.library. It would be best to boot without startup-sequence, run "SetPatch" by hand and then immediately "MMUCacheTest DH0: nommu". Release 0.30 ------------ Ouh, just too many changes to mention: - Added tags to setup the MMU table layout, as the page size, the depth of the MMU tree. - Added functions to get and set some control values of the MMU contexts. - Added page access exception handler. - CachePre/PostDMA patches are now always installed since 68020 and 68030 based systems need the logical -> physical trans- lation as well. - Reworked the mmu.library memory management. - Fixed several bugs in the MuForce program, did not handle ROM remapping correctly. - MuFastRom and MuFastZero reworked a bit. MuFastZero OFF did not work. Added more options for both tools. - Added a new debugging tool: MuGuardianAngel. Some sort of memory protection that keeps free memory from getting over- written by faulty programs. - Added more options to MuSetCacheMode. - MuMove4K moves now the lowest 32K (and is hence misnamed). This avoid trouble with large MMU table sizes on 68030/68020 based systems and pre-allocates memory for an "oxypatcher" type tool. - Added MuLockLib tool, check the readme. - .... Release 0.27 ------------ - Fixed a bug in the task scheldurer. - Added a second explicit cache flush for ColdReboot() - Fixed a bug in the branch cache flush of the '060... Sorry! - Tested the library for public remapped memory... Works! - Tested the library for private MMU trees... Works! - Since the 0.27 works now within its specifications, this will be the last 0.2x release. We're going to 0.30 now. Release 0.26 ------------ - Fixed a bug in the exception handling, forgot to restore a6. - Fixed the return value of RebuildTree(). It's now TRUE on success, not DOSTRUE. - Fixed a bug in the table builder, merged sub-tree were released incorrectly. - Added the WithoutMMU() LVO entry. - Removed the AllocLineMem() LVO, this one was useless. Release 0.25 ------------ - Debugged 060 exception handler again. Found only one bug, ROM emulation was broken. - Enhanced AbsExecBase accesses - does no longer block interrupts unnecessary. - Fixed parts of the exception handler to read the faulty instruction from the correct function code space. - Added a complicated test for the EC030 processor that should finally work. - Enabled the MMULib internal exception handler test. - Removed all accesses to the ppc.library and reserved entries. PPC.lib compatibility is no longer an issue for me. The MMU.lib is WarpOs-compatible, though, as long as the system isn't infected by Ralph's "software". - Added a safety test in the MMUCacheTest program to avoid hangs. Release 0.24 ------------ - Fixed the 030/851 exception handler, especially the emulation of instruction access of a possibly invalidated zero page, now really, *BIG* thanks to Dave! - MuForce does no longer ignore a remapped ROM. (Oops!) - MuForce does no longer touch the mapping of the fspace unless told to do so. - Fixed the assembler includes and autodocs, thanks to Tilman! - The context management of the library does no longer reset the remap destination in case the memory remap flag is not included in the mask settings. (Oops!) - Fixed the MMU table builder for MMU tables using more than 32K entries. - The startup code selects now a better page layout for 030/851 processors. - MuForce tries now to re-use an already relocated vector base if possible. - Tiny speedup in the "InstallDescriptor" routine could speed up MMU table building. There's room for more speedups, though. - Added a "nommu" flag for the MMUCacheTest program to check your HD without the mmu.library. If this flag is used, the program *MUST* be run without the mmu.library currently loaded. Related fixes of COP (release 1.73, not included in this distribution): - Fixed emulation of instruction access to the zero-page. - Fixed the RestoreVBR option. - Fixed the MMU disable mechanism on startup. Special thanks goes to Dave "Ragman" for finding a lot of bugs in the 0.21 release. ----------------------------------------------------------------------------- Compatibility warnings and bad software: - The MMU tables generated by the "CPU FastROM" command, an official CBM tool, are simply wrong if run on a 030 processor. Chip memory is marked as "cacheable", which is plain wrong. Already spoke to Michael Sinz who agrees in that point. Don't use it, run "MuFastRom" instead. - The MMU tables build by "SetCPU FastRom" are not very well suited for MuForce. The MMU library will replace the table layout by something more adapted. Since these programs may install a "bogus" exception vector, you shouldn't run both programs with the "FastROM" option. If you absolutely want to do, run them *before* installing any MMU.lib related program and COP - remember, you have been warned. "MuFastROM" will do better anyhow. - CMQ060.lha from the Aminet: This program uses the MOVE16 instruction to "speed up" the copy mem routines of the Os. Besides that the speedup is minimal, you should be informed that this instruction is not fully supported by the Amiga hardware. A MOVE16 into the chip memory could yield to "strange and wonderful things", and may or may not work. Its burst accesses simply don't fit into the DMA access mechanism of the Amiga custom chips. (Note that no other instruction will try burst accesses into non-cacheable memory!) Moreover, due to a firmware bug of the '040, a MOVE16 on a system using virtual memory might be unreliable and cause undesired side effects. Do not run this program! MOVE16 is one of the non-supported instructions in an Amiga system, others are TAS, CAS and CAS2 (which are of little use in a single processor system). For more detailed information of MOVE16, check either the enforcer.guide or the motorola documentation, I'm not making this up, and this is not mmu.library related. Known Bugs: ----------- The MMU table manager rebuilds currently the MMU tables for a complete memory block even if only a minor sub-block was changed. Therefore, it may take longer to build the MMU table than absolutely required. I decided not to change this behaiviour because it keeps the mmu tables clean and optimized and avoids fragmentation. The MMU library builds currently 68030 MMU tables with the REPAIRABLE flag set less efficient than it could. However, it was felt that a consistent table layout is more helpful than the (minimal) speedup. The library does not yet contain a workaround for a 040 firmware bug: If an illegal, line A, chk or unimplemented floating point instruction is located at the last 16 bits of a page and the next page is not available, the 040 generates an access fault instead of the proper exception. The fault address is the address of the missing page, and the PC points to the instruction in the preceeding page. This doesn't matter too much currently, it might become relevant in a VM system. These bugs will be fixed within the next releases of the library, including all the other bugs you may find. ----------------------------------------------------------------------------- Special thanks goes to: -Ralph Babel for giving information about the CachePreDMA/CachePostDMA functions and for some internals allowing me to write the MuOmniSCSIPatch. -Carsten Schlote for starting development of a mmu.library aware 68060.lib. -Michael Sinz (a real BIG thank you!) for discussing a lot of details of CachePreDMA/CachePostDMA, for sending me the sources of these functions in his 68040, and especially - and that's really great - for making the Enforcer sources available and for allowing me to reuse the exception handler of the Enforcer. This will happen in one of the next releases. -Bjoern Schmidt for allowing me to run some tests on his 060 and for keeping several afternoons free for me. -All the testers for running tests and sending me detailed information about their systems. Thank you to all of you, this project won't clearly possible without your support! ----------------------------------------------------------------------------- What is this: ------------- The mmu.library provides functions for MMU related operations as write- or read-protecting certain areas of memory for a given set of tasks, or marking memory regions as "swapped" virtual memory support. It offers an abstraction level on top of the actual MMU and a unified interface for MMU purposes. The MMU lib does NOT implement virtual memory, that's the purpose of another library - the memory.library. There's no much reason why any application except the memory.library and probably some debugging tools should call this library directly. The memory.library functions on top of this library should suffer for "all day purposes". The goal of the mmu.library is to provide an "abstraction layer" on top of the hardware, to allow programs to make use of the memory management hardware of the more advanced members of the MC68K processor family. Programs using the functions of the mmu.library do not need to modify the MMU tables directly and hence will not conflict with each other. The mmu.library interface provides all necessary functions to do that. This will allow programs like Enforcer and VMM to cooperate nicely with each other, provided both use this library. Known bugs and problems of this implementation: ----------------------------------------------- Things that require testing: - TTx register parsing updated, again. Should work fine with all the printouts I've collected, but you may still want to test it. - 68851 code likely untested, but I'm getting better. I NEED YOUR HELP! - GetPageProperties/SetPageProperties are likely tested by the MuGuardianAngel program. - Page access exception handlers only likely tested by MuGuardianAngel. Things not yet implemented: - Patches for ppc libraries due to missing support. The ppc.library will remain unsupported, if you're the owner of a PPC board, run WarpOs, which is compatible. Things the current design does not allow: - The MAPP_USED and MAPP_MODIFIED flags are not kept consistent by the library except for MAPP_SINGLE pages. I consider this as a minor problem since single page mode is required for virtual memory anyways. - MMU tables using the function codes. The amiga design shouldn't allow this anyways, but I don't know whether there's a board that makes use of them. (Doesn't look like, though). - Boards with two different MMU's on board. I've heard some rumours that there are actually 68040 boards with an additional 68851. Recommended reading: -------------------- The following books are recommended reading: Motorola 68030 Enhanced 32-bit Microprocessor User's Manual MC68030UM/AD Rev.3 Motorola 68040 User's Manual M68040UM/AD Rev.1 Motorola 68060 User's Manual M68060UM/AD Rev.1 Motorola M68000 Family Programmer's Reference Manual M68000PM/AD Rev.1 Amiga Hardware Reference Manual, 3rd ed. Addison-Wesley Publishing Company, Inc. ISBN 0-201-56776-8 Amiga ROM Kernal Reference Manual, 3rd ed., Volume "Libraries" Addison-Wesley Publising Company, Inc. ISBN 0-201-56774-1 The Amiga Guru Book, 2nd Ed. Ralph Babel, Taunusstein 1989,1993 Additional sources: The Amiga Developer CD V1.1 The Enforcer.guide. Michael Sinz's documentation in the AmigaMail, on the DevCD 1.1. Final words: ------------ The mmu.library and the memory.library will be my last project for the Amiga. It depends a bit on what happens with the Amiga in the next two years whether a PPC version of this library is required or not; hence, after all, this can't be much more than a toy project that came several years too late. So long, Thomas