!269 M33平台GCC环境下TZ增加默认选项适配
Merge pull request !269 from wangchen/new_tz
This commit is contained in:
commit
9996ef80d6
|
@ -40,5 +40,6 @@ declare_args() {
|
|||
enable_ohos_kernel_liteos_m_trace = false
|
||||
enable_ohos_kernel_liteos_m_lwip = false
|
||||
enable_ohos_kernel_liteos_m_dynlink = false
|
||||
enable_ohos_kernel_liteos_m_tz = false
|
||||
ohos_kernel_liteos_m_lwip_path = "components/net/lwip-2.1:lwip"
|
||||
}
|
||||
|
|
|
@ -62,7 +62,11 @@ static_library("kernel") {
|
|||
} else if ("$board_cpu" == "cortex-m7") {
|
||||
deps = [ "arch/arm/cortex-m7/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m33") {
|
||||
deps = [ "arch/arm/cortex-m33/gcc/TZ:arch" ]
|
||||
if (enable_ohos_kernel_liteos_m_tz == true) {
|
||||
deps = [ "arch/arm/cortex-m33/gcc/TZ:arch" ]
|
||||
} else {
|
||||
deps = [ "arch/arm/cortex-m33/gcc/NTZ:arch" ]
|
||||
}
|
||||
} else if ("$board_cpu" == "") {
|
||||
if ("$board_arch" == "rv32imac" || "$board_arch" == "rv32imafdc") {
|
||||
deps = [ "arch/risc-v/riscv32/gcc:arch" ]
|
||||
|
|
|
@ -35,9 +35,6 @@ static_library("arch") {
|
|||
"non_secure/los_interrupt.c",
|
||||
"non_secure/los_timer.c",
|
||||
"non_secure/los_trustzone.c",
|
||||
"secure/los_secure_context.c",
|
||||
"secure/los_secure_context_asm.S",
|
||||
"secure/los_secure_heap.c",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "los_secure_context.h"
|
||||
#include "los_debug.h"
|
||||
#include "los_arch_context.h"
|
||||
#include "los_interrupt.h"
|
||||
|
||||
OsSecureContext *g_secureContext = NULL;
|
||||
|
||||
|
@ -69,6 +70,7 @@ VOID LOS_SecureContextAlloc(UINT32 secureStackSize)
|
|||
return;
|
||||
}
|
||||
|
||||
LOS_ASSERT((__get_IPSR() == 0) && (__get_PRIMASK() == 0));
|
||||
secureStackSize = LOS_Align(secureStackSize, sizeof(UINTPTR));
|
||||
HalSVCSecureContextAlloc(secureStackSize);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "los_config.h"
|
||||
#include "los_list.h"
|
||||
|
||||
STATIC UINT8 g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0};
|
||||
STATIC UINT8 __attribute__((aligned(0x4)))g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0};
|
||||
STATIC LOS_DL_LIST g_secureHeapFreeList = {NULL, NULL};
|
||||
|
||||
struct OsSecureHeapNode {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "los_secure_context.h"
|
||||
#include "los_debug.h"
|
||||
#include "los_arch_context.h"
|
||||
#include "los_interrupt.h"
|
||||
|
||||
OsSecureContext *g_secureContext = NULL;
|
||||
|
||||
|
@ -69,6 +70,7 @@ VOID LOS_SecureContextAlloc(UINT32 secureStackSize)
|
|||
return;
|
||||
}
|
||||
|
||||
LOS_ASSERT((__get_IPSR() == 0) && (__get_PRIMASK() == 0));
|
||||
secureStackSize = LOS_Align(secureStackSize, sizeof(UINTPTR));
|
||||
HalSVCSecureContextAlloc(secureStackSize);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "los_config.h"
|
||||
#include "los_list.h"
|
||||
|
||||
#pragma data_alignment=0x4
|
||||
STATIC UINT8 g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0};
|
||||
STATIC LOS_DL_LIST g_secureHeapFreeList = {NULL, NULL};
|
||||
|
||||
|
|
Loading…
Reference in New Issue