Skip to content
Permalink
Browse files

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>
  • Loading branch information...
vonhust authored and ioannisg committed Aug 1, 2019
1 parent cca3920 commit 5bb1f4f2301b75d097a79fd0981bc9a95919ddb5
@@ -20,4 +20,4 @@ choice

endchoice

endif
endif
@@ -9,6 +9,10 @@
#include <arch/arc/v2/mpu/arc_mpu.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[] = {
#if DT_ICCM_SIZE > 0
/* 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_KE | AUX_MPU_ATTR_UE | REGION_DYNAMIC),
#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 */
MPU_REGION_ENTRY("PERIPHERAL",
0xF0000000,
64 * 1024,
REGION_KERNEL_RAM_ATTR),
REGION_KERNEL_RAM_ATTR)
#endif
};

struct arc_mpu_config mpu_config = {
@@ -17,3 +17,5 @@ CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GPIO=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_ARC_HAS_SECURE=y
CONFIG_TRUSTED_EXECUTION_SECURE=y
@@ -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>;
};
@@ -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
@@ -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
bool "Synopsys ARC EM7D of EMSK"
select CPU_HAS_MPU
select ARC_HAS_SECURE if BOARD_EM_STARTERKIT_R23

config SOC_EMSK_EM11D
bool "Synopsys ARC EM11D of EMSK"
@@ -7,5 +7,5 @@

config SOC_EMSK
bool "Synopsys ARC EM Starter Kit SoC"
select HAS_I2C_DW
select HAS_SPI_DW
select HAS_I2C_DW if I2C
select HAS_SPI_DW if SPI

0 comments on commit 5bb1f4f

Please sign in to comment.
You can’t perform that action at this time.