Hello,
I ported OpenPicoRTOS to PowerPC platforms & ran into an issue.
Despite configuring the PBRIDGE (correctly ?) i get a MachineCheck exception every time i try to access a peripheral in user mode.
Supervisor mode works fine but it's not really what i'm after, i want user/supervisor mode management (+MPU) & being able to access peripherals in user mode.
I tried various things but nothing seems to work, i don't know if i'm doing something wrong of it it's simply not possible.
Right now i just kept everything in supervisor mode for demonstration purposes, here's the current state of the code:
- My attempt at configuring the PBRIDGE:
https://github.com/jnaulet/OpenPicoRTOS/blob/v1.11.x/arch/powerpc/e200z4/mach-mpc574x/startup.S
- The de-activated user mode (in arch_save_first_context):
https://github.com/jnaulet/OpenPicoRTOS/blob/v1.11.x/arch/powerpc/e200z4/picoRTOS_portasm.S
- The complete demo i use for debugging this system:
https://github.com/jnaulet/OpenPicoRTOS/tree/v1.11.x/demo/devkit-mpc5748g
Any help is appreciated.
Kind regards.