3.2.73. c13, Thread and Process ID Registers

The purpose of the Thread and Process ID Registers is to provide locations to store the IDs of software threads and processes for OS management purposes.

The Thread and Process ID Registers are:

Table 3.146 shows the results of attempted access to each register for each mode.

Table 3.146. Results of access to the Thread and Process ID Registers[62]

 Secure privilegedNonsecure privilegedSecure UserNonsecure User
Register[1]ReadWriteReadWriteReadWriteReadWrite
User read/writeSecure dataSecure dataNonsecure dataNonsecure dataSecure dataSecure dataNonsecure dataNonsecure data
User read-onlySecure dataSecure dataNonsecure dataNonsecure dataSecure dataUndefinedNonsecure dataUndefined
Privileged onlySecure dataSecure dataNonsecure dataNonsecure dataUndefinedUndefinedUndefinedUndefined

[62] An entry of Undefined in the table means that the access gives an Undefined Instruction exception when the coprocessor instruction is executed.

[1] Each row refers to a Thread and Process ID Register. For example, the User read/write row refers to the User read/write Thread and Process ID Register.


To access the Thread and Process ID Registers, read or write CP15 with:

                    MRC p15, 0, <Rd>, c13, c0, 2 ; Read User read/write Thread and Process ID Register
                    MCR p15, 0, <Rd>, c13, c0, 2 ; Write User read/write Thread and Process ID Register
                    MRC p15, 0, <Rd>, c13, c0, 3 ; Read User read-only Thread and Process ID Register
                    MCR p15, 0, <Rd>, c13, c0, 3 ; Write User read-only Thread and Process ID Register
                    MRC p15, 0, <Rd>, c13, c0, 4 ; Read Privileged only Thread and Process ID Register
                    MCR p15, 0, <Rd>, c13, c0, 4 ; Write Privileged only Thread and Process ID Register

Reading or writing the Thread and Process ID Registers has no effect on the processor state or operation. These registers provide OS support and must be managed by the OS.

You must clear the contents of all Thread and Process ID Registers on process switches to prevent data leaking from one process to another. This is important to ensure the security of secure data.

Copyright © 2006-2009 ARM Limited. All rights reserved.ARM DDI 0344I
Non-Confidential