Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
647f3def
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
647f3def
编写于
6月 07, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 07, 2021
浏览文件
操作
浏览文件
下载
差异文件
!296 支持最小化特性编译,添加了一个针对qemu arm virt的样例config配置
Merge pull request !296 from Caoruihong/master
上级
c39c10c9
744b2021
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
97 addition
and
49 deletion
+97
-49
Makefile
Makefile
+2
-3
arch/arm/arm/src/los_exc.c
arch/arm/arm/src/los_exc.c
+2
-0
compat/posix/src/mqueue.c
compat/posix/src/mqueue.c
+2
-0
compat/posix/src/time.c
compat/posix/src/time.c
+43
-44
kernel/base/core/los_process.c
kernel/base/core/los_process.c
+4
-0
kernel/base/include/los_vm_filemap.h
kernel/base/include/los_vm_filemap.h
+2
-0
kernel/base/misc/sysinfo_shellcmd.c
kernel/base/misc/sysinfo_shellcmd.c
+1
-0
kernel/base/misc/vm_shellcmd.c
kernel/base/misc/vm_shellcmd.c
+2
-1
kernel/base/vm/los_vm_dump.c
kernel/base/vm/los_vm_dump.c
+2
-0
kernel/base/vm/los_vm_filemap.c
kernel/base/vm/los_vm_filemap.c
+3
-0
kernel/base/vm/los_vm_map.c
kernel/base/vm/los_vm_map.c
+2
-0
kernel/base/vm/los_vm_phys.c
kernel/base/vm/los_vm_phys.c
+1
-1
kernel/common/los_config.c
kernel/common/los_config.c
+7
-0
kernel/common/los_printf.c
kernel/common/los_printf.c
+2
-0
syscall/los_syscall.h
syscall/los_syscall.h
+8
-0
tools/build/config/qemu_arm_virt_mini.config
tools/build/config/qemu_arm_virt_mini.config
+14
-0
未找到文件。
Makefile
浏览文件 @
647f3def
...
...
@@ -145,10 +145,9 @@ genconfig:$(MENUCONFIG_CONF)
$<
--silentoldconfig
$(KCONFIG_FILE_PATH)
##### menuconfig end #######
$(LITEOS_MENUCONFIG_H)
:
ifneq
($(LITEOS_MENUCONFIG_H), $(wildcard $(LITEOS_MENUCONFIG_H)))
$(LITEOS_MENUCONFIG_H)
:
.config
$(HIDE)$(MAKE)
genconfig
endif
$(LITEOS_TARGET)
:
$(__LIBS)
$(HIDE)
touch
$(LOSCFG_ENTRY_SRC)
...
...
arch/arm/arm/src/los_exc.c
浏览文件 @
647f3def
...
...
@@ -692,7 +692,9 @@ VOID BackTraceSub(UINTPTR regFP)
UINTPTR
backFP
=
regFP
;
UINT32
count
=
0
;
VADDR_T
kvaddr
;
#ifdef LOSCFG_KERNEL_VM
LosProcessCB
*
runProcess
=
OsCurrProcessGet
();
#endif
if
(
FindSuitableStack
(
regFP
,
&
stackStart
,
&
stackEnd
,
&
kvaddr
)
==
FALSE
)
{
PrintExcInfo
(
"traceback error fp = 0x%x
\n
"
,
regFP
);
...
...
compat/posix/src/mqueue.c
浏览文件 @
647f3def
...
...
@@ -30,6 +30,7 @@
*/
#include "mqueue.h"
#ifdef LOSCFG_FS_VFS
#include "fcntl.h"
#include "pthread.h"
#include "map_error.h"
...
...
@@ -831,3 +832,4 @@ ssize_t mq_receive(mqd_t personal, char *msg_ptr, size_t msg_len, unsigned int *
return
mq_timedreceive
(
personal
,
msg_ptr
,
msg_len
,
msg_prio
,
NULL
);
}
#endif
compat/posix/src/time.c
浏览文件 @
647f3def
...
...
@@ -451,6 +451,7 @@ int clock_settime(clockid_t clockID, const struct timespec *tp)
return
settimeofday
(
&
tv
,
NULL
);
}
#ifdef LOSCFG_KERNEL_CPUP
static
int
PthreadGetCputime
(
clockid_t
clockID
,
struct
timespec
*
ats
)
{
uint64_t
runtime
;
...
...
@@ -519,12 +520,47 @@ static int GetCputime(clockid_t clockID, struct timespec *tp)
return
ret
;
}
static
int
CheckClock
(
const
clockid_t
clockID
)
{
int
error
=
0
;
const
pid_t
pid
=
((
pid_t
)
~
((
clockID
)
>>
CPUCLOCK_ID_OFFSET
));
if
(
!
((
UINT32
)
clockID
&
CPUCLOCK_PERTHREAD_MASK
))
{
LosProcessCB
*
spcb
=
NULL
;
if
(
OsProcessIDUserCheckInvalid
(
pid
)
||
pid
<
0
)
{
return
-
EINVAL
;
}
spcb
=
OS_PCB_FROM_PID
(
pid
);
if
(
OsProcessIsUnused
(
spcb
))
{
error
=
-
EINVAL
;
}
}
else
{
error
=
-
EINVAL
;
}
return
error
;
}
static
int
CpuClockGetres
(
const
clockid_t
clockID
,
struct
timespec
*
tp
)
{
if
(
clockID
>
0
)
{
return
-
EINVAL
;
}
int
error
=
CheckClock
(
clockID
);
if
(
!
error
)
{
error
=
ProcessGetCputime
(
clockID
,
tp
);
}
return
error
;
}
#endif
int
clock_gettime
(
clockid_t
clockID
,
struct
timespec
*
tp
)
{
UINT32
intSave
;
struct
timespec64
tmp
=
{
0
};
struct
timespec64
hwTime
=
{
0
};
int
ret
;
if
(
clockID
>
MAX_CLOCKS
)
{
goto
ERROUT
;
...
...
@@ -566,61 +602,24 @@ int clock_gettime(clockid_t clockID, struct timespec *tp)
case
CLOCK_TAI
:
TIME_RETURN
(
ENOTSUP
);
default:
{
{
#ifdef LOSCFG_KERNEL_CPUP
ret
=
GetCputime
(
clockID
,
tp
);
int
ret
=
GetCputime
(
clockID
,
tp
);
TIME_RETURN
(
-
ret
);
#else
TIME_RETURN
(
EINVAL
);
TIME_RETURN
(
EINVAL
);
#endif
}
}
}
return
0
;
ERROUT:
ERROUT:
TIME_RETURN
(
EINVAL
);
}
static
int
CheckClock
(
const
clockid_t
clockID
)
{
int
error
=
0
;
const
pid_t
pid
=
((
pid_t
)
~
((
clockID
)
>>
CPUCLOCK_ID_OFFSET
));
if
(
!
((
UINT32
)
clockID
&
CPUCLOCK_PERTHREAD_MASK
))
{
LosProcessCB
*
spcb
=
NULL
;
if
(
OsProcessIDUserCheckInvalid
(
pid
)
||
pid
<
0
)
{
return
-
EINVAL
;
}
spcb
=
OS_PCB_FROM_PID
(
pid
);
if
(
OsProcessIsUnused
(
spcb
))
{
error
=
-
EINVAL
;
}
}
else
{
error
=
-
EINVAL
;
}
return
error
;
}
static
int
CpuClockGetres
(
const
clockid_t
clockID
,
struct
timespec
*
tp
)
{
if
(
clockID
>
0
)
{
return
-
EINVAL
;
}
int
error
=
CheckClock
(
clockID
);
if
(
!
error
)
{
error
=
ProcessGetCputime
(
clockID
,
tp
);
}
return
error
;
}
int
clock_getres
(
clockid_t
clockID
,
struct
timespec
*
tp
)
{
int
ret
;
if
(
tp
==
NULL
)
{
TIME_RETURN
(
EINVAL
);
}
...
...
@@ -650,7 +649,7 @@ int clock_getres(clockid_t clockID, struct timespec *tp)
default:
#ifdef LOSCFG_KERNEL_CPUP
{
ret
=
CpuClockGetres
(
clockID
,
tp
);
int
ret
=
CpuClockGetres
(
clockID
,
tp
);
TIME_RETURN
(
-
ret
);
}
#else
...
...
kernel/base/core/los_process.c
浏览文件 @
647f3def
...
...
@@ -751,8 +751,12 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsSystemProcessCreate(VOID)
LOS_ListTailInsert
(
&
kerInitProcess
->
childrenList
,
&
idleProcess
->
siblingList
);
idleProcess
->
group
=
kerInitProcess
->
group
;
LOS_ListTailInsert
(
&
kerInitProcess
->
group
->
processList
,
&
idleProcess
->
subordinateGroupList
);
#ifdef LOSCFG_SECURITY_CAPABILITY
idleProcess
->
user
=
kerInitProcess
->
user
;
#endif
#ifdef LOSCFG_FS_VFS
idleProcess
->
files
=
kerInitProcess
->
files
;
#endif
ret
=
OsIdleTaskCreate
();
if
(
ret
!=
LOS_OK
)
{
...
...
kernel/base/include/los_vm_filemap.h
浏览文件 @
647f3def
...
...
@@ -37,7 +37,9 @@
#ifndef __LOS_VM_FILEMAP_H__
#define __LOS_VM_FILEMAP_H__
#ifdef LOSCFG_FS_VFS
#include "fs/file.h"
#endif
#include "los_vm_map.h"
#include "los_vm_page.h"
#include "los_vm_common.h"
...
...
kernel/base/misc/sysinfo_shellcmd.c
浏览文件 @
647f3def
...
...
@@ -34,6 +34,7 @@
#include "los_sem_pri.h"
#include "los_queue_pri.h"
#include "los_swtmr_pri.h"
#include "los_task_pri.h"
#ifdef LOSCFG_SHELL
#include "shcmd.h"
...
...
kernel/base/misc/vm_shellcmd.c
浏览文件 @
647f3def
...
...
@@ -42,8 +42,9 @@
#include "los_oom.h"
#include "los_vm_dump.h"
#include "los_process_pri.h"
#ifdef LOSCFG_FS_VFS
#include "fs/path_cache.h"
#endif
#ifdef LOSCFG_KERNEL_VM
...
...
kernel/base/vm/los_vm_dump.c
浏览文件 @
647f3def
...
...
@@ -36,7 +36,9 @@
#include "los_vm_dump.h"
#include "los_mmu_descriptor_v6.h"
#ifdef LOSCFG_FS_VFS
#include "fs/fs.h"
#endif
#include "los_printf.h"
#include "los_vm_page.h"
#include "los_vm_phys.h"
...
...
kernel/base/vm/los_vm_filemap.c
浏览文件 @
647f3def
...
...
@@ -42,6 +42,9 @@
#include "los_process_pri.h"
#include "los_vm_lock.h"
#ifndef UNUSED
#define UNUSED(x) (VOID)x
#endif
#ifdef LOSCFG_KERNEL_VM
...
...
kernel/base/vm/los_vm_map.c
浏览文件 @
647f3def
...
...
@@ -40,7 +40,9 @@
#include "los_vm_shm_pri.h"
#include "los_arch_mmu.h"
#include "los_process_pri.h"
#ifdef LOSCFG_FS_VFS
#include "fs/fs.h"
#endif
#include "los_task.h"
#include "los_memory_pri.h"
#include "los_vm_boot.h"
...
...
kernel/base/vm/los_vm_phys.c
浏览文件 @
647f3def
...
...
@@ -626,7 +626,7 @@ size_t LOS_PhysPagesFree(LOS_DL_LIST *list)
#else
VADDR_T
*
LOS_PaddrToKVaddr
(
PADDR_T
paddr
)
{
if
((
paddr
<
DDR_MEM_ADDR
)
||
(
paddr
>=
(
DDR_MEM_ADDR
+
DDR_MEM_SIZE
)))
{
if
((
paddr
<
DDR_MEM_ADDR
)
||
(
paddr
>=
(
(
PADDR_T
)
DDR_MEM_ADDR
+
DDR_MEM_SIZE
)))
{
return
NULL
;
}
...
...
kernel/common/los_config.c
浏览文件 @
647f3def
...
...
@@ -280,6 +280,13 @@ LITE_OS_SEC_TEXT_INIT INT32 OsMain(VOID)
return
LOS_OK
;
}
#ifndef LOSCFG_PLATFORM_ADAPT
STATIC
VOID
SystemInit
(
VOID
)
{
PRINTK
(
"dummy: *** %s ***
\n
"
,
__FUNCTION__
);
}
#endif
STATIC
UINT32
OsSystemInitTaskCreate
(
VOID
)
{
UINT32
taskID
;
...
...
kernel/common/los_printf.c
浏览文件 @
647f3def
...
...
@@ -85,6 +85,7 @@ STATIC VOID UartOutput(const CHAR *str, UINT32 len, BOOL isLock)
#endif
}
#ifdef LOSCFG_PLATFORM_CONSOLE
STATIC
VOID
ConsoleOutput
(
const
CHAR
*
str
,
UINT32
len
)
{
ssize_t
writen
=
0
;
...
...
@@ -100,6 +101,7 @@ STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len)
toWrite
-=
cnt
;
}
}
#endif
VOID
OutputControl
(
const
CHAR
*
str
,
UINT32
len
,
OutputType
type
)
{
...
...
syscall/los_syscall.h
浏览文件 @
647f3def
...
...
@@ -36,7 +36,9 @@
#include "los_task.h"
#include "los_mux.h"
#include "los_signal.h"
#ifdef LOSCFG_FS_VFS
#include "fs/fs.h"
#endif
#include "syscall.h"
#include "sysinfo.h"
#include "time_posix.h"
...
...
@@ -49,7 +51,9 @@
#include "sys/shm.h"
#include "poll.h"
#include "utime.h"
#ifdef LOSCFG_COMPAT_POSIX
#include "mqueue.h"
#endif
#include "time.h"
#include "sys/time.h"
#include "sys/stat.h"
...
...
@@ -108,6 +112,8 @@ extern int SysFutex(const unsigned int *uAddr, unsigned int flags, int val,
unsigned
int
absTime
,
const
unsigned
int
*
newUserAddr
);
extern
int
SysSchedGetAffinity
(
int
id
,
unsigned
int
*
cpuset
,
int
flag
);
extern
int
SysSchedSetAffinity
(
int
id
,
const
unsigned
short
cpuset
,
int
flag
);
#ifdef LOSCFG_COMPAT_POSIX
extern
mqd_t
SysMqOpen
(
const
char
*
mqName
,
int
openFlag
,
mode_t
mode
,
struct
mq_attr
*
attr
);
extern
int
SysMqClose
(
mqd_t
personal
);
extern
int
SysMqGetSetAttr
(
mqd_t
mqd
,
const
struct
mq_attr
*
new
,
struct
mq_attr
*
old
);
...
...
@@ -117,6 +123,8 @@ extern int SysMqTimedSend(mqd_t personal, const char *msg, size_t msgLen, unsign
const
struct
timespec
*
absTimeout
);
extern
ssize_t
SysMqTimedReceive
(
mqd_t
personal
,
char
*
msg
,
size_t
msgLen
,
unsigned
int
*
msgPrio
,
const
struct
timespec
*
absTimeout
);
#endif
extern
int
SysSigAction
(
int
sig
,
const
sigaction_t
*
restrict
sa
,
sigaction_t
*
restrict
old
,
size_t
sigsetsize
);
extern
int
SysSigprocMask
(
int
how
,
const
sigset_t_l
*
restrict
set
,
sigset_t
*
restrict
old
,
size_t
sigsetsize
);
extern
int
SysKill
(
pid_t
pid
,
int
sig
);
...
...
tools/build/config/qemu_arm_virt_mini.config
0 → 100644
浏览文件 @
647f3def
LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7
=
y
LOSCFG_BOARD_CONFIG_PATH
=
"device/qemu/arm_virt/liteos_a/config/board"
# LOSCFG_HRTIMER_ENABLE is not set
# LOSCFG_IRQ_USE_STANDALONE_STACK is not set
# LOSCFG_KERNEL_MMU is not set
# LOSCFG_KERNEL_EXTKERNEL is not set
# LOSCFG_BASE_CORE_HILOG is not set
# LOSCFG_LIB_ZLIB is not set
# LOSCFG_FS_VFS is not set
# LOSCFG_NET_LWIP_SACK is not set
# LOSCFG_PLATFORM_ADAPT is not set
# LOSCFG_ENABLE_MAGICKEY is not set
# LOSCFG_DRIVERS is not set
# LOSCFG_SECURITY is not set
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录