Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 1.01 KB | None | 0 0
  1. ts_set_camp
  2. ;
  3. ; This module will map a range the physical pages (r1) to the logical page (r0) and
  4. ; set the protection mode (r2). This module will return to the location from where
  5. ; either itself or ts_set_cam or ts_set_cam_idle were called from.
  6. ;
  7. ; Corrupts r0,r1,r2,r3,r4,r6,r9,r11
  8. ;
  9. ; Calls the RISC OS routine BangCam to do the PPNO, LPNO bit switching.
  10. ; First, jumble the registers to suit BangCam ..
  11. ;
  12. ; r2  = CAM entry (PPNO)
  13. ; r3  = logical address
  14. ; r9  = current MEMC setting (for pagesize)
  15. ; r11 = PPL
  16. ;
  17.         MOV     r3,r0           ; logical page number
  18.         MOV     r11,r2          ; protection level
  19.         MOV     r2,r1           ; physical page number
  20.         MOV_fiq r0, r11_fiq     ; MEMC configuration
  21.         MOV     r9, r0          ; keep a copy in r9
  22.         MOV     r1, r9, LSR #2
  23.         AND     r1, r1, #3      ; calculate pagesize shift
  24.         ADD     r1, r1, #12
  25.         MOV     r3, r3, LSL r1  ; convert LPN to logaddr
  26.         B       BangCam         ; return thro' BangCam
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement