Skip to content
Permalink
Branch: master
Commits on Jul 17, 2019
  1. arch: arm: cleanup workaround for QEMU Cortex-M3

    ioannisg authored and andrewboie committed Jul 17, 2019
    Qemu is already updated past 2.9 release, so this
    workaround for QEMU_CORTEX_M3 is now obsolete and
    can be removed.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. boards: arm: mps2_an521: some trivial Kconfig fixes

    ioannisg authored and andrewboie committed Jul 16, 2019
    When TRUSTED_EXECUTION_NONSECUCRE is selected, we always
    define the default board (mps2_an521). We do not need to
    OR with TRUSTED_EXECUTION_SECURE, in this Kconfig
    conditional.
    
    In addition to that, we make the BOARD_MPS2_AN521 board
    to strictly depend on the corresponding SOC, not on the
    SOC series.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. boards: arm: mps2_an521: add QEMU target and coverage

    ioannisg authored and andrewboie committed Jul 16, 2019
    Signify that the MPS2 AN521 is selected as a QEMU
    target. Indicate, also, that this board has support
    for COVERAGE.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. boards: arm: mps2_an385: clean up redundant Kconfig setting

    ioannisg authored and andrewboie committed Jul 16, 2019
    CONFIG_ARCH_HAS_USERSPACE is automatically set for
    Cortex-M targets with CONFIG_ARM_MPU being set. So
    we can remove this from the default setup since it
    is redundant.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 14, 2019
  1. CODEOWNERS: adding code-owner for arch/arm test suite

    ioannisg authored and nashif committed Jul 12, 2019
    Assigning a code-owner for all tests under tests/arch/arm.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. tests: arch: arm_thread_swap: add README file

    ioannisg authored and nashif committed Jul 10, 2019
    The commit adds a README file with a description of the test.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. tests: arch: arm: enhance swap test for FP sharing

    ioannisg authored and nashif committed Jul 8, 2019
    We add a test-case for arch/arm/thread_swap, so the
    test is executed with CONFIG_FLOAT/CONFIG_FP_SHARING
    being enabled, if an FPU is available. We execute the
    test extension with/without enabling compiler optimizations.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. tests: arch: arm: contribute a test for arm swap

    ioannisg authored and nashif committed Jul 8, 2019
    This commit contributes a test for the ARM swap, i.e. the
    context-switch mechanism for the ARM architecture. The test
    verifies that the thread state variables are set and checked
    properly when performing a thread swap-out and swap-in.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 11, 2019
  1. tests: kernel: critical: alternative test-case for SAM SoCs with WDT

    ioannisg authored and MaureenHelm committed Jul 5, 2019
    In SAM SoCs Watchdog is selected by default and runs
    with some default configuration, unless the build sets
    CONFIG_WDT_DISABLE_AT_BOOT. As the tests/kernel/critical
    takes relatively large amount of time to complete, the
    watchdog (that is never fed in the test) will eventually
    trigger a reset. As a result the test keeps restarting
    continuously and never completes. We want to run the
    test on SAM SoCs, so we do the following:
    - filter our the SAM SoCs with the SAM WDT from the
      default build
    - introduce an alternative test-case for these SoCs
      with the additional CONFIG_WDT_DISABLE_AT_BOOT
      option set.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 10, 2019
  1. tests: kernel: fp_sharing: add test for k_float_disable

    ioannisg authored and andrewboie committed Jul 9, 2019
    This commit contributes the basic testing for
    k_float_disable() API, for ARM and x86 ARCHes.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. tests: kernel: fp_sharing: move fp_sharing test

    ioannisg authored and andrewboie committed Jul 9, 2019
    Make fp_sharing a 'parent' test suite directory, and
    rename the original fp_sharing test into
    tests/kernel/fp_sharing/generic. In this
    way more FP-related tests can be grouped
    together in the same test directory.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. arch: x86: make z_arch_float_disable return -ENOSYS if not supported

    ioannisg authored and andrewboie committed Jul 9, 2019
    For the x86 architecture the z_arch_float_disable() is only
    implemented when building with CONFIG_LAZY_FP_SHARING, so we
    make z_arch_float_disable() return -ENOSYS when we build with
    FLOAT and FP_SHARING but on an x86 platform where
    LAZY_FP_SHARING is not supported.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. kernel: fix #endif quard error for k_float_disable

    ioannisg authored and andrewboie committed Jul 10, 2019
    The implementation of z_impl_float_disable was missplaced
    inside the #ifdef SPIN_VALIDATE. Fixing it.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 9, 2019
  1. tests: arch: x86: move static_idx under tests/arch/x86

    ioannisg authored and nashif committed Jul 7, 2019
    Move the x86-specific static_idx test under
    tests/arch/x86 subdirectory.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. tests: kernel: move arm-specific kernel tests under tests/arch/arm

    ioannisg authored and nashif committed Jul 6, 2019
    This commit moves the arm-specific tests in 'tests/arch/arm'
    subdirectory.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 2, 2019
  1. arch: arm: userspace: don't use the default stack in z_arm_do_syscall

    ioannisg authored and nashif committed Jun 28, 2019
    z_arm_do_syscall is executing in privileged mode. This implies
    that we shall not be allowed to use the thread's default
    unprivileged stack, (i.e push to or pop from it), to avoid any
    possible stack corruptions.
    
    Note that since we execute in PRIV mode and no MPU guard or
    PSPLIM register is guarding the end of the default stack, we
    won't be able to detect any stack overflows.
    
    This commit implement the above change, by forcing
    z_arm_do_syscall() to FIRST switch to privileged
    stack and then do all the preparations to execute
    the system call.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. arch: arm: userspace: correct inline comment for bad syscalls

    ioannisg authored and nashif committed Jun 27, 2019
    We need to correct the inline comment in swap_helper.S,
    which is suggesting that system call attempts with
    invalid syscall IDs (i.e. above the limit) do not force
    the CPU to elevate privileges. This is in fact not true,
    since the execution flow moves into valid syscall ID
    handling.
    
    In other words, all we do for system calls with invalid
    ID numbers is to treat them as valid syscalls with the
    K_SYSCALL_BAD ID value.
    
    We fix the inline documentation to reflect the actual
    execution flow.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. userspace: minor typo fixes in various places

    ioannisg authored and nashif committed Jun 28, 2019
    System call arguments are indexed from 1 to 6, so arg0
    is corrected to arg1 in two occasions. In addition, the
    ARM function for system calls is now called z_arm_do_syscall,
    so we update the inline comment in __svc handler.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. soc: nordic: nrf9160: add IPC capabilities

    ioannisg authored and nashif committed Jul 1, 2019
    The IPC peripheral is missing from the list of
    supported HW for nRF9160, so this commit adds
    that.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jul 1, 2019
  1. tests: kernel: fatal: run test for ARMv8-M with MPU stack guards

    ioannisg authored and andrewboie committed Jun 30, 2019
    HW stack protection in ARMv8-M is implemented by default
    with the built-in stack guard mechanism. Therefore, by
    default all tests for ARMv8-M will use the built-in stack
    overflow mechanism (CONFIG_BUILTIN_STACK_GUARD is set in
    tests). However, we would like have some coverage on the
    MPU stack guard mechanism for ARMv8-M. The added test case
    manually disables BUILTIN_STACK_GUARD and enables the
    MPU_STACK_GUARD option, to provide that test coverage.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. arch: arm: allow user to fall-back to MPU-based guards in ARMv8-M

    ioannisg authored and andrewboie committed Jun 30, 2019
    ARMv8-M architecture supports the built-in stack overflow
    detection mechanisms via the SPLIM registers. However, the
    user might still wish to use the traditional MPU-based stack
    overflow detection mechanism (for testing or other reasons).
    We now allow the user to enable HW stack protection, but
    manually turn off BUILTIN_STACK_GUARD option. This will force
    the MPU_STACK_GUARD option to be selected.
    
    It is still not allowed for the user to not select any stack
    guard mechanisms, if HW_STACK_PROTECTION is selected.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. tests: remove redundant CONFIG_HW_STACK_PROTECTION=y setting

    ioannisg authored and andrewboie committed Jun 30, 2019
    CONFIG_TEST_HW_STACK_PROTECTION is set by default in tests,
    and that one selects HW_STACK_PROTECTION option. Therefore,
    we do not need to set that one explicitly in the test project
    configuration files. We clean up some redundant occurrences of
    CONFIG_HW_STACK_PROTECTION=y from the tree.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jun 28, 2019
  1. arch: arm: mpu: minor fix to the start of the guard

    ioannisg authored and andrewboie committed Jun 28, 2019
    Fix the start of the guard to take into account the
    configurable size of the guard.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. tests: kernel: fatal: check stack overflow of FP capable threads

    ioannisg authored and andrewboie committed Jun 25, 2019
    Test the HW stack protection feature for threads that are
    pre-tagged as FPU users, when building with support for FP
    shared registers mode (CONFIG_FP_SHARING=y).
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. doc: reference: float: document ARM thread tag recommendation

    ioannisg authored and andrewboie committed Jun 18, 2019
    This commit adds a short note in reference/kernel/other/float.
    The note instructs to apply pre-tagging of ARM threads to
    indicate that they indend to use the FP services.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. arch: arm: update thread options flag and CONTROL atomically

    ioannisg authored and andrewboie committed Jun 18, 2019
    Under FP shared registers mode (CONFIG_FP_SHARING=y),
    a thread's user_options flag is checked during swap and
    during stack fail check. Therefore, in k_float_disable()
    we want to ensure that a thread won't be swapped-out with
    K_FP_REGS flag cleared but still FP-active (CONTROL.FPCA
    being not zero). To ensure that we temporarily disable
    interrupts.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  5. arch: arm: rework stack fail checking for FP capable threads

    ioannisg authored and andrewboie committed Jun 18, 2019
    This commit reworks the ARM stack fail checking, under FP
    Sharing registers mode, to account for the right width of
    the MPU stack guard.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  6. arch: arm: mpu: program a wide MPU stack guard for FP capable threads

    ioannisg authored and andrewboie committed May 28, 2019
    For threads that appear to be FP-capable (i.e. with K_FP_REGS
    option flag set), we configure a wide MPU stack guard, if we
    build with stack protection enabled (CONFIG_MPU_STACK_GUARD=y).
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  7. arch: arm: allocate a wide priv stack guard for FP-capable threads

    ioannisg authored and andrewboie committed Jun 18, 2019
    When an FP capable thread (i.e. with K_FP_REGS option)
    transitions into user mode, we want to allocate a wider
    MPU stack guard region, to be able to successfully detect
    overflows of the privilege stack during system calls. For
    that we also need to re-adjust the .priv_stack_start pointer,
    which denotes the start of the writable area of the privilege
    stack buffer.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  8. arch: arm: allocate a wide stack guard for FP-capable threads

    ioannisg authored and andrewboie committed May 28, 2019
    When an FP capable thread is created (i.e. with K_FP_REGS
    option) we want to allocate a wider MPU stack guard region,
    to be able to successfully detect stack overflows. For that
    we also need to re-adjust the values that will be passed to
    the thread's stack_info .start and .size parameters.
    
    applicable) for a thread which intends to use the FP services.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jun 27, 2019
  1. tests: kernel: add simple test for the ramfunc feature

    ioannisg authored and andrewboie committed Jun 26, 2019
    This commit contributes a simple test for
    the ARM RAMFUNC feature.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Commits on Jun 26, 2019
  1. tests: kernel: arm runtime nmi: add arm tag

    ioannisg authored and nashif committed Jun 25, 2019
    Add the arm tag to tests/kernel/arm_runtime_nmi test.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  2. tests: kernel: submit a simple test for zero-latency irqs

    ioannisg authored and nashif committed Jun 25, 2019
    The commit contributes a simple test for the Zero-Latency
    IRQ feature (CONFIG_ZERO_LATENCY_IRQS=y) for ARM platforms.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  3. lib: libc: fix alignment of HEAP base address for ARM

    ioannisg authored and nashif committed Jun 20, 2019
    In ARM builds with support for user mode, i.e. with
    CONFIG_USERSPACE=y, we need to align the beginning
    of the heap space, to respect the ARM MPU region
    alignment requirements.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  4. lib: libc: newlib: define USED_RAM_END_ADDR only where it is needed

    ioannisg authored and nashif committed Jun 19, 2019
    USED_RAM_END_ADDR is not used when Kconfig option
    CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE is defined,
    therefore, we do not need to define the macro in
    that specific case.
    
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Older
You can’t perform that action at this time.