Commit Graph

855 Commits

Author SHA1 Message Date
zff 9726ba11a7 fix: 中断中调用PRINTK概率卡死,导致系统不能正常响应中断
当console层的打印缓冲buffer满且打印任务被饿死时,函数ConsoleOutput会出现在for循环中
不退出的情况,导致中断打印时卡死

close: #I4C9GC

Signed-off-by: zff <zhangfanfan2@huawei.com>
Change-Id: I70b9d7c848dce7d351c5679e7b08049df27a6f10
2021-09-28 15:03:43 +08:00
openharmony_ci 7d7cff4c51 !633 fix: codex清理
Merge pull request !633 from Far/master
2021-09-27 08:38:37 +00:00
Far 9ab3e351d3 fix: codex 清理
Close #I4BL3S

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-09-27 14:43:28 +08:00
openharmony_ci 492264b8e6 !629 修复dispatch单词拼写错误。
Merge pull request !629 from pef/typo
2021-09-24 10:32:58 +00:00
openharmony_ci d59aad1f3a !580 新增解析异常和backtrace信息脚本
Merge pull request !580 from zhangfanfan2/script
2021-09-24 08:29:13 +00:00
pef 9b07aece2d fix: 修复dispatch单词拼写错误。
【背景】
打印有错误单词的提示语
[ERR] Dsipatch signals failed!, ret: 22
这里单词应该是 dispatch 。
【修改方案】
1. 将Dsipatch改为Dispatch。

【影响】
对现有的产品编译不会有影响。

re #I4BLE8

Change-Id: I26d4336d6d7f7bfc4811819be0a1e8ba9d7d50a8
Signed-off-by: pef <cyd1997@126.com>
2021-09-24 03:45:08 +00:00
openharmony_ci de8bd2866a !609 三方库FatFs升级至r0.14a版本
Merge pull request !609 from Far/fatfs_update
2021-09-24 00:53:43 +00:00
openharmony_ci 1150f86d46 !628 fix: 共享内存问题修复
Merge pull request !628 from Harylee/shm
2021-09-24 00:31:51 +00:00
Haryslee 9fdb80f85f fix: 共享内存问题修复
Signed-off-by: Haryslee <lihao189@huawei.com>
背景:父进程移除共享内存并标记SHM_SEG_REMOVE,当子进程资源回收时在
ShmFindSeg接口中判断该共享内存具有SHM_SEG_REMOVE时返回空,但是此时
seg->ds.shm_nattch不为0,不应返回空。
方案:ShmFindSeg接口中增加seg->ds.shm_nattch为0的判断。

close #I47X2Z

Change-Id: I8735cd11ac237b17fa745c50313da0fd0649bb9f
2021-09-23 21:04:36 +08:00
openharmony_ci 93e74c5f0b !520 修复sigwait等待到的信号值与获取的siginfo中的值不一致
Merge pull request !520 from lnlan/fixed_sigwait
2021-09-23 03:22:04 +00:00
Far d23f2fc73f feat:适配三方库FatFs升级至r0.14a版本
适配了_mkfs和find_volume接口的修改

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-09-22 15:00:40 +08:00
openharmony_ci c0721f4f0b !626 处理链接器失败时关闭打开的文件
Merge pull request !626 from LeonChan/codex
2021-09-18 09:41:31 +00:00
Leon Chan a375bf5668 fix: close file when process interpretor failed
close: #I4ATQX

Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-18 15:02:22 +08:00
openharmony_ci 52d1d8d8d0 !623 procfs 使用统一的权限
Merge pull request !623 from LeonChan/procfs_mode
2021-09-16 11:35:42 +00:00
Leon Chan c79bcd028e fix: same file mode for procfs files
close: #I4ACTC

Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-16 16:18:02 +08:00
openharmony_ci ecd9ca7781 !534 pagecache从filep改为使用vnode
Merge pull request !534 from LeonChan/pg
2021-09-15 03:51:50 +00:00
Leon Chan 38a6b804e9 feat: page cache backed by vnode instead of filep
1, change the owner of page to vnode
2, save the file path in vnode

close: #I44TBS
Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-14 15:31:33 +08:00
openharmony_ci 92f33ab9c4 !620 refactor: 清理Makefile冗余项
Merge pull request !620 from Zhaotianyu/0911refactor_makefile
2021-09-13 12:33:41 +00:00
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 0326cbf12e !619 简化make脚本
Merge pull request !619 from Caoruihong/opt_make_scripts
2021-09-10 07:53:14 +00:00
lnlan c3facd1b95 fix: 修复sigwait等待到的信号值与获取的siginfo中的值不一致
【背景】
集成测试发送两个不同的信号,sigwait第二次等到的仍是第一个信号
经定位,信号在kill时会将相关的siginfo信息拷贝到taskcb的unbinfo中,sigwait
处理时从unbinfo拷贝给用户。若此信号发送时处于屏蔽状态,再有其他信号发送会覆盖
掉unbinfo,此时sigwait等待这个信号获取到的info已经被覆盖
【修改方案】
1. 每个任务添加一个siginfo缓存链表,在处理信号前夕从缓存链表取出info到unbinfo中

【影响】
对现有的产品编译不会有影响。

re #I3M12H

Signed-off-by: lanleinan <lanleinan@163.com>

Change-Id: If4b064c18773f8eca7419c665977260167b09810
2021-09-10 03:21:58 +00:00
openharmony_ci 8713997548 !617 syscall review bugfix
Merge pull request !617 from 野生毛霉君/master
2021-09-09 14:53:55 +00:00
Caoruihong a627cdba0c chore(make): simplify build scripts
remove redundant script codes

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I67695a69cccefc220ede55add9372bce0c59d7f5
2021-09-09 18:56:47 +08:00
mucor 214f44e935 fix: syscall review bugfix
close: #149BPF
Signed-off-by: mucor <mucorwang@gmail.com>
2021-09-09 15:19:03 +08:00
openharmony_ci ba977dd5ab !605 refactor: 内核目录结构整理
Merge pull request !605 from Zhaotianyu/0902dir_refactor
2021-09-09 01:23:33 +00:00
openharmony_ci 1ecacc15b1 !593 feat: add sync() to vfs
Merge pull request !593 from MGY917/sync
2021-09-08 08:56:12 +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 e095e87682 !574 fix: solve SIGCHLD ignored in sigsuspend()
Merge pull request !574 from MGY917/sigsuspend
2021-09-08 08:27:12 +00: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 f67c4dae51 feat: add sync() to vfs
新增sync方法,该方法每次调用,会遍历系统内所有的mount点,调用各个文件系统注册
的sync方法,完成对所有已挂载文件系统的sync操作。

close #I480HV

Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
Change-Id: I57ced9c3f7685a448defd17ae56c842796b5668f
2021-09-08 15:41:52 +08: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
openharmony_ci de8257bc82 !551 TODOList通过issue跟踪,不在代码仓中添加
Merge pull request !551 from Denny/remove_todolist
2021-09-03 01:01:06 +00:00
openharmony_ci 19b39b1bff !600 参数化liteos_config_file配置项
Merge pull request !600 from Caoruihong/opt_20210902
2021-09-02 10:54:09 +00:00
openharmony_ci 5e07663374 !598 优化trace device初始化,不在system_init.c中调用,改为LOS_MODULE_INIT
Merge pull request !598 from LiteOS/master
2021-09-02 04:06:41 +00:00
Caoruihong f9a907772f feat(build): make liteos_config_file available as gn argument
You can specify another config file in hb build like this:
  hb build --gn-args liteos_config_file=myconfig.config
file specified in liteos_config_file argument is relative
to "$product_path/kernel_configs" directory, or is an
absolute file path, for example:
  hb build --gn-args liteos_config_file=//path/to/myconfig.config
or
  hb build --gn-args liteos_config_file=/another/path/to/myconfig.config

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I7e98604006feff9c2487e06a8f3f2a11e5de746b
2021-09-02 10:54:15 +08:00
openharmony_ci 007f385396 !596 优化编译脚本,DEVICE_PATH下的drivers/Kconfig由可选改为必选
Merge pull request !596 from Caoruihong/opt_20210901
2021-09-01 11:07:20 +00:00
Caoruihong 463bc0546f chore(build): optimize build scripts, make Kconfig in DEVICE_PATH mandatory
$(DEVICE_PATH)/drivers/Kconfig is mandatory now.

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ie9484229e2dc6e6babe0cf2daf8e4f6693163052
2021-09-01 18:45:44 +08:00
openharmony_ci 0c93a9b4f8 !597 删除tools/build/config下的配置文件,更新编译脚本
Merge pull request !597 from Caoruihong/opt_kconfig
2021-09-01 08:45:23 +00:00
LiteOS2021 d30a009ba5 move trace device init from system_init.c to drivers/char/trace.c
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
Change-Id: Ie4555c57f56c82f74b5e29f0e58aec97dc6cc32d
2021-09-01 12:49:37 +08:00
Caoruihong 4bee53a610 chore(build): optimize build scripts, remove unused config files
config files under tools/build/config directory are no maintained any more,
so we delete all of them.

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Idf51d55caa3c820617b7c90affda0186718632e5
2021-09-01 12:39:55 +08:00
openharmony_ci 81b474813b !565 feat: L0~L1 支持Trace
Merge pull request !565 from LiteOS/master
2021-08-31 13:32:20 +00: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
openharmony_ci 658fafe83b !586 liteos补丁能力支持
Merge pull request !586 from jason_gitee/master
2021-08-31 08:16:31 +00:00
openharmony_ci f3562e490c !588 删除zpfs冗余代码
Merge pull request !588 from 马帅/master
2021-08-31 07:40:38 +00:00
openharmony_ci 9888185fcb !590 优化编译脚本,将LTO选项做成可配置
Merge pull request !590 from Caoruihong/lto
2021-08-31 07:11:37 +00:00
Caoruihong 055295b6d1 chore: optimize build scripts and add lto config entry
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ibf8df58696b7f1ccb3b5b21154c3b94dda1e8ad2
2021-08-31 12:04:34 +08:00
openharmony_ci c26ca519f7 !579 优化构建脚本
Merge pull request !579 from Caoruihong/optimize_build_scripts
2021-08-30 11:06:25 +00: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
openharmony_ci 7cb2ad67bf !570 fix ppoll & add 2 testcases
Merge pull request !570 from guweijie/gwj-kernel-ppoll-20210825
2021-08-30 02:06:24 +00:00
jason_gitee 98ca8441fe feat: add liteos patch ability
Signed-off-by: jason_gitee <yangjie140@huawei.com>
2021-08-28 08:02:50 +00:00