Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcu/nrf5340: Add secure functions package #2899

Merged
merged 2 commits into from
Oct 13, 2022

Commits on Oct 12, 2022

  1. mcu/nrf5340: Add secure functions package

    New package will contain secure functions.
    Those functions will allow access to secure only peripherals.
    
    To start MCU assignment to GPIO function tfm_gpio_pin_mcu_select
    allows to redirect PIN to net core.
    
    tfm_uicr_otp_read() allows to read UICR->OTP from non-secure code.
    
    When tfm package build with bootloader or secure application
    functions are treated as every other function.
    
    When tfm is build with non-secure application function bodies
    are not present in the build and are expected to be linked with
    library that provides secure gateways.
    
    tfm can be also build into bootloader in this case it's the
    bootloader that provides secure functions.
    
    ELF that provides implementation of secure functions must be
    build with TFM_EXPORT_NSC: 1 syscfg value.
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    4a74799 View commit details
    Browse the repository at this point in the history
  2. mcu/nrf5340: Include TFM module to allow MCU GPIO assignment

    It was possible to assign GPIO pins to network core.
    It was done in ipc driver or for unsecure code it in bootloader
    code from hal_system_start.c.
    
    Now pin assignment to net core is done in nrf5340_periph_create()
    which is called in hal_bsp_init().
    With this change pin assigment can be done:
    - in bootloader (regardless if it is secure or not)
    - in application build with MCU_APP_SECURE
    - in non-secure application when tfm functionality is provided by
      bootloader or other secure code. In this case bootloader does
      not redirect pins during startup but allows change from
      non-secure application at runtime.
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    78901f1 View commit details
    Browse the repository at this point in the history