The mmu.library project © 1998-2000 the mmu.library development group, THOR ----------------------------------------------------------------------------- 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. The following three commands are available: ClearTTX ITT0/S,ITT1/S,DTT0=TT0/S,DTT1=TT1/S,ALL/S Controls the mmu.library use of the transparent translation registers. By default, they are considered, their setup is added to the MMU tree layout and they are cleared afterwards. Using this command, several TTx registers can be made to be ignored (even though they are still cleared because they are "in the way") ITT0 Ignore the instruction transparent translation register 0. (68040 and 68060 only). ITT1 Ignore ITT1 (68040 and 68060 only). DTT0 Ignore the data transparent translation register number 0 (68040 and 68060) or the transparent translation register 0 (68030). DTT1 Ignore DTT1 (68040 and 68060) or TT1 (68030) DTT0 Ignore DTT0 ALL Ignore all TTx registers. This is the default if no other options are given. This command does nothing on a 68851 because this MMU doesn't offer transparent translation registers at all. AddMem FROM=ADDRESS/A,LENGTH=SIZE/A,ATTR=FLAGS/K,PRI/K,NAME/K Adds memory to the exec memory pool. Note that THIS DOES NOT make the memory available, i.e. it is NOT AUTOMATICALLY marked as "valid". Hence, an "AddMem" command requires most likely a "SetCacheMode" for the same memory region or the library will crash on startup. FROM=ADDRESS Base address of the memory to be added. in hex notation. A leading $ or 0x is allowed. This address must be aligned to a 64K boundary. LENGTH=SIZE Size of the memory to be added in bytes, in hex. Again, must be divisible by 64K. ATTR=FLAGS Memory attribute flags in hex. Defaults to 0x05 which is MEMF_PUBLIC|MEMF_FAST. More flags are documented in exec/memory.h. The library *does not* know the nmemonics for the memory types, though. PRI Priority of the memory pool to be added, in decimal notation. This must be a number between -128 and 127. Defaults to six. NAME Name of the memory pool. Defaults to "MMU expansion memory". Again, this command *does not* make the memory available for the processor, an additional "SetCacheMode" is required. SetCacheMode FROM=ADDRESS/A,LENGTH=SIZE/A, COPYBACK/S,WRITETHROUGH/S,CACHEINHIBIT/S, NONSERIAL/S,IMPRECISE/S, VALID/S,BLANK/S, IO=IOSPACE/S,NOIO=NOIOSPACE/S, ROM/S,NOROM/S This is a "cut down" version of the "MuSetCacheMode" command, it supports a sub-set of its cache control commands. Options that modify memory in a way that could result in access errors are not supported and must be setup by hand with "MuSetCacheMode". FROM=ADDRESS The base address of the memory region whose cache mode shall be changed. This is in hex notation, a leading 0x or $ is allowed. The library will round this down to the next page size boundary, which is usually 4K or 1K. LENGTH=SIZE The size of the memory region in bytes, in hex notation. The library will round this up to the next page size if required. COPYBACK Enables the copyback cache mode. This is the fastest cache mode available, reads and writes are cached if the CPU allows this. This option will fall back to WRITETHROUGH on a 68030 or 68851. WRITETHROUGH Enables the writethrough cache mode. Reads will be cached, writes will enter the cache but will be written out to memory as well. CACHEINHIBIT Disables the cache completely. NONSERIAL Disables the cache, but allows the CPU to reorganize accesses to speed up memory transfers a bit. (68040 only, does nothing on all others). IMPRECISE Disables the cache, but allows the CPU to handle access errors a bit "sloppy" to speed up access a bit. (68060 only, does nothing on all others). VALID Validates the memory region, i.e. makes it available. This option is required to enable a memory region that should be added to the exec memory pool by the "AddMem" command. BLANK Invalidates the memory region, all accesses will be remapped to a "dummy" page. IO=IOSPACE Marks the memory region as mapped IO space, and sets the cache mode to CACHEINHIBIT. The cache mode can be overridden by using the cache control options. This is a pure software flag which is, however, used by MuForce and friends. Memory marked as IOSPACE is never disassembled or dumped because of undesireable side effects that might result. NOIO=NOIOSPACE Marks the memory as plain RAM space, negative form of IO=IOSPACE. ROM Marks the memory as ROM space and enables the defensive write protection. Writes to this area will be ignored silently. NOROM Marks the memory as RAM space, writes are allowed. Negative form of NOROM. For example, to add non-autoconfiguring fast cacheable memory from 0x02000000 to 0x03ffffff, setup your "MMU-Configuration" as follows: SetCacheMode from 0x02000000 size 0x01000000 valid copyback AddMem from 0x02000000 size 0x01000000 -- To disable the cache of autoconfiguring Zorro-II memory, as required by some 040 and 060 based boards that can't break up burst accesses into 16-bit Z-II accesses: SetCacheMode from 0x00200000 size 0x00800000 cacheinhibit The GVP Combo 040 is an example for a board requiring this "adjustment". -- To mark non-autoconfiguring hardware in the F-Space as "IO space": SetCacheMode from 0x00f00000 size 0x00080000 iospace Most P5 boards suffer from this design problem. 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 once the library is finished. - 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, if a MOVE16 crashes, the mmu.library is out of buisiness, it will simply guru. 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. The library does not provide the MOVE16 instruction of the '040 and '060. See above for details. It does not work around the MOVE16 firmware bug causing loss of cached data on MOVE16's into invalid memory, and it reacts with a guru in case a MOVE16 generates an access fault. 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. Since writing the mmu.library is a tough job, I need your help! Currently, only two systems are available right here, a MC68030 40Mhz ad a MC68040 33Mhz. While this is better than before, I still need your help since the library is supposed to support all members of the MC68K family (the 68851, 68040 and 68060 MMUs). Since I don't have all these systems available, I need your help - writing system software without being able to debug is "a bit" tricky. What can I do as a non-developer: --------------------------------- Testing! Check the documentation of the programs within the documentation, especially what you find the "MuTools" drawer, and lemme know how it goes. More shell-based tests are in the "Shell_Only" drawer: I) First test -------------- Please run the MMUCacheTest program, too. It takes one argument, the name of a hard disk. Don't worry, it won't harm your HD, it will simply read sectors from it to test some critical MMU.library functions. Please perform this test with as many "disk-like" devices as you can, i.e. hard disks, CD Roms, SCSI and IDE devices of various kinds. Here's an example run: 1.SYS:> MMUCacheTest DH0: MMUCacheTest 0.25 (14.03.99) © THOR. Internal use only, no commercial use. Initial read, calculate checksum. Running the initial device test. This test checks whether the connected device works reliable. It does NOT check the MMU code which is not needed for this initial run. This test SHOULD NOT fail. In case it does, your device or host adapter is broken, but not the MMU logic. The initial test passed. Running the real test. If this test fails, something is wrong with the CachePreDMA/CachePostDMA logic. In this case, please sent me an EMail so I can fix it. The MMU cache test passed. Run 165329 RAM accesses. In case any of the tests fail, or you see crashes, please let me know. THIS IS AN IMPORTANT TEST. If anything fails here, the future mmu.library might trash disk input. If the tests pass, check the number of RAM accesses shown in the last line of the output. This number *should* be larger than zero. If it's not, then the test did effectively nothing. Please let me know in this case either, I'll try to invent a more effective test in this case. II) Second test --------------- Please run the MuContextTest program. It should not crash, but should output the following: 8.VIF:MMULib> Shell_Only/MuContextTest A silly test. A silly test. B silly test. C silly test. D silly test. E silly test. F silly test. G silly test. H silly test. I silly test. J silly test. This test checks whether the library context switch routine works correctly. This is most important for the 68020/68851 since it is most sophisticated for this hardware configuration. III) Third test --------------- Please run this test LAST since it can't be aborted. The program is run with one parameter, the name of a temporary file. Please DO NOT use a file on the RAM or RAD since this won't test much, and DO NOT use the floppy drives for the same reason. The optimal choice is an external medium like a ZIP or a JAZ drive. This test checks mainly the device driver of your hard- disk whether it is written MMU conformal or not. Users of the omniscsi.device (the Guru ROM) should install the "MuOmniSCSIPatch" or the answer will be "No". Please run the test as follows: 1.SYS:> MuRemapTest SYS:TempFile The program will print the result on the screen. If this test succeeds, the program will attempt to remap free exec memory to a new position and builds a new memory pool. This memory will therefore have different physical and logical addresses. Please try now whether your system remains stable, but do not yet run MuGuardianAngel as it does not yet support memory remapping. The program can't be aborted since the remapped memory can't be released if parts of it got allocated. What can I do as developer: --------------------------- I'm still willing to give away the sources of the library, provided that a) you keep them private and don't give them away (really!) b) you help me debugging the library by using them. They are no longer included in the "standard" distribution because that would enlarge the archive unnecessary for most testers. In case you're interested, just sent me a note. Under the same restrictions, the MuGuardianAngel sources are available. What about joining the mmu.library development group? This is just a couple of people contributing to this library by writing code and exchanging their wisdom by EMail. It's a non-profit organization that works on the development of this library. If, whenever, this library becomes a commercial product, you'll get paid, of course. However, the current library, as it is, is planned to be freeware, so don't expect money. It doesn't look like there's currently a market for this library project, unfortunately. Contact me at thor@math.tu-berlin.de if you want to join this group. What can be done just now is to run this library on your machine and find and correct bugs. As I said, I haven't tested the 68851 and the 68060 parts at all. You might also want to develop software for the library. You find the required includes and autodocs within this archive, as well as example sources. In case you need support, just contact me. There are a lot of library functions that require a bit more testing: - All the functions that bypass the abstraction layer: GetPageProperties(),SetPageProperties(),PhysicalPageLocation() - Remapping of memory and adding this memory to the exec memory pool. - Building private contexts and swaps of the MMU tables on task swaps. - SWITCH and LAUNCH type exception handlers. I haven't been able yet to run all required tests, sorry. What is in this distribution: ----------------------------- Autodocs: The preliminary version of the autodocs of the mmu.library and the memory library, as well as a file describing some planned implementation details. Include: The includes for a C compiler as well as the ".fd" file for the library functions written so far. C_Sources: C sources of sample programs. All programs that are distributed under the THOR-Software licence are published here. The sources of MuForce *are not* available because they are partially copyrighted by Michael Sinz. MuTools: Contains an increasing collection of programs that make use of the MMU. For details, check their guides in this drawer. Shell_Only: A couple of programs that can be run from the shell only, as there are: MMUCacheTest: Reads from HD, partially non-cache aligned to check whether boundary pages of the DMA buffer are correctly marked as non- cacheable. See above for how the test looks like. SCSIDMATest: Checks whether the hard disk driver uses CachePreDMA/CachePostDMA consistently. See above for the test. The source is included. TestMMU: This program is purely for debugging purposes. If you run it, you won't see any specific action. It simply opens the library manually and executes the library init function in the task context of the calling program. Hence, this program can be used to step thru the lib-init function with a standard debugger without the need to catch "ramlib". If you still discover bugs and want to try, then load this program into a debugger of your choice, and step thru it. PrintTTX: Prints the transparent translation registers, without using the library. Sometimes required by me if the library fails completely. ClearTTX: Clears the TTx registers. This is a test whether a certain board making use of an overclocked LC060 runs with a pure MMU setup. PrintBusError: Prints the location of the access error handler. This should point to the library in case it is installed. ResetBusError: Resets the bus error handler (! Not to be confused with the access error, this is something different if the library is running) to its system default. This tool MUST be run very early, with no debuggers active, or the bus error will be completely messed up. MuContextTest: Checks the MMU context switches by installing a task with a private context. The mmu.library has hence to switch between two different MMU tables. See above for details how to run this test. MuRemapTest: Checks support of remapped memory by device drivers and the remaining system. Must be run with a temporary file on the harddisk to be checked. THIS TEST WON'T RETURN! CheckFPU: This program prints the version number of a 68040 FPU if one is available. 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. 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. Debugging: ---------- Yes, that's a problem of its own. Obviously, the MMU library uses some "heavy magic" supervisor code which is not available for a standard monitor. Even though the DevPac "MonAm" is a nice and powerful debugger, it's not powerful enough for these tricks. There's currently - up to my knowledge - only one debugger that can do this for you, and that's my own... (-; Check the Aminet and my web-page for COP, then read the documentation. If, after reading, you STILL want to use it, you're the right guy for this job... (-; COP might be setup to load the symbols of the library, to help you a bit. The latest available version of COP is 1.73. Try to get the latest, if possible. 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