CSFR Change from User Mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User22023
Level 1
Level 1
5 questions asked First reply posted First question asked
Hi all,

how can i change the CSFR´s when i´m in user mode? I´ve seen that with the syscall trap it is possible to get in the supervisor mode and now i want to change in the TrapHook for example the PSW.PRS bits but when i exit the syscall trap the upper and lower context is restored and so the changes are not accepted.
How can i make changes to the PSW and hold these changes after the rslcx and RFE at the end from the traphandler. I´ve tried to manipulate the CSA´s this worked, but i think this is not the way it has to be done.

BR Hennessy
0 Likes
2 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
That's part of the magic of operating systems. For PSW.PRS, that's generally part of a task's context, and the CSA is manipulated by an operating system when the task is created.

Without a real OS, hacking the CSA sounds in a SYSCALL trap handler like a good enough alternative.
0 Likes
indra
Level 1
Level 1
5 questions asked 5 replies posted 10 sign-ins

Hi @User22023 how did you switch to user mode?

0 Likes