Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
Accessing CP14 from user mode
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
6 replies
Subscribers
126 subscribers
Views
4361 views
Users
0 members are here
Related
Accessing CP14 from user mode
Offline
Ackbar Ackbar
over 7 years ago
Note: This was originally posted on 9th July 2009 at http://forums.arm.com
Hello,
I'm currently trying to change the frequency of a PXA270 processor, the system I'm working on is a Linux OS, and I would like to write a code that allows an user to change the frequency, to do so I need to write in a register of coprocessor 14. According to ARM documentation i need to use MRC/MCR instructions, I tried but I got an error : "Illegal instruction".
So I think I need to switch to supervisor mode, it seems that I could do it using SWI but even after reading some documentation I don't know how I should implement this.
I'm not even sure that what I want to do is possible, but if it is, does someone have any idea of the code I should write to switch to supervisor mode and use MRC or MCR instruction?
Thanks,
Offline
ivan lovric
over 7 years ago
Note: This was originally posted on 13th July 2009 at
http://forums.arm.com
Hi,
I managed to access coprocessor 14 and 15 of the ARM from the user space. I built an small prog which modifies the registers depending on user requirements.
It was difficult to achieve, but now it workd fine and I can modify clock speed or power management from the user space.
If interested, I can send you the prog.
Regards,
____________
Ivan Lovric
ESECO SYSTEMS
Web3.0 for security
[url="
http://www.eseco.fr
"]
http://www.eseco.fr[/url]
Cancel
Up
0
Down
Reply
Cancel
Offline
ivan lovric
over 7 years ago
Note: This was originally posted on 14th July 2009 at
http://forums.arm.com
Hello,
I did this stuff on PXA270 and it will certainly require to be adapted for OMAP.
I will create a project tomorrow on sourceforge so that the code may be adapted ond improved by the community.
Regards,
_________
Ivan Lovric
ESECO SYSTEMS
Web3.0 for security
[url="
http://www.eseco.fr
"]
http://www.eseco.fr[/url]
Cancel
Up
0
Down
Reply
Cancel
Offline
ivan lovric
over 7 years ago
Note: This was originally posted on 15th July 2009 at
http://forums.arm.com
Hello,
I just created the sourceforge project for arm CP14 and CP15 modification from user space. The name is "energy", and source code may be downloaded using svn with the following command line
svn co [url="
https://energy.svn.sourceforge.net/svnroot/energy
"]
https://energy.svn.sourceforge.net/svnroot/energy[/url]
energy
Regards,
_____________
Ivan Lovric
ESECO SYSTEMS
Web3.0 for security and risk protection
[url="
http://www.eseco.fr
"]
http://www.eseco.fr[/url]
Cancel
Up
0
Down
Reply
Cancel
Offline
Rachit Shah
over 7 years ago
Note: This was originally posted on 14th July 2009 at
http://forums.arm.com
Hi Ivan,
I am interested to do that on OMAP3530(Beagleboard). Please send me prog or guide me how to do that
thanks,
rach
Cancel
Up
0
Down
Reply
Cancel
Offline
kuan po huang
over 7 years ago
Note: This was originally posted on 5th August 2009 at
http://forums.arm.com
hi,
if you can modify kernel source, here is an option:
add system calls to read/write coprocessors
there are many tutorials about adding system calls in embedded linux kernel
embedded Linux kernel takes short time to build
googling "add system call" should help
thanks
Kuan-Po Huang
High Performance Computing Lab.
CSIE, National Chung Cheng University, Taiwan
[url="
http://hpc.cs.ccu.edu.tw/
"]
http://hpc.cs.ccu.edu.tw/[/url]
Cancel
Up
0
Down
Reply
Cancel
Offline
Martin Weidmann
over 7 years ago
Note: This was originally posted on 9th July 2009 at
http://forums.arm.com
When in User mode the only way to switch to a different (priviledged) mode is by taking an exception. For example by excuting a SWI/SVC instruction to trigger a Supervisor call exception. On a bare metal system you would have to provide a vector table and exception handlers. The handlers could deal with the accesses to CP14. But...
As you are running under an OS, the OS will handle the exceptions. I suspect you will have to write a Linux kernel driver to control the frequency changing. Then your application uses the driver as an interface. Not a Linux developer, so can't say how you'd do this.
Cancel
Up
0
Down
Reply
Cancel
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Answered
Can't get a 30-day Gold Edition evalution license
+1
707
views
7
replies
Latest
1 month ago
by
KokoBongo
Answered
Failure to get an evaluation license with error Unable to execute API call /api/v1/connect
0
7076
views
5
replies
Latest
1 month ago
by
Ronan Synnott
Answered
error encountered when try to connect FVP
0
4343
views
18
replies
Latest
1 month ago
by
MattB
Suggested Answer
ARM DStudio can't detect Juno CPU core via DStream
0
347
views
2
replies
Latest
1 month ago
by
QiangHuang
Answered
ARM Development Studio IDE 2020.1 and DE10-NANO --> Linker and debugging issue
+1
1031
views
3
replies
Latest
1 month ago
by
Ronan Synnott
<
>
View all questions in Arm Development Studio forum