home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 26 / amigaformatcd26.iso / -screenplay- / otherstuff / adoom_src / amiga_mmu.i < prev    next >
Text File  |  1998-03-09  |  4KB  |  105 lines

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