Commit Graph

198 Commits

Author SHA1 Message Date
openharmony_ci 78906f4a6c !406 修正最小编译时的错误
Merge pull request !406 from Caoruihong/qemu_mini
2021-07-07 08:29:28 +00:00
Denny 55e5e29005 回退 'Pull Request !401 : 【DFX子系统】【BBoxDetector】LiteOS_A死机重启维测框架' 2021-07-07 10:29:43 +08:00
Caoruihong ac8c2c6d5b fix: minimal compile
fix compile errors in minimal compilation

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I48f4f7b27c684e2c747c1949776c5c4f9e383dec
2021-07-07 00:26:33 +08:00
qidechun 425975e481 feat: add blackbox for liteos_a
1、在内核增加BlackBox核心框架,对外提供模块回调接口注册和故障处理接口。
2、增加默认的系统模块适配层,处理通用内核态和用户态故障日志抓取和保存。

Close #I3NN7V

Signed-off-by: qidechun <qidechun@huawei.com>
2021-07-06 07:49:59 +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
Guangyao Ma 1d952a254a fix: 设置qemu默认userfs大小/修改qemu驱动目录
驱动目录位置不合理,需要调整到/device/qemu/drivers下面

close #I3XW96 #I3XWXD

Change-Id: Ied6b90d2d0631c99f2209f5b72bbd12cdff6b1d5
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-06-26 15:38:19 +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
openharmony_ci eb72f78cf1 !363 userfs分区的起始地址与大小改为通过bootargs配置
Merge pull request !363 from JING/rootfs
2021-06-25 01:05:16 +00:00
openharmony_ci 12577eade5 !358 feat: L1支持低功耗投票框架
Merge pull request !358 from zhushengle/pm_v
2021-06-25 00:26:41 +00:00
openharmony_ci a28dcc38c9 !360 增加清除文件系统缓存的维测接口
Merge pull request !360 from 野生毛霉君/master
2021-06-24 07:34:45 +00:00
mucor 3d1cf683f3 feat: add clear cache cmd to /proc/fs_cache
write "clear pathcahe" to clear pathcaches and vnodes
write "clear pagecache" to clear pagecaches
write "clear all" to clear both pathcaches and pagechaches
the cache in use will not be cleared

close: #I3XLPH

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 15:11:50 +08:00
chenjing 2e2b14205f fix: userfs分区的起始地址与大小改为通过bootargs配置
在内核解析bootargs参数时,加入对userAddr与userSize两个字段的解析。
1、如果bootargs中配置了userAddr与userSize,则使用配置值划分storage分区。
2、如果bootargs中未配置这两个字段,则storage分区默认紧接在rootfs分区后。

close #I3XNEY

Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: Iba63ccd7fc3f7efc1d726c4b38beee5df1d64122
2021-06-24 15:03:53 +08:00
openharmony_ci b8e18ffdf1 !323 fix: 修复内核堆完整性检查逻辑中访问非法指针导致系统异常问题。
Merge pull request !323 from Harylee/mem
2021-06-24 06:45:45 +00: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
chenwei 600dded31e feat: add /proc/fd file to dump the pid/fd/path information
1, for users with privilege, display all users' fd info with the template "Pid  Fd  SysFd Path"
2, for normal user, display its own fd info with the template "Pid Fd Path"

close #I3WB5U

Signed-off-by: chenwei <chenwei26@huawei.com>
2021-06-22 17:27:25 +08:00
mucor 231cb6be27 feat: add /proc/fs_cache to display cache info
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name

close: #I3WWBD

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-22 14:53:17 +08:00
openharmony_ci 7f484dfa09 !315 chore: update LOS_BitmapFfz comment
Merge pull request !315 from kenneth/LOS_BitmapFfz
2021-06-22 06:34:45 +00:00
kenneth 99d7072332 chore: update LOS_BitmapFfz comment
函数LOS_BitmapFfz有2个参数,注释中只描述了一个参数,丢失了对参数numBits的描述,影响导出API文档。补充函数注释的@param部分。

close #I3U3SF

Signed-off-by: kenneth <459864689@qq.com>
2021-06-22 10:22:46 +08:00
Haryslee 30f5ab89b7 fix: 修复内核堆完整性检查逻辑中访问非法指针导致系统异常问题。
内存完整性校验原有逻辑中当检测到非零异常指针后仍继续访问异常指针
next的内存域导致系统异常。
本次修改后的逻辑为:检测到非零异常指针后直接退出循环,将异常指针
的相关信息输出即可,增加了goto逻辑。对原有功能逻辑无影响。

close #I3VJZT

Change-Id: I5be06a552cf9fd74d8bd78f5cdf04db06eab4f76
Signed-off-by: Haryslee <lihao189@huawei.com>
2021-06-22 09:54:31 +08:00
SimonLi 2f3d7efc24 回退 'Pull Request !342 : 增加/proc/fs_cache来显示文件系统缓存维测信息' 2021-06-21 21:33:52 +08:00
mucor 53c6d96c6f feat: add /proc/fs_cache to display cache info
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name

close: #I3WESD

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-21 16:11:06 +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 dca42b9ef6 !316 fix: update LOS_DL_LIST_IS_END comment
Merge pull request !316 from kenneth/LOS_DL_LIST_IS_END
2021-06-17 14:08:29 +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
openharmony_ci 37d80146db !321 chore: fix typos
Merge pull request !321 from kenneth/destroy
2021-06-17 14:06:06 +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
Kenneth 81f3d59717 chore: fix typos
fix typo destroy

close https://gitee.com/openharmony/kernel_liteos_a/issues/I3RR17

Signed-off-by: Kenneth <459864689@qq.com>
2021-06-16 14:52:06 +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
kenneth 900269bd46 fix: update LOS_DL_LIST_IS_END comment
update  LOS_DL_LIST_IS_END comment

close https://gitee.com/openharmony/kernel_liteos_a/issues/I3TWU6

Signed-off-by: kenneth <459864689@qq.com>
2021-06-15 17:16:41 +08:00
zhushengle 23937a239f fix: 3518平台, 异常测试进程无法正常退出
用户态线程在用户态处于while(1), 在中断处理时使该线程处于READY状态,
此时进程退出时该线程无法被正常回收,导致进程无法合理退出。

Close #I3V8R5

Change-Id: I7f83f5f7fe41c03eb602bf78cfd33fff1b0acdb7
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-06-10 20:11:36 +08:00
openharmony_ci 4e269d7071 !304 mmc驱动代码上库
Merge pull request !304 from liangxuewu/MMC_DRIVER_PRJECT
2021-06-09 20:46:02 +08:00
YOUR_NAME 44ce696904 fix: 内核态在console初始化完成后,使用printf无法正常打印
printf实现流程上会调用cmd为TIOCGWINSZ的ioctl命令,该命令的实现
在console层ConsoleGetWinSize函数中,而此函数copy结果时使用函数
LOS_ArchCopyToUser,由于该过程在内核态,导致LOS_ArchCopyToUser失败,
从而引发printf无法正常打印的问题。

close: #I3UG00

Signed-off-by: zhangfanfan <zhangfanfan2@huawei.com>
Change-Id: I3e85f682429cbe30842206842ddb2a8388ec8412
2021-06-08 20:01:39 +08:00
lzl 6352d6e1da kernel adapter
Signed-off-by: lzl <sucer_fater@163.com>
2021-06-08 09:07:04 +00:00
openharmony_ci 1a3f3f54e7 !302 fix: Codex告警清零
Merge pull request !302 from Far/master
2021-06-08 08:48:48 +08:00
openharmony_ci 647f3defcd !296 支持最小化特性编译,添加了一个针对qemu arm virt的样例config配置
Merge pull request !296 from Caoruihong/master
2021-06-07 22:51:46 +08:00
Far b5370af822 fix: codex clean
1. 修复可能对NULL指针解引用的场景
2. 将不修改内容的指针入参修改为const
3. 对getpgrp的返回值进行校验后再使用
4. 修复了局部变量未初始化的问题

Close #I3UOFN

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-07 17:08:02 +08:00
Caoruihong 744b2021b2 chore: add a mini config for qemu arm virt
support turn off as many features as possible.
current only libc and posix and bsd can not be turned off.

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I1e97570c67593207a56dc11f357eca4b4a018bfd
2021-06-05 17:40:22 +08:00
Kiita e5f6bf0556 feat: timer_create支持以SIGEV_THREAD方式创建定时器
【背景】当前timer_create接口不支持以SIGEV_THREAD的方式创建多个定时器

【修改方案】
1、内核timer_create接口在创建software timers相应的线程时,使用线程
taskCB所携带的信息识别各个线程的信号并依据该信息分别派发出信号。
2、关于用户任务操作许可验证的修改,现在允许同一用户线程向其自身派发信
号,软件定时器计时结束,向用户态发送相应的信号,完成用户态线程的回调。

【影响】
对现有的产品暂无影响。

re #I3SRFI

Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: Ia23f5ef01975bf867dd7f5db797a30c264c50501
2021-06-04 15:29:44 +08:00
openharmony_ci 042f06e2b1 !260 【轻量级 PR】:fix: fix stored typo
Merge pull request !260 from jmxl/N/A
2021-06-04 13:54:53 +08:00
openharmony_ci 2067b2f648 !256 fix: 解决kill进程时无法保证进程持有的系统资源合理释放
Merge pull request !256 from zhushengle/Sig
2021-06-03 17:00:00 +08:00