home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 581b.lha / MMU_EXPERT_v1.30 / MMUx.txt.pp / MMUx.txt
Text File  |  1991-11-06  |  15KB  |  371 lines

  1. *********************************************************************
  2. *                                                                   *
  3. *             THE MMU EXPERT VERSION 1.30  (1991-09-17)             *
  4. *                                                                   *
  5. *          (C) 1991 by RELOG RESEARCH, ZURICH/SWITZERLAND           *
  6. *                                                                   *
  7. *                        WRITTEN BY F.BÜRGEL                        *
  8. *                                                                   *
  9. *********************************************************************
  10.  
  11.  
  12.       J u s t   t o   m e n t i o n . . . 
  13. --------------------------------------------------------------------
  14. DISTRIBUTION:
  15. MMUx v1.30 is freely distributable. I wish to emphasize V1.30
  16. NOTE THAT THE AUTHOR MAY CHANGE THE STATUS OF LATER VERSIONS OF
  17. THE MMU EXPERT. Only this version is free.
  18.  
  19. DISCLAIMER:
  20. RELOG AG does not accept any responsibility for this program
  21. as to reliability, correctness etc.
  22. You use MMUx completely at your own risk.
  23.  
  24. CONTACT
  25. For questions, bug reports, ideas contact us at
  26.  
  27.          buergel@amiga.physik.unizh.ch
  28. or  BIX: hardwiz
  29.  
  30. Updates, new and other interesting tools will always first be
  31. available for anonymous FTP at amiga.physik.unizh.ch (130.60.80.80).
  32.  
  33.  
  34.  
  35.  
  36.       W h a t   i s   i t ?
  37. --------------------------------------------------------------------
  38. The MMU expert is the first in a series of MMU tools from RELOG.
  39. MMUx will from now on be upgraded step by step.
  40. The basic features of the current version are
  41.  
  42. - find the translation (logical-to-physical) for an address
  43. - display attributes associated with the translation
  44. - display information concerning the translation table such as
  45.   - addresses of descriptors responsible for translation
  46.   - levels, indexes, masks, block sizes encountered
  47. - scan fake translation tables for own experimenting
  48. - notify errors in translation tables
  49.  
  50. The next version will allow to change the page attributes.
  51.  
  52.  
  53.  
  54.       M M U x   I n s t r u c t i o n s
  55. --------------------------------------------------------------------
  56. To find the translation to a specific address enter
  57.  
  58.  MMUx -a n
  59.  
  60. where <n> is the address in either decimal or hex notation.
  61. Hex numbers are automagically recognized except in ambiguous cases.
  62. There, you must add the usual $ identifier.
  63. Examples:  MMUx -a fc0000  will translate $fc0000.
  64.            MMUx -a 100     will translate 100 or $64.
  65.            MMUx -a $100    will translate $100.
  66.  
  67. MMUx will display only the translation (physical address) and the
  68. page attributes. The page attributes are the qualities applied to the
  69. memory region that is translated. For example, you will find that
  70. SetCPU applies writeprotection to the KickStart image. More about
  71. page attributes later in this documentation.
  72.  
  73. VERBOSE OPERATION
  74. Using option v, you get a more verbose information output.
  75. Example:  MMUX -a 40a -v   will generate an output like the following
  76.  
  77. MMU logical space is 4GB, page size is 1kB.
  78. Translation: $40A, page address $400.
  79. Regular short format page descriptor at level C.
  80. Page attributes: Used,Modified,CacheInhibit.
  81. Inherited attr.: none.
  82. No function code lookup.
  83. Descriptor path: $284A60,$2847F0,$28A0E4
  84. Level path: (root),A,B,C
  85. Index path: $0,$0,$1
  86. Mask path:  $FF000000,$FC0000,$3FC00
  87. Blksize path: 24,18,10
  88.  
  89. In this example, _The Enforcer_ was switched on.
  90. What do these lines mean:
  91.  
  92. The LOGICAL SPACE is the space the user and all application software
  93. sees. Without the MMU, this space is 16MB on every 68000 and 4GB
  94. on the 020/030 except if hardware restricts it by cutting some of
  95. the high order address lines. The MMU however allows to cut this
  96. space down, for example, to emulate the address space of the 68000.
  97. SetCPU for example, limits the address space to 16MB. Any access
  98. to higher addresses will result in an access to the same 16MB
  99. address space as if the high order address bits were ignored.
  100. This is necessary in order to prevent software that has '32bit bugs'
  101. from crashing.
  102. The PAGE SIZE is something not easy to explain. For the beginner,
  103. it is sufficient to know that the MMU is unable to handle random
  104. translations from every one address into another, but instead forces
  105. translations to go from entire pages to pages. The smallest possible
  106. page size is 256 bytes.
  107.  
  108. The TRANSLATION is nothing else but the physical address resulting
  109. from the translation of the specified logical address.
  110. The PAGE ADDRESS is the base address of the page the translated
  111. physical address is located in. To be exact, what MMUx shows here is
  112. not the address of the page defined by the (transparent) ATC entry but
  113. the page address specified in the page descriptor for this translation.
  114. In the case of non-earlytermination, this is the address of the page.
  115.  
  116. The PAGE DESCRIPTOR is the entry in the translation tree that actually
  117. describes where the translation goes to. It does so by means of the
  118. page address. This address must be aligned to the pagesize in use.
  119. To translate, the MMU adds the low order bits of the logical address
  120. (only those not used as index into tables).
  121. The page descriptor also holds the attributes one wants to attach to
  122. the memory region.
  123. A page descriptor can be one of the following types:
  124.  -Invalid (in that case, there is no translation)
  125.  -Regular
  126.  -Early terminating (in that case, it describes an array of pages
  127.     rather than a single page)
  128.  -Indirect (Avoiding confusion is a little difficult: An indirect
  129.     descriptor according to MOTOROLA points to a page descriptor.
  130.     MMUx quotes 'IND' level for a page descriptor pointed to by an
  131.     indirect descriptor)
  132. In addition, a page descriptor can be either short or long format.
  133. The size is 4 bytes for the short, 8 bytes for the long format.
  134. The long format (which is almost useless except on the 68851) allows
  135. to specify some additional attributes, namely the access levels not
  136. supported by the 68030.
  137.  
  138. The PAGE ATTRIBUTES (as described earlier) attach qualities to the
  139. memory inside the page. Of these, 'Used' and 'Modified' are not
  140. selectable qualities but rather information feedback from the MMU.
  141. The following page attributes exist
  142.  -WriteProt        page cannot be written to
  143.  -Used             page has been accessed
  144.  -Modified         page has been written to
  145.  -Lock             descriptor is to be kept locked in mmu cache
  146.  -CacheInhibit     memory is cache-disabled
  147.  -Gate             can be used for module descriptors
  148.  -Supervisor       can be used only in supervisor mode
  149.  -SharedGlobally   use one single ATC entry for all task mappings
  150. Of these, the following are invalid for the 68030:
  151.  -Lock             not implemented
  152.  -Gate             makes no sense, because no access levels implemented
  153.  -Shared Globally  no use, because no task alias feature
  154.  
  155. INHERITED PAGE ATTRIBUTES are page attributes that can be specified
  156. in higher levels of the translation tree and are applied to all
  157. subsequent pages. The following attributes are inheritable:
  158.  -WriteProt
  159.  -Supervisor
  160.  -SharedGlobally
  161. Inherited page attributes cannot be removed for a single page.
  162. Indirect descriptors do not contain attributes. (!)
  163.  
  164. FUNCTION CODE LOOKUP is a mode which uses different translation tables
  165. for all address space types, eg User/Supervisor, Instruction/Data
  166.  
  167. The DESCRIPTOR PATH shows the addresses of all descriptors used in
  168. the translation tree. The order is the same as listed in the level path.
  169.  
  170. The LEVEL PATH shows the levels of the translation tree that were
  171. passed. The following levels can be gone through: root,FCL,A,B,C,D,ind.
  172. Levels A-D correspond to the 'normal' translation table levels.
  173. ROOT is always used and corresponds to the descriptor in the root
  174. pointer. Note that there will be no information about root in the other
  175. path lists, e.g the other lists always start at level A or FCL.
  176. FCL level is special in that it does not use mask or blocksize and
  177. must always come first (immediately after root).
  178. IND means indirect and is special in that it must be the last level
  179. and does not use mask, index or blocksize. Also, the descriptor doing
  180. the indirection (here quoted as A..D) does not supply attributes.
  181.  
  182. The INDEX PATH shows the indexes into the table arrays this translation
  183. forced.
  184.  
  185. The MASK PATH shows the masks that were used to cut out indexes from
  186. the logical address.
  187.  
  188. The BLOCKSIZE PATH shows the sizes of the blocks associated with
  189. each level of the translation tree. The size is stated in # bits.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.       M M U x   C o m m a n d   L i n e   O p t i o n s
  200. --------------------------------------------------------------------
  201. The MMU Expert V1.30 (1991-09-17)  © RELOG RESEARCH
  202. Usage: MMUx -address=a n [-verbose=v] [-table=t n] [-fc n]
  203.  
  204. Note: Options must be preceded by a '-'. You can use either the long
  205. or the short notation in upper or lower case.
  206. Some options require parameters. A 'n' stands for numeric, 's' stands
  207. for string parameter. Char means just one character.
  208. Note that string parameters can be put within quotation marks. This
  209. is necessary when SPACEs or TABs are contained in the string. Also,
  210. all string parameters without quotation marks are automatically
  211. uppercased. To generate some characters filtered by Shell, the
  212. following sequences can be used:
  213.    \s    =>    $
  214.    \n    =>    [ENTER],[CR] or ^J
  215.    \t    =>    Tab
  216.    \0    =>    ^@
  217.  
  218. ADDRESS,A <number>
  219.  This option is mandatory.
  220.  Specify the address to examine in hex or dec format.
  221.  
  222. VERBOSE,V
  223.  Generates a more verbose output.
  224.  
  225. FC <number>
  226.  Allows to select an address space for the logical address to
  227.  translate using a function code (3 bits). Default is 1 (user-data).
  228.  Others are: 2=user-program, 5=supervisor-data, 6=supervisor-program
  229.  
  230. TABLE,T <n>
  231.  This option uses a table at address n instead of the table currently
  232.  used by the system. The table must start with
  233.   ULONG   CRP_HI
  234.   ULONG   CRP_LO
  235.   ULONG   SRP_HI
  236.   ULONG   SRP_LO
  237.   ULONG   TC
  238.  The pointers in the table must point to the absolute (heeelp!..)
  239.  addresses the subtables are located at.
  240.  To generate such a curious thing, you can use an assembler and either
  241.      * generate an object file, locate it using AbsLoad or a similar
  242.         tool, then load it to memory using a monitor
  243.   or
  244.      * force the assembler to put code to the absolute memory location
  245.   or
  246.      * manually poke to memory
  247.  This option will soon be updated to accept a text file with  the
  248.  translation table 'source code'.
  249.  
  250.  
  251.  
  252.       M M U x   M e s s a g e s   a n d   E r r o r s
  253. --------------------------------------------------------------------
  254. ** Input line too long!
  255.     You may not enter more than 250 chars as argument or at prompts.
  256.  
  257. ** Missing numerical parameter to option %s.
  258.     Options a, t and fc must be given a number.
  259.  
  260. ** Unexpected argument "%s". Specify only file name.
  261.     More than one name has been given. Check for '-' before options.
  262.  
  263. ** Missing address.
  264.     You have not specified the address to translate.
  265.  
  266. ** Unrecognized option '%s'
  267. - Options are: a,fc,t,v
  268.  
  269. ** Input file <%s> too short or corrupt.
  270.     There was a disk / file error reading the file.
  271.  
  272. ** Can't open <%s> - DOS error %ld.
  273.     Hint: 205 means 'file not found'...
  274.  
  275. ** Can't get memory (%ld bytes) for source file!
  276.     -
  277.  
  278.  
  279. ** The MMU is not enabled.
  280.     There is nothing to examine.
  281.  
  282. ** Root pointer early terminating - no table.
  283.     The translation is 1:1.
  284.  
  285. ** Address %lx is out of MMU mapped space!
  286. Range is limited to %s by means of initial shift.
  287.     The address may be translated. To see the translation, reduce
  288.      it to fit to the limit.
  289.  
  290. ** Address %lx is out of MMU mapped space!
  291. Range is limited to %s by means of upper index limit.
  292.     Root level limit violation. The address cannot be accessed.
  293.  
  294. ** Limit violation at level %ls - no translation.
  295.     The address cannot be accessed.
  296.  
  297. ** Page limit violation at level %ls - no translation.
  298.     An early terminating long format page descriptor may limit
  299.      the access range of subsequent pages.
  300.      The address cannot be accessed.
  301.  
  302. ** Index is $%x, low limit is $%x, high is $%x.
  303.     Shows you the limit violation in more detail.
  304.  
  305. ** Invalid %ls descriptor at level %ls - no translation.
  306. ** Descriptor contents: $%08lx.
  307.     The address cannot be accessed. Invalid type descriptors are
  308.     often used to keep information associated with the invalidity.
  309.     For example, a virtual memory system may use the page descriptors
  310.     of swapped out pages to store the disk block number it has copied
  311.     the page to.
  312.  
  313. ** Indirect is not page descriptor - no translation.
  314.     A heavy case of an unusable table.
  315.  
  316. ** Erroneous page address %lx truncated to %lx.
  317.     A page address has been specified not to fit the possible
  318.     page boundaries.
  319.  
  320. ** MMU configuration (TC) error!
  321.     A table was specified in memory. The value specified for the TC
  322.     register (offset $10 from beginning) is invalid because it does
  323.     not follow the magic rules 'IS+A+B+C+D+PS = 32' and PS >= 8.
  324.     Attempting to write this value to the TC register will cause an
  325.     MMU configuration error exception.
  326.  
  327. ** MMU configuration (CRP/SRP) error!
  328.     A table was specified in memory. The value specified for either
  329.     CRP or SRP has a descriptor type 'invalid' which may not be used
  330.     in the root pointers. This rule applies to SRP only if the SRP
  331.     enable bit in the TC register is set.
  332.     Attempting to write this value to the CRP/SRP register will cause
  333.     an MMU configuration error exception.
  334.  
  335. ** Fatal: Table cannot be accessed!
  336.     The translation table itself is access protected and cannot be
  337.     examined. Future versions of The MMU Expert will be powerful
  338.     enough to crack that.
  339.  
  340.  
  341.  
  342.       M M U x   B u g s / R e s t r i c t i o n s
  343. --------------------------------------------------------------------
  344. * The current version of The MMU Expert does not know about
  345.   Transparent Translation.
  346. * It will not work on the 68040 - crashes should not occur.
  347.   The 68040 MMU is completely different from the original 68851.
  348. * It will not work when the translation table is access protected.
  349. No other bugs are known.
  350. Some invalid bits hidden in descriptors may be accepted unreported.
  351. Future versions of The MMU Expert will get more and more angry when
  352. they find any of them.
  353.  
  354.  
  355.  
  356.       M M U x   H i s t o r y
  357. --------------------------------------------------------------------
  358. v0.01    91-07-03 project started
  359. v0.05    91-07-20 main routine rewritten (DIV./MUL. replaced by shift)
  360. v0.11    91-07-25 now working for levels A...D
  361. v0.15    91-08-06 main routine rewritten to work in supervisor mode
  362.                  (I might need it in a berr handler later!)
  363. v0.17    91-08-07 limit violation check added
  364. v0.20    91-08-08 indirection support added
  365. v0.21    91-08-08 page limit violation detected
  366. v0.23    91-09-08 option memtable added
  367. v0.24    91-09-08 FCL support added
  368. v0.27    91-09-17 table prot detect, memtable MMU config check added
  369. v0.29    91-09-17 bugs in FCL and indirection fixed
  370. v0.30    91-09-20 small bug fixed
  371.