简体   繁体   English

用户应用程序是否有任何标准方式可以访问ARM Linux上的协处理器?

[英]Is there any standard way for user apps to access coprocessor on ARM Linux?

I wonder if there is an already implemented (common - standard) "driver/kernel module/sysfs entry" way to access ARM's coprocessor through user space. 我想知道是否已经实现了(通用 - 标准)“驱动程序/内核模块/ sysfs条目”方式来通过用户空间访问ARM的协处理器。 If not (to my knowledge), why it is not available? 如果不是(据我所知),为什么它不可用? Is there anything blocking it? 有没有阻止它的东西? Isn't it feasible? 不可行吗?

For example; 例如; I want to get the contents of Main ID Register - MIDR , I would like to be able to do this from user space by writing to / reading from a sysfs entry. 我想获得主ID寄存器的内容- MIDR ,我希望能够通过写入/读取sysfs条目从用户空间执行此操作。

It is generally a bad idea to expose that level of intricate hardware connection to application software - it breaks portability and can affect security and stability (which is why they are not accessible from unprivileged mode to begin with). 将这种复杂的硬件连接暴露给应用软件通常是一个坏主意 - 它会破坏可移植性并影响安全性和稳定性(这就是为什么它们无法从无特权模式开始访问)。 Such things are usually better hidden behind some layers of software abstractions. 这些东西通常更好地隐藏在某些软件抽象层之后。 But nothing prevents you from writing kernel drivers that expose such interfaces where a real reason exists. 但是没有什么可以阻止你编写暴露这种接口的内核驱动程序。

If your question is from a pure perspective of curiosity, then I would recommend building your own kernel and either use something like KGDB to investigate during startup or simply insert printk statements in strategic locations to see what certain values are at given points. 如果您的问题来自纯粹的好奇心,那么我建议您构建自己的内核,并在启动期间使用类似KGDB的内容进行调查,或者只是在战略位置插入printk语句,以查看给定点的特定值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Linux:在终端中运行和关闭应用程序的标准方式 - Linux : Standard way for running and closing apps in Terminal 有什么办法可以在linux上将二进制文件从x86重新编译到ARM吗? - Is there any way to recompile binaries from x86 to ARM on linux? 有没有标准的方法从Linux上的C ++文件加载参数? - Is there any standard way to load parameters from a file in C++ on Linux? 有没有办法在Linux中创建用户定义的信号? - Is there any way to create a user defined signal in Linux? 有什么方法可以访问 linux 中的持久 memory? - is there any way get access persistent memory in linux? 对于arm Linux,用户空间中的线程可以访问内核空间的虚拟地址吗? - For arm Linux, could threads in user space access virtual address of Kernel space? 有没有办法确定Linux可执行文件是否在ARM处理器上使用软浮点? - Is there any way to determine whether a linux executable is using soft float on an ARM processor? 有什么方法可以访问Linux服务器上的nodejs控制台吗? - Is there any way to access my nodejs console on linux server? ARM GDB无法仅在Linux上访问内存 - ARM GDB cannot access memory only on Linux Linux 中是否有任何标准的退出状态代码? - Are there any standard exit status codes in Linux?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM