Discussion:
Accessing OEA ('supervisor') SPRs from Linux userspace
(too old to reply)
k***@yahoo.com
2005-07-05 21:04:22 UTC
Permalink
Hi all,
I can think of a few reasons why user-level code is not allowed to
access the OEA SPRs on PowerPCs. Still, I am in a bind so any help
appreciated (even knowing it can or cannot be done will be a help).
I want to write a C program running in Linux userspace to read some
SPRs on a PowerPC (IBM PPC970 to be exact). Starting with MSR, of
course. How do I do it?
syscall? if yes, which one?
I assume the privilege level has nothing to do with being the user
'root'?
l'indien
2005-07-05 21:45:27 UTC
Permalink
Post by k***@yahoo.com
Hi all,
Hi,
Post by k***@yahoo.com
I can think of a few reasons why user-level code is not allowed to
access the OEA SPRs on PowerPCs.
This is mandatory so the processor can be virtualized (ie you can run any
OS as a userland process with no modifications).
There is nothing in OEA SPRs that userland should know.
Post by k***@yahoo.com
Still, I am in a bind so any help
appreciated (even knowing it can or cannot be done will be a help).
I want to write a C program running in Linux userspace to read some
SPRs on a PowerPC (IBM PPC970 to be exact). Starting with MSR, of
course. How do I do it?
syscall? if yes, which one?
It would be a great mistake to grant access to MSR to a user process, even
for read-only. This is the most sensible register, then one of the
registers with the highest privilege: on POWER CPUs, even the OS has
restrictions for MSR access. Only the hypervisor has full modifications
rights on it
The only information that could eventually be usefull to a process like
X11 or a userland driver is the current endianness. As Linux always run
big-endian on PowerPC, this is a no go.
Post by k***@yahoo.com
I assume the privilege level has nothing to do with being the user
'root'?
No. It means you need to be in supervisor mode (ie kernel mode) or even
hypervisor mode (for POWER able to run multiples OSes concurently) to
access some resources.

Loading...