This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-A9 MPCore Fastmodel Trustzone support

Note: This was originally posted on 21st March 2012 at http://forums.arm.com

I am trying to develop an trustzone application based on ARM A9MPcore Fast model. But if I tried to enable the non-secure interrupts and it is not working. Is any one able to use the A9MPCore fast model for trustzone development.


Thanks,
Gopu
  • Note: This was originally posted on 27th March 2012 at http://forums.arm.com


    Yes.  Didn't really hit any problems (was using a custom system made with the Fast Models tools, not the RTSMs).


    Is it possible to get the custom system project?

    Thanks,
    Gopu
  • Note: This was originally posted on 27th March 2012 at http://forums.arm.com


    Eh... no.  It's kinda confidential.

    However, in terms of interrupts there is nothing too special about it.  It uses the A9's in-built interrupt controller.  We have a mix of secure (FIQs) and non-secure interrupts (IRQs) being generated, not seen any problems.
  • Note: This was originally posted on 27th March 2012 at http://forums.arm.com

    Thanks for the clarification.

    If I use the example projects, I am not getting any group1 interrupts i.e. non-secure interrupts. Even writing to GIC Distributor control register enables only secure interrupts. If I try to write 0x3 in GIC distributor control register, it got set with 0x1. But if I try the same in Cortex A8 example project, I am able to enable both non-secure and secure interrupts. But in Cortex A8, FIQ interrupts are not working.

    It is kind of trick situation and I don't know about the hardware modelling.

    -Gopu
  • Note: This was originally posted on 28th March 2012 at http://forums.arm.com

    Thanks for your comments.

    I have configured all the GIC interrupts as group 1 interrupts in secure application and switched to non-secure mode by setting the secure configuration register and I followed the other steps like configuring the GIC priority, CPU registers and also configuration related to SCU. After that I try to load the linux or baremetal application. But in linux it got stuck in  "calibration timer" and it is because it doesn't receive timer interrupts.  I seen the similar issue with baremetal non-secure application. I am using the  A9MPCore fast model example project supplied by ARM. On debugging the issue, in the model debugger, GIC distributor control register is not banked. I can see only one register in case of GIC distributor control register. In case of GIC CPU control register, it has 2 sets of registers. One is for non-secure and other one for secure mode.

    I am sure that I am missing the configuration or connection in the A9fast model project. As I am not familiar with ARM fast model customization, I posted the question to see whether any one able to use the default example project.

    Thanks a lot for all valuable comments.
  • Note: This was originally posted on 28th March 2012 at http://forums.arm.com

    I am able to change the context and able to capture Secure interrupts i.e. Group 0 interrupts. This question is more related to A9MPCore Fast Model project. Do you have any luck on using the A9MPCore Fast Model for trustzone development?

    Thanks.
  • Note: This was originally posted on 27th March 2012 at http://forums.arm.com

    What do you expect to happen for a "non-secure interrupt" and what are you actually seeing? Without more data it's hard to help.

    As far as the interrupt controller is concerned there is no such thing as a secure interrupt, other than non-secure software cannot configure a secure interrupt or set high priority. The interrupt handling is entirely a software problem in the ARM core, and not really very much to do with the GIC at all.

    By "not seeing any non-secure interrupt" it sounds like you think the interrupts are being generated but they are not appearing in the normal world interrupt handler?

    Ensure that you have correctly configured hardware trapping to the monitor mode for interrupts in CP15, and that your monitor software is context switching cleanly when the interrupt occurs.

    See section 3.3 of http://infocenter.arm.com/help/topic/com.arm.doc.prd29-genc-009492c/index.html for an intro.

    Iso
  • Note: This was originally posted on 28th March 2012 at http://forums.arm.com

    [color=#222222][size=2]
    switched to non-secure mode by setting the secure configuration register
    [/size][/color]
    [color=#222222][size=2]
    [/size][/color]
    [color=#222222][size=2]Setting this bit in the register does not force the interrupt to switch to non-secure, it forces the interrupt to switch to monitor mode. Your monitor mode software is responsible for context switching safely to the right world.[/size][/color]
    [size=2]
    [/size]
    [size=2]Can you connect a debugger and set some breakpoints on the secure and monitor mode vector tables? That would at least prove the interrupt is being generated and trapped correctly.[/size]
    [size=2]
    [/size]
  • Note: This was originally posted on 26th March 2012 at http://forums.arm.com

    Yes.  Didn't really hit any problems (was using a custom system made with the Fast Models tools, not the RTSMs).
  • Note: This was originally posted on 27th March 2012 at http://forums.arm.com

    Eh... no.  It's kinda confidential.

    However, in terms of interrupts there is nothing too special about it.  It uses the A9's in-built interrupt controller.  We have a mix of secure (FIQs) and non-secure interrupts (IRQs) being generated, not seen any problems.