2387351_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2387351_en-US

2387351_en-US

MPC5748G: MachineCheck exception hen trying to access peripherals in user mode

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.

Re: MPC5748G: MachineCheck exception hen trying to access peripherals in user mode

Hello,

there can be multiple reasons for user mode access rejection:

Most probably PBRIDGE or MPU configuration.

You can start checking following:

  1. PBRIDGE PACR/OPACR initialization.
  2. Whether all peripheral slots are configured for user access.
  3. MPU region definitions covering:
    • 0xFxxxxxxx peripheral space
    • read/write permissions
    • supervisor/user attributes.
  4. MSR value after the RTOS drops to user mode.
  5. The exact peripheral address that causes the fault.
  6. MCSR/ESR/DEAR at IVOR1 entry.

Best Regards,

Peter

Tags (1)
No ratings
Version history
Last update:
2 weeks ago
Updated by: