zhushengle
64e49aba7c
feat: 支持L1 低功耗框架
...
方案描述:
和L0保持一致,上层通过proc文件系统操作:
power_mode 支持的低功耗模式,通过对该文件进行write操作可以设置低功耗模式
power_count powermanager模块通过对该文件操作,和内核进行交互,简要流程如下:
while (1) {
open // 打开该文件
read // 使powermanager低功耗任务常阻塞,当系统无任何模块持锁时,会唤醒该任务
write // 进行低功耗流程
close // 关闭该文件
}
power_lock write该文件,持锁
power_unlock writw该文件,释放锁
Close #I4JSO
Change-Id: I73fcdeeb5e2039484b3351a81b46a0892b349fe9
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-11-29 11:58:47 +08:00
LiteOS2021
e748fdbe57
feat: L0~L1 支持Lms
...
1.【需求描述】:
支持内核态和用户态堆内存非法访问检测,包括:越界访问、double free、释放后使用;支持libc常用高频函数内存检测;支持安全函数内存检测;读写检测可配可裁剪。
2.【方案描述】:
L0 ~ L1:
(1).影子内存映射与标记
(2).编译器使能-fsanitize=kernel-address 自动插桩检测点
(3).实时校验影子内存的合法性;
(4).错误访问打印回溯栈
BREAKING CHANGE: 新增支持API:
LOS_LmsCheckPoolAdd使能检测指定内存池
LOS_LmsCheckPoolDel不检测指定内存池
LOS_LmsAddrProtect为指定内存段上锁,不允许访问
LOS_LmsAddrDisableProtect去能指定内存段的访问保护
Close #I4HYAV
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
Change-Id: Id8e5c890656da9edc4a22227e6a3c32205c024ce
2021-11-27 11:13:41 +08:00
Caoruihong
bba832ea08
chore: replace YES/NO macros to 1/0
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I40e31e82c33418019c1afc16ac174919e72fbb07
2021-11-16 01:27:06 +08:00
kenneth
0f878febb7
chore: 修复社区反馈问题Percpu结构体注释错误
...
修复社区反馈问题Percpu结构体注释错误,排查下其他拼写错误。
close #I4GMLH
Signed-off-by: kenneth <zhushangyuan@huawei.com>
2021-11-10 10:20:33 +08:00
kenneth
466996b2e1
chore: 修复内存模块的一些不规范用语
...
layes修正为layers,alreay修正为already,Continous修正为Continuous等等
close #I4GHLR
Signed-off-by: kenneth <zhushangyuan@huawei.com>
2021-11-02 12:01:59 +08:00
zhushengle
37bc11fa88
feat: 支持LOS_TaskJoin 和 LOS_TaskDetach
...
Close #I4EENF
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Iaa1582f567eb3524262bea383e0b8238b89b5fe2
2021-10-19 14:26:10 +08:00
openharmony_ci
acd631c731
!657 【fix】los_trace.h注释修正
...
Merge pull request !657 from Zhaotianyu/1012trace_fix
2021-10-15 07:42:21 +00:00
LiteOS2021
b551270ef5
fix: 优化trace buffer初始化,删除swtmr 桩中的无效参数
...
close #I4DQ1X
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
Change-Id: I79b416720f5327749a5884a65a5e61db07f2a17c
2021-10-14 09:47:11 +08:00
arvinzzz
6d249618ae
fix: los_trace.h接口注释错误修正
...
1. LOS_TraceStop接口的功能描述应该是stop
close: #I4CYPZ
Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: Iee0cf43f6e5ee8e544e233c0c307725c5bfebdcf
2021-10-12 10:30:30 +08:00
LiteOS2021
6e0a3f10bb
feat: L0-L1 支持Perf
...
1.【需求描述】:
L0-L1 支持Perf,提供2种模式的配置, 及3大类型的事件配置:
2种模式:计数模式(仅统计事件发生次数)、采样模式(收集上下文如任务ID、pc、backtrace等)。
3种事件类型:CPU硬件事件(cycle、branch、icache、dcache等)、OS软件事件(task switch、mux pend、irq等)、高精度周期事件(cpu clock)。
2.【方案描述】:
L0:
基于事件采样原理,以性能事件为基础,当事件发生时,相应的事件计数器溢出发生中断,在中断处理函数中记录事件信息,包括当前的pc、当前运 行的任务ID以及调用栈等信息。
L1:
新增perf字符设备,位于“dev/perf”,通过对设备节点的read\ioctl,实现用户态perf
BREAKING CHANGE:
1.新增一系列perf的对外API,位于los_perf.h中.
LOS_PerfInit配置采样数据缓冲区
LOS_PerfStart开启Perf采样
LOS_PerfStop停止Perf采样
LOS_PerfConfig配置Perf采样事件
LOS_PerfDataRead读取采样数据
LOS_PerfNotifyHookReg 注册采样数据缓冲区的钩子函数
LOS_PerfFlushHookReg 注册缓冲区刷cache的钩子
2. 用户态新增perf命令
【Usage】:
./perf [start] /[start id] Start perf.
./perf [stop] Stop perf.
./perf [read nBytes] Read nBytes raw data from perf buffer and print out.
./perf [list] List events to be used in -e.
./perf [stat] or [record] <option> <command>
-e, event selector. use './perf list' to list available events.
-p, event period.
-o, perf data output filename.
-t, taskId filter(whiltelist), if not set perf will sample all tasks.
-s, type of data to sample defined in PerfSampleType los_perf.h.
-P, processId filter(whiltelist), if not set perf will sample all processes.
-d, whether to prescaler (once every 64 counts), which only take effect on cpu cycle hardware event.
Close #I47I9A
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
Change-Id: Ieb9b7483c85d1495df7c55bc0027f4309dff9814
2021-09-28 19:28:34 +08: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
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
8839fdd399
!544 fix killpg and waitid
...
Merge pull request !544 from wangjianjun/waitid
2021-08-27 07:48:25 +00:00
openharmony_ci
40297a6dbc
!487 多核启动及内存映射解耦
...
Merge pull request !487 from JerryH/smp-xxx
2021-08-20 03:54:23 +00:00
zhushengle
67ac8c4c58
fix: 以g_sysSchedStartTime是否为0判断时间轴是否生效存在极限场景导致调度时间不生效
...
初始化调度时间不以g_sysSchedStartTime是否为0为界限,而以g_sysSchedStartTime是否为64位最大值
为界限,避免特殊以下场景:调度开启时系统时间为0,导致初始化的g_sysSchedStartTime还是0,导致
调度启动后获取的调度时间轴始终为0.
Close #I45HP5
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I5272c79f06b53361ee7b931081d3a3276db59073
2021-08-14 13:04:08 +08:00
wjj
dc3cc094a7
feat: 支持killpg和waitid
...
killpg:给进程组发信号
waitid:等待进程结束
修改测试用例到full里面
Change-Id: Ice058ab4a6eede8ecbaacea0894c2161e3b9dce2
Signed-off-by: wjj <502004968@qq.com>
2021-08-12 18:06:55 +08:00
zhushengle
8df3e8c965
fix: tick 动态化计算优化,消除中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。
...
方案描述:
1.周期软件定时器超时添加一个startTime字段,用于记录当前软件定时器的开始计时的时间,
在定时器响应时,开始时间修改为上一次响应的结束时间(消除了中断执行时间对软件定时器
的影响)。
2.在执行tick中断的过程当中,持有tick动态计算锁,保证在该过程中不会触发tick周期
的计算,在tick中断结束时统一计算设置。 --- 提升tick中断的执行效率
3.在设置tick周期时,减掉tick中断执行的时间,减小周期动态化带来的时间误差
4.新增LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI配置宏,用于配置tick中断的最小响应精度
Close #I43UQJ
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Icd1159a1890046b13602b7a18dcd6234d5c61a89
2021-08-09 21:18:03 +08:00
JerryH
3bb3173604
fix: smp启动代码解耦及内存映射关系解耦
...
close #I41P8Y
Signed-off-by: JerryH <huangjieliang@huawei.com>
Change-Id: I01833cf617bbc695543a865dbb994c6c22d4a0a8
2021-08-05 16:03:43 +08: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
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
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
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
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
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
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
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
3f16f1684a
!248 fix: fix length typo
...
Merge pull request !248 from kenneth/los_queue.h
2021-05-22 09:13:46 +08:00
jmxl
d25560f8ac
fix: fix stored typo
2021-05-21 10:16:04 +08:00
openharmony_ci
9b364500ad
!252 删除冗余宏定义OFFSET_OF_FIELD
...
Merge pull request !252 from JerryH/list
2021-05-21 09:54:18 +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
YOUR_NAME
9b4129c949
Remove redundant macro definition(OFFSET_OF_FIELD)
...
Close #I3QMN1
Change-Id: I0ddd0c4474f5f6b5a2b1dd6608d642167b5548e6
2021-05-19 11:20:09 +08:00
kenneth
12d98b144b
fix: fix length typo
...
fix typos length、there、necessary
close https://gitee.com/openharmony/kernel_liteos_a/issues/I3RSY0
2021-05-18 14:33:59 +08:00
Guangyao Ma
937734b1e9
fix: modify event API description
...
Change-Id: I131c70e52d907b6c52232596475f2dba16612fce
2021-05-11 21:09:24 +08:00
openharmony_ci
9fcb67f731
!160 fix: misspell
...
Merge pull request !160 from Harylee/os
2021-04-20 12:30:37 +08:00
Haryslee
08980eac3c
fix: misspell
...
Change-Id: I7bb8abb2c8c250373f22d0e6bec5a9765e2f52be
2021-04-20 09:24:31 +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
arvinzzz
13451e9d10
IssueNo:#I3HGTM
...
Description:Fix limits.h & Adjust some macro definition positions.
Feature or Bugfix:Bugfix
Binary Source:NA
Change-Id: Ia53c1b4b83f60862ac24c5c14a87883fe0af6db0
2021-04-09 10:44:13 +08:00
arvinzzz
9fc6241057
Description: Fix the problem that the actual implementation of the function does not match the description.
...
Change-Id: Icdbc0182efc023734ccbe7e80b1926d64a18d01c
2021-04-06 22:35:13 +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
Caoruihong
63bd69267a
drop unnecessary executable file permission mode
...
Change-Id: Ia6c1f6302407a707b3ec9b805f4c92d8a7970b86
2020-10-13 16:37:25 +08:00
Caoruihong
4929816604
!9 【轻量级 PR】:#I1VDS2 fix typo
...
Merge pull request !9 from Caoruihong/N/A
2020-09-17 10:08:49 +08:00
wenjun
6df931fc98
add OpenHarmony 1.0 baseline
2020-09-08 17:22:24 +08:00