arvinzzz
b3d96d166c
refactor: 清理Makefile冗余项
...
清理Makefile冗余项,各模块Makefile里不需要再次引用公共路径,只需引用私有头文件路径
close: #I49MOO
Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I2dd7189c866498896461f78bfed5444ae1d86876
2021-09-13 18:14:15 +08:00
openharmony_ci
ba977dd5ab
!605 refactor: 内核目录结构整理
...
Merge pull request !605 from Zhaotianyu/0902dir_refactor
2021-09-09 01:23:33 +00:00
arvinzzz
33d0c1bd0b
refactor: 内核目录结构整理
...
1. 原kernel/common目录下属于内核拓展组件,统一移入kernel/extend管理
2. Kconfig分层,各模块自己的配置放到自己目录下管理
3. 原platform下不属于平台的公共代码抽到kernel/common下,只留板级链接脚本和一些编译脚本指向device目录下触发平台相关的编译
4. 对外公共头文件统一抽到对外include路径
5. 废弃宏,头文件清理
close: #I48KI4
Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I0cf5ea81c92a8fa7b113da9cbdc8b7bc935f5aae
2021-09-08 16:36:28 +08:00
openharmony_ci
597ced7948
!595 fix: dyload open close failed
...
Merge pull request !595 from MGY917/dyload_fd
2021-09-08 08:26:55 +00:00
Guangyao Ma
5e87d8c183
fix: dyload open close failed
...
本次提交修复内核加载器,异常情况分支的一个bug:mksh通过exec命令(mksh内置命令
,正常情况下,该命令成功执行会复用mksh进程空间,拉起新的指定进程)。但是如果
进程没有成功加载的情况下,内核加载器的异常分支会错误释放mksh的fd句柄。最终导致
下次拉起其他进程时(fork + exec方式),新的进程会继承fd,映射了早就释放的sysfd
,此时的sysfd可能已经被复用,issue场景下这个sysfd被加载过程中打开的libc.so占用
,exec时会释放procfd->sysfd(错误的映射关系),最终新进程libc.so被关闭。
导致内核崩溃。
close #I452Z7
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
Change-Id: Ifca809f88b5ffcfb879dc5520d1f6adf5cf92bcd
2021-09-07 16:28:37 +08:00
LiteOS2021
dc9ec6856f
feat: L0-L1 支持Trace
...
1.【需求描述】
L0~L1 支持Trace,提供两种工作模式:在线模式、离线缓存模式, 用于按时间线追踪系统事件,如任务切换、中断、ipc等。
2.【方案描述】
L0:
(1).在内核模块预置静态代码桩
(2).触发桩后,收集系统上下文信息
(3).离线模式则写入内存,用户可通过dump导出;
(4).在线模式通过pipeline对接IDE进行可视化解析和展示;
L1:
新增trace字符设备,位于"/dev/trace",通过对设备节点的read\write\ioctl,实现用户态trace;
BREAKING CHANGE:
1.新增一系列trace的对外API,位于los_trace.h中.
LOS_TRACE_EASY简易插桩
LOS_TRACE标准插桩
LOS_TraceInit配置Trace缓冲区的地址和大小
LOS_TraceStart开启事件记录
LOS_TraceStop停止事件记录
LOS_TraceRecordDump输出Trace缓冲区数据
LOS_TraceRecordGet获取Trace缓冲区的首地址
LOS_TraceReset清除Trace缓冲区中的事件
LOS_TraceEventMaskSet设置事件掩码,仅记录某些模块的事件
LOS_TraceHwiFilterHookReg注册过滤特定中断号事件的钩子函数
Close #I46WA0
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
Change-Id: I6a8e64794c4852f2c2980993a06180e09ec6ee0d
2021-08-31 20:29:45 +08:00
Caoruihong
df35eb513d
chore(make): optimize build scripts
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ibb4223ef2d032a03950263b766414ca1c021e69a
2021-08-30 17:18:21 +08:00
Caoruihong
0e260949c9
feat(make): optimize makefiles and remove some unused files
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ie2dfa7334417ccd55bd56a19a7882a982ce49cab
2021-08-22 04:23:40 +08:00
openharmony_ci
0f4d5a4b0c
!287 feat(vfs): vfs支持FD_CLOEXEC标记
...
Merge pull request !287 from MGY917/master
2021-08-12 00:36:19 +00:00
Guangyao Ma
27dca4d857
feat(vfs): vfs支持FD_CLOEXEC标记
...
首先,POSIX规范规定文件描述符需要支持close-on-exec属性,修改前的vfs不支持close-on-exec,当exec系列函数执行时,进程所有的文件将会被关闭(0,1,2也重新被打开)。但是,系统有些时候是不能在exec时关闭全部文件的,例如在执行exec之前,就需要重定向进程的某些文件描述符时(使用dup2),就希望该文件不被关闭,继续保持重定向属性,shell执行进程并重定向其标准输出到文件,这是我们经常做的事情。
BREAKING CHANGE:
执行exec类函数后,进程拥有的文件描述符情况发生变化:修改前,默认关闭所有的进程文件描述符,0,1,2重新打开;修改后,除非文件描述符拥有FD_CLOEXEC标记,否则该描述符不会被关闭。
re #I3U81W
Change-Id: I54e841ac88e9835ec23e97de0cbc906c4e11f5a4
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-08-11 15:35:46 +08:00
Haryslee
42f374dd7a
fix: 合并进程栈两个地址连续的region
...
背景:进程加载的时候,先预申请一个页用作参数拷贝,另外通过mmap方式申请
额外的虚拟栈空间,此时便有两个地址连续的区间。
方案:新增内部接口OsStackAlloc,用于申请一个连续的虚拟地址区间,并对其
中指定区间做物理内存的映射。
close #I43QYJ
Signed-off-by: Haryslee <lihao189@huawei.com>
Change-Id: I224cca3671c42a94c2f74b2da5a11403849e33d3
2021-08-10 17:20:17 +08:00
Caoruihong
4dc421e3de
fix: liteipc max data size too small
...
use IPC_IO_DATA_MAX from liteipc_adapter.h
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I94f2dd2ff148e8a03ffb2c7b38ab06a34a2d2827
2021-08-02 11:58:29 +08:00
Caoruihong
3b5268f02a
chore: output liteos binaries to target_out_dir
...
liteos binaries no need pack to rootfs.
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Iba650c9d09302902c108760163eca55b4ec40221
2021-07-22 18:52:24 +08:00
Caoruihong
a8805a65aa
feat: add support for gn build system
...
add BUILD.gn for all kernel modules
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I018446427bf64615f2596d47862b219659b58b34
2021-07-21 15:52:40 +08:00
openharmony_ci
003810284c
!384 对内核中menuconfig开关的宏使用#ifdef/#ifndef来做预编译判断
...
Merge pull request !384 from boxi/upload
2021-07-01 07:11:13 +00:00
boxi
4e4f2d6d7e
refactor: 对LiteOS_a内核中menuconfig开关的宏使用#ifdef/#ifndef做预编译处理
...
LiteOS_a中有部分配置宏进行了重复冗余定义,导致当头文件未被包含时,极易引入错误,
故对menuconfig配置宏进行统一处理,均使用#ifdef/#ifndef作为预编译判断方式
Close #I3YEGS
Change-Id: Ife6db770cc66de1d6199a4f3ba3950e9bfd0e71a
Signed-off-by: boxi <lewis.liulei@huawei.com>
2021-07-01 09:08:18 +08:00
Caoruihong
d7672d47f2
chore: make liteos_a can be built alone
...
in the liteos_a directory, we used to use `make clean all` command
to build liteos_a kernel for test.
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I5ca689c1c44052f7de937d7faa9e4d3534d97380
2021-06-30 18:44:46 +08:00
openharmony_ci
abbeca1cb2
!359 sysroot和CPU架构参数通过BUILD.gn传递给Make
...
Merge pull request !359 from Caoruihong/sysroot
2021-06-29 08:14:54 +00:00
openharmony_ci
50c8abc521
!371 fix: 修复kill进程时,liteipc阻塞的进程无法退出问题
...
Merge pull request !371 from zhushengle/p_kill
2021-06-29 05:27:08 +00:00
openharmony_ci
339c467e71
!375 基于汇编实现内核对用户态内存清零的功能
...
Merge pull request !375 from Harylee/mem
2021-06-29 04:41:02 +00:00
Caoruihong
9e45086d19
chore: pass sysroot and arch related cflags by BUILD.gn
...
sysroot and arch related cflags are pass by BUILD.gn now.
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ia6000dd7ed8a8a37e935ace49d8460a919a16566
2021-06-28 16:31:02 +08:00
zhushengle
7de43bb004
fix: 修复kill进程时,因liteipc阻塞的进程概率无法退出问题
...
kill进程时,会将因为liteipc阻塞的线程唤醒,使其调度并自动退出,由于liteipc阻塞机制为
循环阻塞方式,会导致将因liteipc阻塞的线程唤醒后又进入等待中。此处在唤醒因liteipc阻塞的
线程后检查是否已有kill标志,如果有使其按接收数据失败退出,在返回用户态之前,该线程会进
入退出流程,结束运行。
Close #I3XX7K
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Iec4e298dff4aefd2994289067a35cb5673e323f9
2021-06-26 17:08:48 +08:00
Haryslee
9db3407589
feat: 基于汇编实现内核对用户态内存清零的功能
...
背景:LOS_UserMemClear接口原有实现是通过在内核中
申请一块堆内存并对其清零,调用copy_to_user来达到
对用户态内存清零的目的,需要使用堆内存。
修改方案:基于汇编实现内核对用户态内存清零的功能。
close #I3XXT0
Change-Id: I27cb1e45559cb75a9b330799fe427abd54f51c15
Signed-off-by: Haryslee <lihao189@huawei.com>
2021-06-26 15:31:42 +08:00
zhushengle
21d8ac8752
feat: L1支持低功耗投票框架
...
功能描述:
在proc目录下增加power目录,添加powr_mode,power_lock,power_unlock和power_count节点,
power_mode:节点用于查询和设置系统支持的功耗模式
power_lock:用于查询和获取低功耗锁,持锁后,将会阻止系统进入低功耗状态
power_unlock: 用于释放已经持有的低功耗锁,也可查询当前有那些持有低功耗锁
power_count:用于查询当前持有低功耗锁的个数
Close #I3VS5N
Change-Id: I2e2881cc968eab3c5fa6f9dbd7e8c5e448609407
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-06-24 14:27:23 +08:00
openharmony_ci
36e5124c0a
!322 文件系统冗余代码和依赖删除
...
Merge pull request !322 from 野生毛霉君/master
2021-06-19 20:40:14 +08:00
mucor
73a777777e
fix: remove redundant headfile
...
1.remove redundant headfile in kernel, such as:
compiler.h;debug.h;automount.h;inode.h;syslog.h;net.h;
2.split fs.h to file.h and driver.h
3.move vnode.h and path_cache.h to vfs/include
4.remove redundant interface and defines
close: #I3RTNR
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-19 17:32:47 +08:00
openharmony_ci
ed0041ac65
!327 增强Liteipc的多线程保护
...
Merge pull request !327 from Caoruihong/master
2021-06-18 09:45:48 +08:00
openharmony_ci
fa6993381a
!317 chore: rename function OsCreateUserVmSpace
...
Merge pull request !317 from kenneth/los_vm_map
2021-06-17 14:07:51 +08:00
Caoruihong
7e2aef2480
fix: race condition in liteipc
...
global data should be accessed in protection
fix: #I3PW5Y
Change-Id: I9dfa09992eb8e78935ed367240628300fc033193
Signed-off-by: Caoruihong <crh.cao@huawei.com>
2021-06-17 12:01:25 +08:00
kenneth
f0b419099d
chore: rename function OsCreateUserVmSpace
...
rename function OsCreateUserVmSpace to fix typo
close https://gitee.com/openharmony/kernel_liteos_a/issues/I3QD42
Signed-off-by: kenneth <459864689@qq.com>
2021-06-16 15:00:53 +08:00
Guangyao Ma
eca711bb64
fix: avoid compile warning ignored
...
Close #I3VOAO
Change-Id: I42103e0e7061e50f8d63df98ea9f5cecd49fe6f4
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-06-15 19:56:21 +08:00
arvinzzz
8cde768588
refactor: Refactored the kernel boot process and added a init framework
...
close: #I3I768
Change-Id: I4f801df4abe1a9afdf43391c28276e96a5e81513
2021-05-20 16:45:43 +08:00
boxi
4d863e985b
fix: Fix wrong judgment in los_trace.c to avoid null pointer access.
...
Fix wrong judgment in los_trace.c to avoid null pointer access.
Close #I3RT9F
Change-Id: Id37b80fc6acc085205695318232d5f4fd75472aa
2021-05-18 17:21:47 +08:00
zhOu
f76fa4a344
feature: support ipc copy fd to process
2021-05-11 14:56:09 +08:00
openharmony_ci
7ba0bfa800
!157 删除无用的__cplusplus,移除不必要的文件x权限
...
Merge pull request !157 from Caoruihong/cplusplus
2021-04-20 09:01:45 +08:00
Caoruihong
7e73c929a2
remove __cplusplus guards in .c files
...
Change-Id: I052d930d54e63179b17b77f02c107a015f3cfc3f
2021-04-19 18:28:25 +08:00
Caoruihong
1ea9610ffd
code optimization
...
Change-Id: I8d2e9f96e86f4130474da9898791240b5d42328e
2021-04-19 15:24:00 +08:00
wangchenyang
d970750808
Description:vfs refactoring
...
Feature or Bugfix:Feature
Binary Source:Huawei
PrivateCode(Yes/No):Yes
Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47
ChangeID:13306388
2021-03-19 13:22:46 +08:00
mamingshuai
73a7b66116
update openharmony 1.0.1
2021-03-11 18:43:57 +08:00
Harmonica
5dabe5e1ee
update kernel/extended/liteipc/hm_liteipc.c. 修改一个不不合理的英文用词
2020-12-28 15:50:18 +08:00
laokz
86194762a1
修正liteipc两处typos
2020-11-30 15:30:06 +08:00
Caoruihong
63bd69267a
drop unnecessary executable file permission mode
...
Change-Id: Ia6c1f6302407a707b3ec9b805f4c92d8a7970b86
2020-10-13 16:37:25 +08:00
Harylee
f62115dfef
Fix mmap
2020-09-28 16:32:18 +08:00
wenjun
6df931fc98
add OpenHarmony 1.0 baseline
2020-09-08 17:22:24 +08:00