update openharmony 1.0.1

This commit is contained in:
mamingshuai
2021-03-11 18:43:57 +08:00
parent e351799d39
commit 73a7b66116
611 changed files with 17977 additions and 14077 deletions

View File

@@ -1,5 +1,5 @@
# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:

4
arch/arm/arm/Makefile Normal file → Executable file
View File

@@ -1,5 +1,5 @@
# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:

4
arch/arm/arm/include/arch_config.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/include/arm.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/include/arm_user_copy.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/include/arm_user_get.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/include/arm_user_put.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/include/los_hw_cpu.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

14
arch/arm/arm/include/los_mmu_descriptor_v6.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -104,6 +104,8 @@ extern "C" {
((x) << MMU_DESCRIPTOR_L1_TEX_SHIFT) /* type extension */
#define MMU_DESCRIPTOR_L1_TYPE_STRONGLY_ORDERED \
(MMU_DESCRIPTOR_L1_TEX(MMU_DESCRIPTOR_TEX_0) | MMU_DESCRIPTOR_NON_CACHEABLE)
#define MMU_DESCRIPTOR_L1_TYPE_NORMAL_NOCACHE \
(MMU_DESCRIPTOR_L1_TEX(MMU_DESCRIPTOR_TEX_1) | MMU_DESCRIPTOR_NON_CACHEABLE)
#define MMU_DESCRIPTOR_L1_TYPE_DEVICE_SHARED \
(MMU_DESCRIPTOR_L1_TEX(MMU_DESCRIPTOR_TEX_0) | MMU_DESCRIPTOR_WRITE_BACK_ALLOCATE)
#define MMU_DESCRIPTOR_L1_TYPE_DEVICE_NON_SHARED \
@@ -141,6 +143,8 @@ extern "C" {
((x) << MMU_DESCRIPTOR_L2_TEX_SHIFT) /* type extension */
#define MMU_DESCRIPTOR_L2_TYPE_STRONGLY_ORDERED \
(MMU_DESCRIPTOR_L2_TEX(MMU_DESCRIPTOR_TEX_0) | MMU_DESCRIPTOR_NON_CACHEABLE)
#define MMU_DESCRIPTOR_L2_TYPE_NORMAL_NOCACHE \
(MMU_DESCRIPTOR_L2_TEX(MMU_DESCRIPTOR_TEX_1) | MMU_DESCRIPTOR_NON_CACHEABLE)
#define MMU_DESCRIPTOR_L2_TYPE_DEVICE_SHARED \
(MMU_DESCRIPTOR_L2_TEX(MMU_DESCRIPTOR_TEX_0) | MMU_DESCRIPTOR_WRITE_BACK_ALLOCATE)
#define MMU_DESCRIPTOR_L2_TYPE_DEVICE_NON_SHARED \
@@ -208,6 +212,12 @@ extern "C" {
MMU_DESCRIPTOR_L1_SMALL_DOMAIN_CLIENT | \
MMU_DESCRIPTOR_L1_AP_P_RW_U_NA)
#define MMU_INITIAL_MAP_NORMAL_NOCACHE \
(MMU_DESCRIPTOR_L1_TYPE_SECTION | \
MMU_DESCRIPTOR_L1_TYPE_NORMAL_NOCACHE | \
MMU_DESCRIPTOR_L1_SMALL_DOMAIN_CLIENT | \
MMU_DESCRIPTOR_L1_AP_P_RW_U_NA)
#define MMU_INITIAL_MAP_DEVICE \
(MMU_DESCRIPTOR_L1_TYPE_SECTION | \
MMU_DESCRIPTOR_L1_TYPE_DEVICE_SHARED | \

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/hw_user_get.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/hw_user_put.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/include/asm.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -52,7 +52,8 @@ STATIC INLINE VOID OsSetCurrCpuSp(UINTPTR regSp)
extern UINT32 OsGetSystemStatus(VOID);
extern VOID BackTraceSub(UINTPTR regFP);
extern VOID OsExcInit(VOID);
extern VOID OsKillUserProcess(UINTPTR sp);
extern BOOL OsSystemExcIsReset(VOID);
#ifdef __cplusplus
#if __cplusplus
}

4
arch/arm/arm/src/include/los_hw_pri.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

110
arch/arm/arm/src/los_arch_mmu.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -91,11 +91,6 @@ STATIC INT32 OsMapParamCheck(UINT32 flags, VADDR_T vaddr, PADDR_T paddr)
}
#endif
if (!(flags & VM_MAP_REGION_FLAG_PERM_READ)) {
VM_ERR("miss read flag");
return LOS_ERRNO_VM_INVALID_ARGS;
}
/* paddr and vaddr must be aligned */
if (!MMU_DESCRIPTOR_IS_L2_SIZE_ALIGNED(vaddr) || !MMU_DESCRIPTOR_IS_L2_SIZE_ALIGNED(paddr)) {
return LOS_ERRNO_VM_INVALID_ARGS;
@@ -114,6 +109,9 @@ STATIC VOID OsCvtPte2AttsToFlags(PTE_T l1Entry, PTE_T l2Entry, UINT32 *flags)
switch (l2Entry & MMU_DESCRIPTOR_L2_TEX_TYPE_MASK) {
case MMU_DESCRIPTOR_L2_TYPE_STRONGLY_ORDERED:
*flags |= VM_MAP_REGION_FLAG_STRONGLY_ORDERED;
break;
case MMU_DESCRIPTOR_L2_TYPE_NORMAL_NOCACHE:
*flags |= VM_MAP_REGION_FLAG_UNCACHED;
break;
case MMU_DESCRIPTOR_L2_TYPE_DEVICE_SHARED:
@@ -208,10 +206,10 @@ STATIC VOID OsTryUnmapL1PTE(const LosArchMmu *archMmu, vaddr_t vaddr, UINT32 sca
}
}
/* convert user level mmu flags to L1 descriptors flags */
STATIC UINT32 OsCvtSecFlagsToAttrs(UINT32 flags)
STATIC UINT32 OsCvtSecCacheFlagsToMMUFlags(UINT32 flags)
{
UINT32 mmuFlags = MMU_DESCRIPTOR_L1_SMALL_DOMAIN_CLIENT;
UINT32 mmuFlags = 0;
switch (flags & VM_MAP_REGION_FLAG_CACHE_MASK) {
case VM_MAP_REGION_FLAG_CACHED:
mmuFlags |= MMU_DESCRIPTOR_L1_TYPE_NORMAL_WRITE_BACK_ALLOCATE;
@@ -219,33 +217,63 @@ STATIC UINT32 OsCvtSecFlagsToAttrs(UINT32 flags)
mmuFlags |= MMU_DESCRIPTOR_L1_SECTION_SHAREABLE;
#endif
break;
case VM_MAP_REGION_FLAG_WRITE_COMBINING:
case VM_MAP_REGION_FLAG_UNCACHED:
case VM_MAP_REGION_FLAG_STRONGLY_ORDERED:
mmuFlags |= MMU_DESCRIPTOR_L1_TYPE_STRONGLY_ORDERED;
break;
case VM_MAP_REGION_FLAG_UNCACHED:
mmuFlags |= MMU_DESCRIPTOR_L1_TYPE_NORMAL_NOCACHE;
break;
case VM_MAP_REGION_FLAG_UNCACHED_DEVICE:
mmuFlags |= MMU_DESCRIPTOR_L1_TYPE_DEVICE_SHARED;
break;
default:
return LOS_ERRNO_VM_INVALID_ARGS;
}
return mmuFlags;
}
switch (flags & (VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_WRITE)) {
STATIC UINT32 OsCvtSecAccessFlagsToMMUFlags(UINT32 flags)
{
UINT32 mmuFlags = 0;
switch (flags & (VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE)) {
case 0:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_NA_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_READ:
case VM_MAP_REGION_FLAG_PERM_USER:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_RO_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_RW_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_USER:
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_RO_U_RO;
break;
case VM_MAP_REGION_FLAG_PERM_WRITE:
case VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_RW_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_WRITE:
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_RW_U_RW;
break;
default:
break;
}
return mmuFlags;
}
/* convert user level mmu flags to L1 descriptors flags */
STATIC UINT32 OsCvtSecFlagsToAttrs(UINT32 flags)
{
UINT32 mmuFlags;
mmuFlags = OsCvtSecCacheFlagsToMMUFlags(flags);
if (mmuFlags == LOS_ERRNO_VM_INVALID_ARGS) {
return mmuFlags;
}
mmuFlags |= MMU_DESCRIPTOR_L1_SMALL_DOMAIN_CLIENT;
mmuFlags |= OsCvtSecAccessFlagsToMMUFlags(flags);
if (!(flags & VM_MAP_REGION_FLAG_PERM_EXECUTE)) {
mmuFlags |= MMU_DESCRIPTOR_L1_SECTION_XN;
@@ -271,6 +299,9 @@ STATIC VOID OsCvtSecAttsToFlags(PTE_T l1Entry, UINT32 *flags)
switch (l1Entry & MMU_DESCRIPTOR_L1_TEX_TYPE_MASK) {
case MMU_DESCRIPTOR_L1_TYPE_STRONGLY_ORDERED:
*flags |= VM_MAP_REGION_FLAG_STRONGLY_ORDERED;
break;
case MMU_DESCRIPTOR_L1_TYPE_NORMAL_NOCACHE:
*flags |= VM_MAP_REGION_FLAG_UNCACHED;
break;
case MMU_DESCRIPTOR_L1_TYPE_DEVICE_SHARED:
@@ -494,8 +525,7 @@ STATIC VOID OsMapL1PTE(LosArchMmu *archMmu, PTE_T *pte1Ptr, vaddr_t vaddr, UINT3
OsSavePte1(OsGetPte1Ptr(archMmu->virtTtb, vaddr), *pte1Ptr);
}
/* convert user level mmu flags to L2 descriptors flags */
STATIC UINT32 OsCvtPte2FlagsToAttrs(uint32_t flags)
STATIC UINT32 OsCvtPte2CacheFlagsToMMUFlags(UINT32 flags)
{
UINT32 mmuFlags = 0;
@@ -506,33 +536,61 @@ STATIC UINT32 OsCvtPte2FlagsToAttrs(uint32_t flags)
#endif
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_NORMAL_WRITE_BACK_ALLOCATE;
break;
case VM_MAP_REGION_FLAG_WRITE_COMBINING:
case VM_MAP_REGION_FLAG_UNCACHED:
case VM_MAP_REGION_FLAG_STRONGLY_ORDERED:
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_STRONGLY_ORDERED;
break;
case VM_MAP_REGION_FLAG_UNCACHED:
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_NORMAL_NOCACHE;
break;
case VM_MAP_REGION_FLAG_UNCACHED_DEVICE:
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_DEVICE_SHARED;
break;
default:
return LOS_ERRNO_VM_INVALID_ARGS;
}
return mmuFlags;
}
switch (flags & (VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_WRITE)) {
STATIC UINT32 OsCvtPte2AccessFlagsToMMUFlags(UINT32 flags)
{
UINT32 mmuFlags = 0;
switch (flags & (VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE)) {
case 0:
mmuFlags |= MMU_DESCRIPTOR_L1_AP_P_NA_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_READ:
case VM_MAP_REGION_FLAG_PERM_USER:
mmuFlags |= MMU_DESCRIPTOR_L2_AP_P_RO_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L2_AP_P_RW_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_USER:
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ:
mmuFlags |= MMU_DESCRIPTOR_L2_AP_P_RO_U_RO;
break;
case VM_MAP_REGION_FLAG_PERM_WRITE:
case VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L2_AP_P_RW_U_NA;
break;
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_WRITE:
case VM_MAP_REGION_FLAG_PERM_USER | VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE:
mmuFlags |= MMU_DESCRIPTOR_L2_AP_P_RW_U_RW;
break;
default:
break;
}
return mmuFlags;
}
/* convert user level mmu flags to L2 descriptors flags */
STATIC UINT32 OsCvtPte2FlagsToAttrs(UINT32 flags)
{
UINT32 mmuFlags;
mmuFlags = OsCvtPte2CacheFlagsToMMUFlags(flags);
if (mmuFlags == LOS_ERRNO_VM_INVALID_ARGS) {
return mmuFlags;
}
mmuFlags |= OsCvtPte2AccessFlagsToMMUFlags(flags);
if (!(flags & VM_MAP_REGION_FLAG_PERM_EXECUTE)) {
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_SMALL_PAGE_XN;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -34,8 +34,8 @@
* @ingroup kernel
*/
#include "los_typedef.h"
#include "los_asid.h"
#include "los_bitmap.h"
#include "los_spinlock.h"
#include "los_mmu_descriptor_v6.h"

56
arch/arm/arm/src/los_dispatch.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -32,20 +32,11 @@
#include "asm.h"
#include "arch_config.h"
#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
.extern OsLockDepCheckOut
#endif
.extern g_taskSpin
.extern g_percpu
.global OsStartToRun
.extern OsSchedToUserReleaseLock
.global OsTaskSchedule
.global OsTaskContextLoad
.global OsIrqHandler
.global ArchSpinUnlock
.global OsSchedToUserSpinUnlock
.equ OS_TASK_STATUS_RUNNING, 0x0010U
.equ OS_PERCPU_STRUCT_SIZE, 0x28U
.equ OS_PERCPU_TASK_LOCK_OFFSET, 0x14U
.fpu vfpv4
/* macros to align and unalign the stack on 8 byte boundary for ABI compliance */
@@ -88,26 +79,6 @@
#endif
.endm
/* R0: new task */
OsStartToRun:
MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE)
LDRH R1, [R0, #4]
ORR R1, #OS_TASK_STATUS_RUNNING
STRH R1, [R0, #4]
/* R0 is new task, save it on tpidrprw */
MCR p15, 0, R0, c13, c0, 4
ISB
VPUSH {S0} /* fpu */
VPOP {S0}
VPUSH {D0}
VPOP {D0}
B OsTaskContextLoad
/*
* R0: new task
* R1: run task
@@ -152,24 +123,11 @@ OsTaskContextLoad:
BNE OsKernelTaskLoad
#ifdef LOSCFG_KERNEL_SMP
#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
/* 8 bytes stack align */
SUB SP, SP, #4
LDR R0, =g_taskSpin
BL OsLockDepCheckOut
BL OsSchedToUserReleaseLock
ADD SP, SP, #4
#endif
/* R0 = &g_taskSpin.rawLock */
LDR R0, =g_taskSpin
BL ArchSpinUnlock
LDR R2, =g_percpu
MRC P15, 0, R3, C0, C0, 5
UXTB R3, R3
MOV R1, #OS_PERCPU_STRUCT_SIZE
MLA R3, R1, R3, R2
MOV R2, #0
STR R2, [R3, #OS_PERCPU_TASK_LOCK_OFFSET]
#endif
MVN R3, #CPSR_INT_DISABLE
AND R4, R4, R3
@@ -245,9 +203,7 @@ OsIrqFromKernel:
/* process pending signals */
BL OsTaskProcSignal
/* check if needs to schedule */
CMP R0, #0
BLNE OsSchedPreempt
BL OsSchedIrqEndCheckNeedSched
MOV R0,SP
MOV R1,R7

107
arch/arm/arm/src/los_exc.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -341,7 +341,7 @@ STATIC VOID OsExcSysInfo(UINT32 excType, const ExcContext *excBufAddr)
excBufAddr->SP);
}
PrintExcInfo("fp = 0x%x\n", excBufAddr->R11);
PrintExcInfo("\nfp = 0x%x\n", excBufAddr->R11);
}
STATIC VOID OsExcRegsInfo(const ExcContext *excBufAddr)
@@ -422,7 +422,7 @@ STATIC VOID OsDumpExcVaddrRegion(LosVmSpace *space, LosVmMapRegion *region)
mmuFlag = FALSE;
}
PrintExcInfo(" 0x%08x 0x%08x 0x%08x\n",
startVaddr, LOS_PaddrToKVaddr(startPaddr), pageCount << PAGE_SHIFT);
startVaddr, LOS_PaddrToKVaddr(startPaddr), (UINT32)pageCount << PAGE_SHIFT);
pageCount = 0;
startPaddr = 0;
}
@@ -544,6 +544,7 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr)
OsProcessExitCodeCoreDumpSet(runProcess);
#endif
OsProcessExitCodeSignalSet(runProcess, SIGUSR2);
/* kill user exc process */
LOS_Exit(OS_PRO_EXIT_OK);
@@ -784,9 +785,9 @@ VOID OsBackTrace(VOID)
{
UINT32 regFP = Get_Fp();
LosTaskCB *runTask = OsCurrTaskGet();
PRINTK("OsBackTrace fp = 0x%x\n", regFP);
PRINTK("runTask->taskName = %s\n", runTask->taskName);
PRINTK("runTask->taskID = %u\n", runTask->taskID);
PrintExcInfo("OsBackTrace fp = 0x%x\n", regFP);
PrintExcInfo("runTask->taskName = %s\n", runTask->taskName);
PrintExcInfo("runTask->taskID = %u\n", runTask->taskID);
BackTrace(regFP);
}
@@ -1005,6 +1006,35 @@ LITE_OS_SEC_TEXT VOID STATIC OsExcPriorDisposal(ExcContext *excBufAddr)
#endif
}
}
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_FS_VFS
/* Wait for the end of the Console task to avoid multicore printing code */
OsWaitConsoleSendTaskPend(OsCurrTaskGet()->taskID);
#endif
#endif
}
LITE_OS_SEC_TEXT_INIT STATIC VOID OsPrintExcHead(UINT32 far)
{
#ifdef LOSCFG_DEBUG_VERSION
LosVmSpace *space = NULL;
VADDR_T vaddr;
#endif
/* You are not allowed to add any other print information before this exception information */
if (g_excFromUserMode[ArchCurrCpuid()] == TRUE) {
#ifdef LOSCFG_DEBUG_VERSION
vaddr = ROUNDDOWN(far, PAGE_SIZE);
space = LOS_SpaceGet(vaddr);
if (space != NULL) {
LOS_DumpMemRegion(vaddr);
}
#endif
PrintExcInfo("##################excFrom: User!####################\n");
} else {
PrintExcInfo("##################excFrom: kernel!###################\n");
}
}
/*
@@ -1021,19 +1051,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAd
OsExcPriorDisposal(excBufAddr);
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_FS_VFS
/* Wait for the end of the Console task to avoid multicore printing code */
OsWaitConsoleSendTaskPend(OsCurrTaskGet()->taskID);
#endif
#endif
/* You are not allowed to add any other print information before this exception information */
if (g_excFromUserMode[ArchCurrCpuid()] == TRUE) {
PrintExcInfo("##################excFrom: User!####################\n");
} else {
PrintExcInfo("##################excFrom: kernel###################!\n");
}
OsPrintExcHead(far);
#if (LOSCFG_KERNEL_SMP == YES)
OsAllCpuStatusOutput();
@@ -1070,6 +1088,15 @@ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAd
#ifdef LOSCFG_EXC_INTERACTION
OsExcInteractionTaskKeep();
#endif
#ifdef LOSCFG_SHELL_CMD_DEBUG
SystemRebootFunc rebootHook = OsGetRebootHook();
if ((OsSystemExcIsReset() == TRUE) && (rebootHook != NULL)) {
LOS_Mdelay(3000); /* 3000: System dead, delay 3 seconds after system restart */
rebootHook();
}
#endif
while (1) {}
}
@@ -1092,6 +1119,46 @@ VOID __stack_chk_fail(VOID)
__builtin_return_address(0));
}
VOID LOS_RecordLR(UINTPTR *LR, UINT32 LRSize, UINT32 recordCount, UINT32 jumpCount)
{
UINT32 count = 0;
UINT32 index = 0;
UINT32 stackStart, stackEnd;
LosTaskCB *taskCB = NULL;
UINTPTR framePtr, tmpFramePtr, linkReg;
if (LR == NULL) {
return;
}
/* if LR array is not enough,just record LRSize. */
if (LRSize < recordCount) {
recordCount = LRSize;
}
taskCB = OsCurrTaskGet();
stackStart = taskCB->topOfStack;
stackEnd = stackStart + taskCB->stackSize;
framePtr = Get_Fp();
while ((framePtr > stackStart) && (framePtr < stackEnd) && IS_ALIGNED(framePtr, sizeof(CHAR *))) {
tmpFramePtr = framePtr;
linkReg = *(UINTPTR *)framePtr;
if (index >= jumpCount) {
LR[count++] = linkReg;
if (count == recordCount) {
break;
}
}
index++;
framePtr = *(UINTPTR *)(tmpFramePtr - sizeof(UINTPTR));
}
/* if linkReg is not enough,clean up the last of the effective LR as the end. */
if (count < recordCount) {
LR[count] = 0;
}
}
#ifdef __cplusplus
#if __cplusplus
}

4
arch/arm/arm/src/los_hw.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/los_hw_exc.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -31,11 +31,11 @@
#include "los_hwi.h"
#include "los_memory.h"
#include "los_tickless_pri.h"
#include "los_spinlock.h"
#ifdef LOSCFG_KERNEL_CPUP
#include "los_cpup_pri.h"
#endif
#include "los_sched_pri.h"
#ifdef __cplusplus
#if __cplusplus
@@ -68,6 +68,11 @@ CHAR *OsGetHwiFormName(UINT32 index)
return g_hwiFormName[index];
}
UINT32 LOS_GetSystemHwiMaximum(VOID)
{
return OS_HWI_MAX_NUM;
}
typedef VOID (*HWI_PROC_FUNC0)(VOID);
typedef VOID (*HWI_PROC_FUNC2)(INT32, VOID *);
VOID OsInterrupt(UINT32 intNum)
@@ -75,16 +80,16 @@ VOID OsInterrupt(UINT32 intNum)
HwiHandleForm *hwiForm = NULL;
UINT32 *intCnt = NULL;
/* Must keep the operation at the beginning of the interface */
intCnt = &g_intCount[ArchCurrCpuid()];
*intCnt = *intCnt + 1;
OsSchedIrqStartTime();
#ifdef LOSCFG_CPUP_INCLUDE_IRQ
OsCpupIrqStart();
#endif
#ifdef LOSCFG_KERNEL_TICKLESS
OsTicklessUpdate(intNum);
#endif
hwiForm = (&g_hwiForm[intNum]);
#ifndef LOSCFG_NO_SHARED_IRQ
while (hwiForm->pstNext != NULL) {
@@ -107,10 +112,13 @@ VOID OsInterrupt(UINT32 intNum)
#endif
++g_hwiFormCnt[intNum];
*intCnt = *intCnt - 1;
#ifdef LOSCFG_CPUP_INCLUDE_IRQ
OsCpupIrqEnd(intNum);
#endif
OsSchedIrqUpdateUsedTime();
/* Must keep the operation at the end of the interface */
*intCnt = *intCnt - 1;
}
STATIC HWI_ARG_T OsHwiCpIrqParam(const HwiIrqParam *irqParam)

79
arch/arm/arm/src/startup/reset_vector_mp.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -112,6 +112,20 @@ __exception_handlers:
/* Startup code which will get the machine into supervisor mode */
.global reset_vector
.type reset_vector,function
#ifdef LOSCFG_QUICK_START
__quickstart_args_start:
.fill 512,1,0
__quickstart_args_end:
.global OsGetArgsAddr
.type OsGetArgsAddr,function
OsGetArgsAddr:
ldr r0, =__quickstart_args_start
bx lr
#endif
reset_vector:
/* clear register TPIDRPRW */
mov r0, #0
@@ -122,6 +136,20 @@ reset_vector:
bic r0, #(1<<2 | 1<<0)
mcr p15, 0, r0, c1, c0, 0
/* enable fpu+neon */
#ifndef LOSCFG_TEE_ENABLE
MRC p15, 0, r0, c1, c1, 2
ORR r0, r0, #0xC00
BIC r0, r0, #0xC000
MCR p15, 0, r0, c1, c1, 2
LDR r0, =(0xF << 20)
MCR p15, 0, r0, c1, c0, 2
ISB
#endif
MOV r3, #0x40000000
VMSR FPEXC, r3
/* r11: delta of physical address and virtual address */
adr r11, pa_va_offset
ldr r0, [r11]
@@ -156,10 +184,13 @@ reloc_img_to_bottom_loop:
reloc_img_to_bottom_done:
ldr r4, =g_firstPageTable /* r4: physical address of translation table and clear it */
add r4, r4, r11
bl page_table_clear
mov r0, r4
mov r1, #0
mov r2, #MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS
bl memset
PAGE_TABLE_SET SYS_MEM_BASE, KERNEL_VMM_BASE, KERNEL_VMM_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS
PAGE_TABLE_SET SYS_MEM_BASE, UNCACHED_VMM_BASE, UNCACHED_VMM_SIZE, MMU_INITIAL_MAP_STRONGLY_ORDERED
PAGE_TABLE_SET SYS_MEM_BASE, UNCACHED_VMM_BASE, UNCACHED_VMM_SIZE, MMU_INITIAL_MAP_NORMAL_NOCACHE
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_DEVICE_BASE, PERIPH_DEVICE_SIZE, MMU_INITIAL_MAP_DEVICE
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_CACHED_BASE, PERIPH_CACHED_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_UNCACHED_BASE, PERIPH_UNCACHED_SIZE, MMU_INITIAL_MAP_STRONGLY_ORDERED
@@ -169,7 +200,6 @@ reloc_img_to_bottom_done:
add r4, r4, r11
ldr r4, [r4]
add r4, r4, r11 /* r4: jump pagetable paddr */
bl page_table_clear
/* build 1M section mapping, in order to jump va during turing on mmu:pa == pa, va == pa */
mov r6, pc
@@ -233,20 +263,6 @@ warm_reset:
sub r0, r0, r2
mov sp, r0
/* enable fpu+neon */
#ifndef LOSCFG_TEE_ENABLE
MRC p15, 0, r0, c1, c1, 2
ORR r0, r0, #0xC00
BIC r0, r0, #0xC000
MCR p15, 0, r0, c1, c1, 2
LDR r0, =(0xF << 20)
MCR p15, 0, r0, c1, c0, 2
#endif
MOV r3, #0x40000000
VMSR FPEXC, r3
LDR r0, =__exception_handlers
MCR p15, 0, r0, c12, c0, 0
@@ -254,14 +270,11 @@ warm_reset:
bne cpu_start
clear_bss:
ldr r1, =__bss_start
ldr r0, =__bss_start
ldr r2, =__bss_end
mov r0, #0
bss_loop:
cmp r1, r2
strlo r0, [r1], #4
blo bss_loop
mov r1, #0
sub r2, r2, r0
bl memset
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
@@ -371,20 +384,6 @@ sp_set:
mov sp, r2
bx lr /* set sp */
/*
* r4: page table base address
* r5 and r6 will be used as variable
*/
page_table_clear:
mov r5, #0
mov r6, #0
0:
str r5, [r4, r6, lsl #2]
add r6, #1
cmp r6, #0x1000 /* r6 < 4096 */
blt 0b
bx lr
/*
* r4: page table base address
* r6: physical address

53
arch/arm/arm/src/startup/reset_vector_up.S Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -53,7 +53,6 @@
.extern __bss_start
.extern __bss_end
.extern hal_clock_initialize_start
.extern los_bss_init
.extern _osExceptFiqHdl
.extern _osExceptAddrAbortHdl
.extern _osExceptDataAbortHdl
@@ -119,6 +118,20 @@ reset_vector:
bic r0, #(1<<2 | 1<<0)
mcr p15, 0, r0, c1, c0, 0
/* enable fpu+neon */
#ifndef LOSCFG_TEE_ENABLE
MRC p15, 0, r0, c1, c1, 2
ORR r0, r0, #0xC00
BIC r0, r0, #0xC000
MCR p15, 0, r0, c1, c1, 2
LDR r0, =(0xF << 20)
MCR p15, 0, r0, c1, c0, 2
ISB
#endif
MOV r3, #0x40000000
VMSR FPEXC, r3
/* r11: delta of physical address and virtual address */
adr r11, pa_va_offset
ldr r0, [r11]
@@ -148,10 +161,14 @@ reloc_img_to_bottom_loop:
reloc_img_to_bottom_done:
ldr r4, =g_firstPageTable /* r4: physical address of translation table and clear it */
add r4, r4, r11
bl page_table_clear
mov r0, r4
mov r1, #0
mov r2, #MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS
bl memset
PAGE_TABLE_SET SYS_MEM_BASE, KERNEL_VMM_BASE, KERNEL_VMM_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS
PAGE_TABLE_SET SYS_MEM_BASE, UNCACHED_VMM_BASE, UNCACHED_VMM_SIZE, MMU_INITIAL_MAP_STRONGLY_ORDERED
PAGE_TABLE_SET SYS_MEM_BASE, UNCACHED_VMM_BASE, UNCACHED_VMM_SIZE, MMU_INITIAL_MAP_NORMAL_NOCACHE
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_DEVICE_BASE, PERIPH_DEVICE_SIZE, MMU_INITIAL_MAP_DEVICE
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_CACHED_BASE, PERIPH_CACHED_SIZE, MMU_DESCRIPTOR_KERNEL_L1_PTE_FLAGS
PAGE_TABLE_SET PERIPH_PMM_BASE, PERIPH_UNCACHED_BASE, PERIPH_UNCACHED_SIZE, MMU_INITIAL_MAP_STRONGLY_ORDERED
@@ -161,7 +178,6 @@ reloc_img_to_bottom_done:
add r4, r4, r11
ldr r4, [r4]
add r4, r4, r11 /* r4: jump pagetable paddr */
bl page_table_clear
/* build 1M section mapping, in order to jump va during turing on mmu:pa == pa, va == pa */
mov r6, pc
@@ -246,14 +262,11 @@ warm_reset:
bne cpu_start
clear_bss:
ldr r1, =__bss_start
ldr r0, =__bss_start
ldr r2, =__bss_end
mov r0, #0
bss_loop:
cmp r1, r2
strlo r0, [r1], #4
blo bss_loop
mov r1, #0
sub r2, r2, r0
bl memset
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
@@ -339,20 +352,6 @@ sp_set:
mov sp, r2
bx lr /* set sp */
/*
* r4: page table base address
* r5 and r6 will be used as variable
*/
page_table_clear:
mov r5, #0
mov r6, #0
0:
str r5, [r4, r6, lsl #2]
add r6, #1
cmp r6, #0x1000 /* r6 < 4096 */
blt 0b
bx lr
/*
* r4: page table base address
* r6: physical address

4
arch/arm/arm/src/strncpy_from_user.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/strnlen_user.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/arm/src/user_copy.c Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/include/in_cksum.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

484
arch/arm/include/los_exc.h Normal file → Executable file
View File

@@ -1,233 +1,251 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @defgroup los_exc Exception handling
* @ingroup kernel
*/
#ifndef _LOS_EXC_H
#define _LOS_EXC_H
#include "los_typedef.h"
#include "arch_config.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
/**
* @ingroup los_exc
* Register information structure
*
* Description: register information stored when an exception occurs on an LPC2458 platform.
*
* Note: The following register names without uw are the register names used in the chip manual.
*/
#ifdef LOSCFG_ARCH_ARM_AARCH64
#define EXC_GEN_REGS_NUM 30
typedef struct {
UINT64 X[EXC_GEN_REGS_NUM]; /**< Register X0-X29 */
UINT64 LR; /**< Program returning address. X30 */
UINT64 SP;
UINT64 regELR;
UINT64 SPSR;
} ExcContext;
#else
typedef struct {
UINT32 USP; /**< User mode stack pointer */
UINT32 ULR; /**< User mode program returning address */
UINT32 regCPSR; /**< Current program status register (CPSR) */
UINT32 R0; /**< Register R0 */
UINT32 R1; /**< Register R1 */
UINT32 R2; /**< Register R2 */
UINT32 R3; /**< Register R3 */
UINT32 R4; /**< Register R4 */
UINT32 R5; /**< Register R5 */
UINT32 R6; /**< Register R6 */
UINT32 R7; /**< Register R7 */
UINT32 R8; /**< Register R8 */
UINT32 R9; /**< Register R9 */
UINT32 R10; /**< Register R10 */
UINT32 R11; /**< Register R11 */
UINT32 R12; /**< Register R12 */
UINT32 SP; /**< Stack pointer */
UINT32 LR; /**< Program returning address. */
UINT32 PC; /**< PC pointer of the exceptional function */
} ExcContext;
#endif
/**
* @ingroup los_exc
* Exception information structure
*
* Description: exception information stored when an exception occurs on an LPC2458 platform.
*
*/
typedef struct {
UINT16 phase; /**< Phase in which an exception occurs */
UINT16 type; /**< Exception type */
UINT16 nestCnt; /**< Count of nested exception */
UINT16 reserved; /**< Reserved for alignment */
ExcContext *context; /**< Hardware context when an exception occurs */
} ExcInfo;
/**
* @ingroup los_exc
* @brief Kernel FP Register address obtain function.
*
* @par Description:
* The API is used to obtain the FP Register address.
* @attention None.
*
* @param None.
*
* @retval #UINTPTR The FP Register address.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
STATIC INLINE UINTPTR Get_Fp(VOID)
{
UINTPTR regFp;
#ifdef LOSCFG_ARCH_ARM_AARCH64
__asm__ __volatile__("mov %0, X29" : "=r"(regFp));
#else
__asm__ __volatile__("mov %0, fp" : "=r"(regFp));
#endif
return regFp;
}
/**
* @ingroup los_exc
* @brief Define an exception handling function hook.
*
* @par Description:
* This API is used to define the exception handling function hook based on the type of
* the exception handling function and record exceptions.
* @attention None.
*
* @param None.
*
* @retval None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
typedef VOID (*EXC_PROC_FUNC)(UINT32, ExcContext *, UINT32, UINT32);
/**
* @ingroup los_exc
* @brief Register an exception handling hook.
*
* @par Description:
* This API is used to register an exception handling hook.
* @attention If the hook is registered for multiple times, the hook registered at the last time is effective.
* @attention The hook can be registered as NULL, indicating that the hook registration is canceled.
* @param excHook [IN] Type #EXC_PROC_FUNC: hook function.
*
* @retval #LOS_OK The exception handling hook is successfully registered.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook);
/**
* @ingroup los_exc
* @brief Kernel panic function.
*
* @par Description:
* Stack function that prints kernel panics.
* @attention After this function is called and stack information is printed, the system will fail to respond.
* @attention The input parameter can be NULL.
* @param fmt [IN] Type #CHAR* : variadic argument.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
VOID LOS_Panic(const CHAR *fmt, ...);
/**
* @ingroup los_exc
* @brief Kernel backtrace function.
*
* @par Description:
* Backtrace function that prints task call stack information traced from the running task.
* @attention None.
*
* @param None.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern VOID OsBackTrace(VOID);
/**
* @ingroup los_exc
* @brief Kernel task backtrace function.
*
* @par Description:
* Backtrace function that prints task call stack information traced from the input task.
* @attention
* <ul>
* <li>The input taskID should be valid.</li>
* </ul>
*
* @param taskID [IN] Type #UINT32 Task ID.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern VOID OsTaskBackTrace(UINT32 taskID);
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _LOS_EXC_H */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @defgroup los_exc Exception handling
* @ingroup kernel
*/
#ifndef _LOS_EXC_H
#define _LOS_EXC_H
#include "los_typedef.h"
#include "arch_config.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
/**
* @ingroup los_exc
* Register information structure
*
* Description: register information stored when an exception occurs on an LPC2458 platform.
*
* Note: The following register names without uw are the register names used in the chip manual.
*/
#ifdef LOSCFG_ARCH_ARM_AARCH64
#define EXC_GEN_REGS_NUM 30
typedef struct {
UINT64 X[EXC_GEN_REGS_NUM]; /**< Register X0-X29 */
UINT64 LR; /**< Program returning address. X30 */
UINT64 SP;
UINT64 regELR;
UINT64 SPSR;
} ExcContext;
#else
typedef struct {
UINT32 USP; /**< User mode stack pointer */
UINT32 ULR; /**< User mode program returning address */
UINT32 regCPSR; /**< Current program status register (CPSR) */
UINT32 R0; /**< Register R0 */
UINT32 R1; /**< Register R1 */
UINT32 R2; /**< Register R2 */
UINT32 R3; /**< Register R3 */
UINT32 R4; /**< Register R4 */
UINT32 R5; /**< Register R5 */
UINT32 R6; /**< Register R6 */
UINT32 R7; /**< Register R7 */
UINT32 R8; /**< Register R8 */
UINT32 R9; /**< Register R9 */
UINT32 R10; /**< Register R10 */
UINT32 R11; /**< Register R11 */
UINT32 R12; /**< Register R12 */
UINT32 SP; /**< Stack pointer */
UINT32 LR; /**< Program returning address. */
UINT32 PC; /**< PC pointer of the exceptional function */
} ExcContext;
#endif
/**
* @ingroup los_exc
* Exception information structure
*
* Description: exception information stored when an exception occurs on an LPC2458 platform.
*
*/
typedef struct {
UINT16 phase; /**< Phase in which an exception occurs */
UINT16 type; /**< Exception type */
UINT16 nestCnt; /**< Count of nested exception */
UINT16 reserved; /**< Reserved for alignment */
ExcContext *context; /**< Hardware context when an exception occurs */
} ExcInfo;
/**
* @ingroup los_exc
* @brief Kernel FP Register address obtain function.
*
* @par Description:
* The API is used to obtain the FP Register address.
* @attention None.
*
* @param None.
*
* @retval #UINTPTR The FP Register address.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
STATIC INLINE UINTPTR Get_Fp(VOID)
{
UINTPTR regFp;
#ifdef LOSCFG_ARCH_ARM_AARCH64
__asm__ __volatile__("mov %0, X29" : "=r"(regFp));
#else
__asm__ __volatile__("mov %0, fp" : "=r"(regFp));
#endif
return regFp;
}
/**
* @ingroup los_exc
* @brief Define an exception handling function hook.
*
* @par Description:
* This API is used to define the exception handling function hook based on the type of
* the exception handling function and record exceptions.
* @attention None.
*
* @param None.
*
* @retval None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
typedef VOID (*EXC_PROC_FUNC)(UINT32, ExcContext *, UINT32, UINT32);
/**
* @ingroup los_exc
* @brief Register an exception handling hook.
*
* @par Description:
* This API is used to register an exception handling hook.
* @attention If the hook is registered for multiple times, the hook registered at the last time is effective.
* @attention The hook can be registered as NULL, indicating that the hook registration is canceled.
* @param excHook [IN] Type #EXC_PROC_FUNC: hook function.
*
* @retval #LOS_OK The exception handling hook is successfully registered.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook);
/**
* @ingroup los_exc
* @brief Kernel panic function.
*
* @par Description:
* Stack function that prints kernel panics.
* @attention After this function is called and stack information is printed, the system will fail to respond.
* @attention The input parameter can be NULL.
* @param fmt [IN] Type #CHAR* : variadic argument.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
VOID LOS_Panic(const CHAR *fmt, ...);
/**
* @ingroup los_exc
* @brief record LR function.
*
* @par Description:
* @attention
* @param LR [IN] Type #UINTPTR * LR buffer.
* @param recordCount [IN] Type UINT32 record LR lay number.
* @param jumpCount [IN] Type UINT32 ignore LR lay number.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
VOID LOS_RecordLR(UINTPTR *LR, UINT32 LRSize, UINT32 recordCount, UINT32 jumpCount);
/**
* @ingroup los_exc
* @brief Kernel backtrace function.
*
* @par Description:
* Backtrace function that prints task call stack information traced from the running task.
* @attention None.
*
* @param None.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern VOID OsBackTrace(VOID);
/**
* @ingroup los_exc
* @brief Kernel task backtrace function.
*
* @par Description:
* Backtrace function that prints task call stack information traced from the input task.
* @attention
* <ul>
* <li>The input taskID should be valid.</li>
* </ul>
*
* @param taskID [IN] Type #UINT32 Task ID.
*
* @retval #None.
*
* @par Dependency:
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
extern VOID OsTaskBackTrace(UINT32 taskID);
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _LOS_EXC_H */

4
arch/arm/include/los_hw.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

21
arch/arm/include/los_hwi.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -339,6 +339,23 @@ STATIC INLINE VOID LOS_IntRestore(UINT32 intSave)
ArchIntRestore(intSave);
}
/**
* @ingroup los_hwi
* @brief Gets the maximum number of interrupts supported by the system.
*
* @par Description:
* <ul>
* <li>This API is used to gets the maximum number of interrupts supported by the system.</li>
* </ul>
*
* @param None.
*
* @retval None.
* @par Dependency:
* <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
*/
extern UINT32 LOS_GetSystemHwiMaximum(VOID);
/**
* @ingroup los_hwi
* @brief Create a hardware interrupt.

4
arch/arm/include/los_strncpy_from_user.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/include/los_strnlen_user.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/include/los_user_get.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/include/los_user_put.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:

4
arch/arm/include/user_copy.h Normal file → Executable file
View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: