boards: emsk: add initial support of normal/non-secure application
* Non-secure/normal application: em_starterkit_em7d_normal * secure application: em_starterkit_em7d Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
cca39204c2
commit
5bb1f4f230
8 changed files with 96 additions and 5 deletions
|
@ -9,6 +9,10 @@
|
||||||
#include <arch/arc/v2/mpu/arc_mpu.h>
|
#include <arch/arc/v2/mpu/arc_mpu.h>
|
||||||
#include <linker/linker-defs.h>
|
#include <linker/linker-defs.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* for secure firmware, MPU entries are only set up for secure world.
|
||||||
|
* All regions not listed here are shared by secure world and normal world.
|
||||||
|
*/
|
||||||
static struct arc_mpu_region mpu_regions[] = {
|
static struct arc_mpu_region mpu_regions[] = {
|
||||||
#if DT_ICCM_SIZE > 0
|
#if DT_ICCM_SIZE > 0
|
||||||
/* Region ICCM */
|
/* Region ICCM */
|
||||||
|
@ -33,11 +37,19 @@ static struct arc_mpu_region mpu_regions[] = {
|
||||||
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | AUX_MPU_ATTR_UR |
|
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | AUX_MPU_ATTR_UR |
|
||||||
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE | REGION_DYNAMIC),
|
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE | REGION_DYNAMIC),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Region peripheral is shared by secure world and normal world by default,
|
||||||
|
* no need a static mpu entry. If some peripherals belong to secure world,
|
||||||
|
* add it here.
|
||||||
|
*/
|
||||||
|
#ifndef CONFIG_ARC_SECURE_FIRMWARE
|
||||||
/* Region Peripheral */
|
/* Region Peripheral */
|
||||||
MPU_REGION_ENTRY("PERIPHERAL",
|
MPU_REGION_ENTRY("PERIPHERAL",
|
||||||
0xF0000000,
|
0xF0000000,
|
||||||
64 * 1024,
|
64 * 1024,
|
||||||
REGION_KERNEL_RAM_ATTR),
|
REGION_KERNEL_RAM_ATTR)
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct arc_mpu_config mpu_config = {
|
struct arc_mpu_config mpu_config = {
|
||||||
|
|
|
@ -17,3 +17,5 @@ CONFIG_SERIAL=y
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_ARC_MPU_ENABLE=y
|
CONFIG_ARC_MPU_ENABLE=y
|
||||||
|
CONFIG_ARC_HAS_SECURE=y
|
||||||
|
CONFIG_TRUSTED_EXECUTION_SECURE=y
|
||||||
|
|
42
boards/arc/em_starterkit/em_starterkit_em7d_normal.dts
Normal file
42
boards/arc/em_starterkit/em_starterkit_em7d_normal.dts
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018, Synopsys, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include <mem.h>
|
||||||
|
#include <emsk.dtsi>
|
||||||
|
#include "em_starterkit_r23.dtsi"
|
||||||
|
#include "board.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "em_starterkit_em7d_normal";
|
||||||
|
compatible = "snps,em_starterkit_em7d_normal", "snps,em_starterkit";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
uart-0 = &uart0;
|
||||||
|
uart-1 = &uart1;
|
||||||
|
uart-2 = &uart2;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,sram = &ddr0;
|
||||||
|
zephyr,console = &uart1;
|
||||||
|
zephyr,shell-uart = &uart1;
|
||||||
|
};
|
||||||
|
|
||||||
|
iccm@0 {
|
||||||
|
reg = <0x20000 DT_SIZE_K(128)>;
|
||||||
|
};
|
||||||
|
|
||||||
|
dccm@80000000 {
|
||||||
|
reg = <0x80010000 DT_SIZE_K(64)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart1 {
|
||||||
|
status = "okay";
|
||||||
|
current-speed = <115200>;
|
||||||
|
};
|
18
boards/arc/em_starterkit/em_starterkit_em7d_normal.yaml
Normal file
18
boards/arc/em_starterkit/em_starterkit_em7d_normal.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
identifier: em_starterkit_em7d_normal
|
||||||
|
name: EM Starterkit EM7D normal world
|
||||||
|
type: mcu
|
||||||
|
arch: arc
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- i2c
|
||||||
|
- spi
|
||||||
|
- gpio
|
||||||
|
ram: 64
|
||||||
|
flash: 128
|
||||||
|
testing:
|
||||||
|
default: true
|
||||||
|
ignore_tags:
|
||||||
|
- net
|
||||||
|
- bluetooth
|
18
boards/arc/em_starterkit/em_starterkit_em7d_normal_defconfig
Normal file
18
boards/arc/em_starterkit/em_starterkit_em7d_normal_defconfig
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
CONFIG_ARC=y
|
||||||
|
CONFIG_SOC_EMSK=y
|
||||||
|
CONFIG_SOC_EMSK_EM7D=y
|
||||||
|
CONFIG_BOARD_EM_STARTERKIT=y
|
||||||
|
CONFIG_BOARD_EM_STARTERKIT_R23=y
|
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
|
||||||
|
CONFIG_XIP=n
|
||||||
|
CONFIG_BUILD_OUTPUT_BIN=n
|
||||||
|
CONFIG_PRINTK=y
|
||||||
|
CONFIG_ARCV2_INTERRUPT_UNIT=y
|
||||||
|
CONFIG_ARCV2_TIMER=y
|
||||||
|
CONFIG_CONSOLE=y
|
||||||
|
CONFIG_UART_CONSOLE=y
|
||||||
|
CONFIG_SERIAL=y
|
||||||
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
CONFIG_ARC_MPU_ENABLE=y
|
||||||
|
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
|
|
@ -14,7 +14,6 @@ default SOC_EMSK_EM7D
|
||||||
config SOC_EMSK_EM7D
|
config SOC_EMSK_EM7D
|
||||||
bool "Synopsys ARC EM7D of EMSK"
|
bool "Synopsys ARC EM7D of EMSK"
|
||||||
select CPU_HAS_MPU
|
select CPU_HAS_MPU
|
||||||
select ARC_HAS_SECURE if BOARD_EM_STARTERKIT_R23
|
|
||||||
|
|
||||||
config SOC_EMSK_EM11D
|
config SOC_EMSK_EM11D
|
||||||
bool "Synopsys ARC EM11D of EMSK"
|
bool "Synopsys ARC EM11D of EMSK"
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
|
|
||||||
config SOC_EMSK
|
config SOC_EMSK
|
||||||
bool "Synopsys ARC EM Starter Kit SoC"
|
bool "Synopsys ARC EM Starter Kit SoC"
|
||||||
select HAS_I2C_DW
|
select HAS_I2C_DW if I2C
|
||||||
select HAS_SPI_DW
|
select HAS_SPI_DW if SPI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue