ARM ARM7TDMI Instrukcja Użytkownika Strona 102

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 284
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 101
Memory Interface
3-32 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G
3.9 Privileged mode access
ARM Limited usually recommends that if only privileged mode access is required from
a memory system then you are advised to use the nTRANS pin on the core. This signal
distinguishes between User and privileged accesses.
The reason that this is recommended is that if the Operating System (OS) accesses
memory on behalf of the current application then it must perform these accesses in User
mode. This is achieved using the LDRT and STRT instructions that set nTRANS
appropriately.
This measure avoids the possibility of a hacker deliberately passing an invalid pointer
to an OS and getting the OS to access this memory with privileged access. This
technique could otherwise be used by a hacker to enable the user application to access
any memory locations such as I/O space.
The least significant five bits of the CPSR are also output from the core as inverted
signals, nM[4:0]. These indicate the current processor mode as listed in Table 3-8.
Note
The only time to use the nM[4:0] signals is for diagnostic and debug purposes.
Table 3-8 Use of nM[4:0] to indicate current processor mode
M[4:0] nM[4:0] Mode
10000 01111 User
10001 01110 FIQ
10010 01101 IRQ
10011 01100 Supervisor
10111 01000 Abort
11011 00100 Undefined
11111 00000 System
Przeglądanie stron 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 283 284

Komentarze do niniejszej Instrukcji

Brak uwag