-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new platform for the TI K3 class of SoCs
Add platform 'k3' for the TI K3 family. These are ARMv8 devices and are quite different from our line of existing ARMv7 OMAP style SoCs, hence the new platform. Signed-off-by: Andrew F. Davis <[email protected]> Acked-by: Jerome Forissier <[email protected]> Acked-by: Jens Wiklander <[email protected]>
- Loading branch information
1 parent
e770203
commit 940a243
Showing
7 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,10 +132,11 @@ R: Linaro <[email protected]> | |
S: Maintained | ||
F: core/arch/arm/plat-stm/ | ||
|
||
Texas Instruments AM43xx, AM57xx, DRA7xx | ||
Texas Instruments AM43xx, AM57xx, DRA7xx, AM65x | ||
R: Andrew F. Davis <[email protected]> | ||
S: Maintained | ||
F: core/arch/arm/plat-ti/ | ||
F: core/arch/arm/plat-k3/ | ||
|
||
Xilinx Zynq 7000 ZC702 Board | ||
R: Yan Yan <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
CFG_WITH_STACK_CANARIES ?= y | ||
CFG_WITH_STATS ?= y | ||
CFG_CRYPTO_WITH_CE ?= n | ||
CFG_WITH_SOFTWARE_PRNG ?= y | ||
CFG_SECURE_DATA_PATH ?= y | ||
|
||
CFG_TZDRAM_START ?= 0x9e800000 | ||
CFG_TZDRAM_SIZE ?= 0x01400000 # 20MB | ||
CFG_SHMEM_START ?= ($(CFG_TZDRAM_START) + $(CFG_TZDRAM_SIZE)) | ||
CFG_SHMEM_SIZE ?= 0x00400000 # 4MB | ||
|
||
$(call force,CFG_TEE_CORE_NB_CORE,8) | ||
$(call force,CFG_8250_UART,y) | ||
$(call force,CFG_GENERIC_BOOT,y) | ||
$(call force,CFG_HWSUPP_MEM_PERM_PXN,y) | ||
$(call force,CFG_PM_STUBS,y) | ||
$(call force,CFG_SECURE_TIME_SOURCE_CNTPCT,y) | ||
$(call force,CFG_WITH_ARM_TRUSTED_FW,y) | ||
$(call force,CFG_GIC,y) | ||
$(call force,CFG_ARM_GICV3,y) | ||
$(call force,CFG_CORE_CLUSTER_SHIFT,1) | ||
|
||
ta-targets = ta_arm32 | ||
|
||
ifeq ($(CFG_ARM64_core),y) | ||
$(call force,CFG_WITH_LPAE,y) | ||
ta-targets += ta_arm64 | ||
else | ||
$(call force,CFG_ARM32_core,y) | ||
endif | ||
|
||
include core/arch/arm/cpu/cortex-armv8-0.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// SPDX-License-Identifier: BSD-2-Clause | ||
/* | ||
* Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ | ||
* Andrew F. Davis <[email protected]> | ||
*/ | ||
|
||
#include <platform_config.h> | ||
|
||
#include <console.h> | ||
#include <drivers/gic.h> | ||
#include <drivers/serial8250_uart.h> | ||
#include <kernel/generic_boot.h> | ||
#include <kernel/panic.h> | ||
#include <kernel/pm_stubs.h> | ||
#include <mm/core_memprot.h> | ||
#include <mm/tee_pager.h> | ||
#include <platform_config.h> | ||
#include <stdint.h> | ||
#include <tee/entry_fast.h> | ||
#include <tee/entry_std.h> | ||
|
||
static struct gic_data gic_data; | ||
static struct serial8250_uart_data console_data; | ||
|
||
register_phys_mem(MEM_AREA_IO_SEC, GICC_BASE, GICC_SIZE); | ||
register_phys_mem(MEM_AREA_IO_SEC, GICD_BASE, GICD_SIZE); | ||
register_phys_mem(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE, | ||
SERIAL8250_UART_REG_SIZE); | ||
|
||
void main_init_gic(void) | ||
{ | ||
vaddr_t gicc_base; | ||
vaddr_t gicd_base; | ||
|
||
gicc_base = (vaddr_t)phys_to_virt(GICC_BASE, MEM_AREA_IO_SEC); | ||
gicd_base = (vaddr_t)phys_to_virt(GICD_BASE, MEM_AREA_IO_SEC); | ||
|
||
if (!gicc_base || !gicd_base) | ||
panic(); | ||
|
||
gic_init_base_addr(&gic_data, gicc_base, gicd_base); | ||
itr_init(&gic_data.chip); | ||
} | ||
|
||
void main_secondary_init_gic(void) | ||
{ | ||
gic_cpu_init(&gic_data); | ||
} | ||
|
||
static void main_fiq(void) | ||
{ | ||
gic_it_handle(&gic_data); | ||
} | ||
|
||
static const struct thread_handlers handlers = { | ||
.std_smc = tee_entry_std, | ||
.fast_smc = tee_entry_fast, | ||
.nintr = main_fiq, | ||
.cpu_on = cpu_on_handler, | ||
.cpu_off = pm_do_nothing, | ||
.cpu_suspend = pm_do_nothing, | ||
.cpu_resume = pm_do_nothing, | ||
.system_off = pm_do_nothing, | ||
.system_reset = pm_do_nothing, | ||
}; | ||
|
||
const struct thread_handlers *generic_boot_get_handlers(void) | ||
{ | ||
return &handlers; | ||
} | ||
|
||
void console_init(void) | ||
{ | ||
serial8250_uart_init(&console_data, CONSOLE_UART_BASE, | ||
CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE); | ||
register_serial_console(&console_data.chip); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SPDX-License-Identifier: BSD-2-Clause */ | ||
/* | ||
* Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ | ||
* Andrew F. Davis <[email protected]> | ||
*/ | ||
|
||
#ifndef PLATFORM_CONFIG_H | ||
#define PLATFORM_CONFIG_H | ||
|
||
#include <mm/generic_ram_layout.h> | ||
|
||
#define UART0_BASE 0x02800000 | ||
#define UART1_BASE 0x02810000 | ||
#define UART2_BASE 0x02820000 | ||
|
||
/* UART0 */ | ||
#define CONSOLE_UART_BASE UART0_BASE | ||
#define CONSOLE_BAUDRATE 115200 | ||
#define CONSOLE_UART_CLK_IN_HZ 48000000 | ||
|
||
#define SCU_BASE 0x01800000 | ||
#define GICC_OFFSET 0x80000 | ||
#define GICC_SIZE 0x90000 | ||
#define GICD_OFFSET 0x0 | ||
#define GICD_SIZE 0x10000 | ||
#define GICC_BASE (SCU_BASE + GICC_OFFSET) | ||
#define GICD_BASE (SCU_BASE + GICD_OFFSET) | ||
|
||
/* Make stacks aligned to data cache line length */ | ||
#define STACK_ALIGNMENT 64 | ||
|
||
#endif /*PLATFORM_CONFIG_H*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
global-incdirs-y += . | ||
srcs-y += main.c |