home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / emulation / shapeshifter / videodrivers / turboevd / sources / mmu.i < prev   
Encoding:
Text File  |  1996-11-23  |  5.5 KB  |  96 lines

  1. *
  2. * $VER: mmu.i (23.11.96) 33.1
  3. *
  4. * - bit definitions for various MMU registers and descriptors in M68040 and M68060
  5. * - not much of use for those who are not writing software using MMU
  6. *
  7. * Version history:
  8. *
  9. * 33.1  23.11.96    laukkanen
  10. *
  11. *       - decided to release this
  12. *
  13.  
  14. ; bit definitions for 040/060 translation control register (TCR/TC)
  15.  
  16.     BITDEF TC,RESERVED0,0           ; reserved
  17.     BITDEF TC,DUI0,1                ; These bits are two user-defined bits for instruction 
  18.     BITDEF TC,DUI1,2                ; prefetch bus cycles (see M68060UM/AD 4.2.2.3 "Descriptor
  19.                                     ; field definitions"
  20.     BITDEF TC,DCI0,3                ; Default cache mode (instruction cache)
  21.     BITDEF TC,DCI1,4                ; 00: Writethrough, cachable
  22.                                     ; 01: Copyback, cachable;
  23.                                     ; 10: Cache-inhibited, precise exception model
  24.                                     ; 11: Cache-inhibited, imprecise exception model
  25.     BITDEF TC,DWO,5                 ; Default Write protect
  26.                                     ; 0: Reads and writes are allowed
  27.                                     ; 1: Reads are allowed but writes cause a protection exception
  28.     BITDEF TC,DUO0,6                ; These bits are two user-defined bits for operand accesses
  29.     BITDEF TC,DUO1,7                ; (see M68060UM/AD 4.2.2.3 "Descriptor field definitions"
  30.     BITDEF TC,DCO0,8                ; Default cache mode (data cache)
  31.     BITDEF TC,DCO1,9                ; (see DCI for description of the bits)
  32.     BITDEF TC,FITC,10               ; 1/2-Cache mode (Instruction ATC)
  33.                                     ; 0: The instruction ATC operates with 64 entries
  34.                                     ; 1: The instruction ATC operates with 32 entries
  35.     BITDEF TC,FOTC,11               ; 1/2-Cache mode (Data ATC)
  36.                                     ; (see FITC for description)
  37.     BITDEF TC,NAI,12                ; No allocate mode (Instruction ATC)
  38.                                     ; This bit freezes the instruction ATC in the current state, by
  39.                                     ; enforcing a no-allocate policy for all accesses. Accesses can
  40.                                     ; still hit, misses will cause a table search.
  41.     BITDEF TC,NAD,13                ; No Allocate mode (Data ATC)
  42.                                     ; This bit freezes the data ATC in the current state, by enforcing
  43.                                     ; a no-allocate policy for all accesses. Accesses can still hit, misses
  44.                                     ; will cause a table search. A write access which finds a corresponding
  45.                                     ; valid read will update the M-bit and the entry remains valid.
  46.     BITDEF TC,P,14                  ; Page size
  47.                                     ; 0: 4 kB
  48.                                     ; 1: 8 kB
  49.     BITDEF TC,E,15                  ; This bit enables and disables paged address translation
  50.                                     ; 0: Disable
  51.                                     ; 1: Enable
  52.                                     ; A reset operation clears this bit. When translation is disabled,
  53.                                     ; logical addresses are used as physical addresses. The MMU instruction,
  54.                                     ; PFLUSH, can be executed succesfully despite the state of the E-bit.
  55.                                     ; If translation is disabled and an access does not match a transparent
  56.                                     ; translation register (TTR), the default attributes for the access
  57.                                     ; on the TTR is defined by the DCO, DUO, DCI, DWO, DUI (default TTR)
  58.                                     ; bits in TCR.
  59.                                     ; bits 16-31 are reserved by Motorola. Always read as zero.
  60.  
  61. ; bit definitions for table descriptors
  62.  
  63.     BITDEF TD,UDT0,0                ; Upper level descriptor type
  64.     BITDEF TD,UDT1,1                ; 00,01: invalid
  65.                                     ; 10,11: resident
  66.     BITDEF TD,W,2                   ; Write protected
  67.     BITDEF TD,U,3                   ; Used
  68.     BITDEF TD,X0,4                  ; Motorola reserved
  69.     BITDEF TD,X1,5
  70.     BITDEF TD,X2,6
  71.     BITDEF TD,X3,7
  72.     BITDEF TD,X4,8
  73.                                     ; bits 9-31 describe the pointer or page table address
  74.  
  75. ; bit definitions for page descriptors
  76.  
  77.     BITDEF PD,PDT0,0                ; Page descriptor type
  78.     BITDEF PD,PDT1,1                ; 00: invalid
  79.                                     ; 01,11: resident
  80.                                     ; 10: indirect
  81.     BITDEF PD,W,2                   ; Write protected
  82.     BITDEF PD,U,3                   ; Used
  83.     BITDEF PD,M,4                   ; Modified
  84.     BITDEF PD,CM0,5                 ; Cache mode
  85.     BITDEF PD,CM1,6                 ; 00: Writethrough, cachable
  86.                                     ; 01: Copyback, cachable;
  87.                                     ; 10: Cache-inhibited, precise exception model
  88.                                     ; 11: Cache-inhibited, imprecise exception model
  89.     BITDEF PD,S,7                   ; Supervisor protected
  90.     BITDEF PD,U0,8                  ; User page attributes
  91.     BITDEF PD,U1,9                  ; These bits are echoed to UPA0 and UPA1 respectively
  92.     BITDEF PD,G,10                  ; Global
  93.     BITDEF PD,UR0,11                ; User reserved
  94.     BITDEF PD,UR1,12                ; if 4kB page size
  95.                                     ; bits 13-31 describe the physical address of the page
  96.