Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
SMC instruction
Jump...
Cancel
Locked
Locked
Replies
2 replies
Subscribers
119 subscribers
Views
4840 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
SMC instruction
Dm Sh
over 12 years ago
Note: This was originally posted on 22nd January 2013 at
http://forums.arm.com
Good day.
I have a question - where I can get the #immediate value (4bit) in Secure Monitor Exception Handler, when called SMC instruction with non zero parametr - #imm-4 ?
Don't found this value in any registers.
From ARM documentation.
-------------------------------------
SMC
Secure Monitor Call.
Syntax
SMC{
cond
}
#imm4
where:
[i]imm4
[/i]is a 4-bit immediate value. This is ignored by the ARM processor, but can be used by the SMC exception handler to determine what service is being requested.
Thanks.
Parents
Peter Harris
over 12 years ago
Note: This was originally posted on 27th January 2013 at
http://forums.arm.com
Bear in mind that the SMC instruction is used to switch worlds, so you tend to get an address in the "other world's" virtual address map in LR, which in many cases may not be the same as the currently running software. Direct access of the address in LR is therefore unlikely to do what you want - it may well page fault, or at least return utterly unrelated data.
This generally makes it very hard to use this feature of the SMC instruction; at least it makes it more hassle than it is worth - in most cases putting a constant in a register by hand as part of the cross-world smc call API is much easier.
HTH,
Iso
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
Note: This was originally posted on 27th January 2013 at
http://forums.arm.com
Bear in mind that the SMC instruction is used to switch worlds, so you tend to get an address in the "other world's" virtual address map in LR, which in many cases may not be the same as the currently running software. Direct access of the address in LR is therefore unlikely to do what you want - it may well page fault, or at least return utterly unrelated data.
This generally makes it very hard to use this feature of the SMC instruction; at least it makes it more hassle than it is worth - in most cases putting a constant in a register by hand as part of the cross-world smc call API is much easier.
HTH,
Iso
Cancel
Vote up
0
Vote down
Cancel
Children
No data