FSL_BOOKE_MAS3(rpn, user, perms)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FSL_BOOKE_MAS3(rpn, user, perms)

584件の閲覧回数
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 件の賞賛
1 返信

437件の閲覧回数
r8070z
NXP Employee
NXP Employee

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 件の賞賛