![Intel IXP45X Скачать руководство пользователя страница 108](http://html1.mh-extra.com/html/intel/ixp45x/ixp45x_developers-manual_2073092108.webp)
Intel
®
IXP45X and Intel
®
IXP46X Product Line of Network Processors—Intel XScale
®
Processor
Intel
®
IXP45X and Intel
®
IXP46X Product Line of Network Processors
Developer’s Manual
August 2006
108
Order Number: 306262-004US
Sharing resources among different applications requires a state saving mechanism.
Two possibilities are:
• The operating system, during a context switch, could save the state of the
coprocessor if the last executing process had access rights to the coprocessor.
• The operating system, during a request for access, saves off the old coprocessor
state and saves it with last process to have access to it.
Under both scenarios, the OS needs to restore state when a request for access is made.
This means the OS has to maintain a list of what processes are modifying CP0 and their
associated state.
Example 12. Disallowing access to CP0
3.5.2
CP14 Registers
lists the CP14 registers implemented in the Intel XScale processor.
;; The following code clears bit 0 of the CPAR.
;; This will cause the processor to fault if software
;; attempts to access CP0.
LDR R0, =0x3FFE
; bit 0 is clear
MCR P15, 0, R0, C15, C1, 0
; move to CPAR
CPWAIT
; wait for effect
Table 28.
Coprocessor Access Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
0 0
C
P
1
3
C
P
1
2
C
P
1
1
C
P
1
0
C
P
9
C
P
8
C
P
7
C
P
6
C
P
5
C
P
4
C
P
3
C
P
2
C
P
1
C
P
0
reset value: 0x0000,0000
Bits
Access
Description
31:16
Read-unpredictable / Write-as-Zero
Reserved - Should be programmed to zero for future
compatibility
15:14
Read-as-Zero/Write-as-Zero
Reserved - Should be programmed to zero for future
compatibility
13:1
Read / Write
Coprocessor Access Rights-
Each bit in this field corresponds to the access rights for
each coprocessor.
0
Read / Write
Coprocessor Access Rights-
This bit corresponds to the access rights for CP0.
0 = Access denied. Any attempt to access the
corresponding coprocessor will generate an
undefined exception.
1 = Access allowed. Includes read and write accesses.