Microchip Technology SAM L11 Xplained Pro Reference Manual

Text of Microchip Technology SAM L11 Xplained Pro Reference Manual

SAM L11 Security Reference Guide

Introduction This document is intended to help the developer to use SAM L11 security features for building secure embedded applications. The following application development aspects are covered in this document: • Single and dual developer approach • Secure solution development using SAM L11 ecosystem • Secure software protection using ARM® TrustZone® for cortex®-M and Debug Access Levels • System root o

Table of Contents

Introduction......................................................................................................................1 1. Introduction to SAM L11 Security Features............................................................... 3 1.1. TrustZone for ARMv8-M ..............................................................................................................3 1.2. Secure and Non-Secure Peripherals.......................

Introduction to SAM L11 Security Features

1.1 TrustZone for ARMv8-M The central security element for the Microchip SAM L11 microcontroller (MCU) is the implementation of the TrustZone for an ARMv8-M device. The TrustZone technology is a System-on-Chip (SoC) and MCU system-wide approach to security that enables Secure and Non-Secure application code to run on a single MCU. TrustZone for an ARMv8-M device is based on a specific hardware that is implemente

Figure 1-2. IDAU Interface and Memory Accesses

Core/Debugger access Combine IDAU Responder IDAU Interface Non- Secure MPU Secure MPU Access to memory Cortex-M23 Address S / NS / NCS SAM L11 Thanks to this implementation, a simple function call or an interrupt processing results in a branch to a specific security state as illustrated in the figure below. This allows for efficient calling by avoiding any code and execution overhead. Figure 1-3. ARMv8-M w

Memory Security Attribution

To differentiate and isolate the Secure code from the Non-Secure code, the SAM L11 memory is divided into ten memory regions as shown in the figure below. Each region size can be configured using dedicated NVM fuses, such as BS, BNSC, BOOTPROT, AS, ANSC, DS, and RS. Figure 1-4. SAM L11 Memory Regions Secure Flash (BOOT Region) Non‐Secure Callable Flash (BOOT Region) Non‐Secure Flash (BOOT Region) Secure Flash

At the software architecture level, specific Secure and Non-Secure function call mechanisms must be

used to ensure security, which are described in the following sections: 1.1.2.1 Non-Secure Callable APIs When working with TrustZone for ARMv8-M, the application developer can define a set of Non-Secure callable APIs which can be used to access the Secure code from the Non-Secure world. These APIs, known as Secure Gateways (SG) or veneers are in charge of th

Secure_function.c (linked in the secure memory region of the device):

int secure_func1(int x) { return x + 3; } 1.1.2.2 Non-Secure Software Callbacks The Secure code can define and use software callbacks to execute functions from the Non-Secure world. This is a consequence of separating Secure and Non-Secure code into separate executable files. The following figure shows the software callback approach. Figure 1-6. Non-Secure Software Callbacks Flow C

Microchip Technology Microcontrollers Owners Instructions: