FSL_BOOKE_MAS3(rpn, user, perms)

cancel
Showing results for 
Search instead for 
Did you mean: 

FSL_BOOKE_MAS3(rpn, user, perms)

375 Views
hv
Contributor II

in uboot code, FSL_BOOKE_MAS3 is defined as:

#define MAS3_RPN 0xFFFFF000
#define MAS3_U0  0x00000200
#define MAS3_U1  0x00000100
#define MAS3_U2  0x00000080
#define MAS3_U3  0x00000040
#define MAS3_UX  0x00000020
#define MAS3_SX  0x00000010
#define MAS3_UW  0x00000008
#define MAS3_SW  0x00000004
#define MAS3_UR  0x00000002
#define MAS3_SR  0x00000001

#define FSL_BOOKE_MAS3(rpn, user, perms) \
  (((rpn) & MAS3_RPN) | (user) | (perms))

what does "user" do?  do i need to set it if i want to run in user mode?  that's not the same as the permissions "UX, UW and UR", right?

Thanks!

0 Kudos
1 Reply

228 Views
r8070z
NXP TechSupport
NXP TechSupport

Have a great day,

In FSL_BOOKE_MAS3(rpn, user, perms) "perms" contains  "UX, UW and UR" bits. "user" means user bits of the MAS3 register. The EREF says: "User bits. Associated with a TLB entry and used by system software. For example, these bits may be used to hold information useful to a page scanning algorithm or be used to mark more abstract page attributes. " You may set user =0 if you do not need for this functionality.

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos