Caoruihong
6e886d4233
feat(build): support gcc toolchain
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I6f2dea19cbd2e5b562bb51e30592205a2bb4fbdb
2021-12-05 02:49:48 +08:00
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
openharmony_ci
2c33cfce86
!599 feat: L0~L1 支持Perf
...
Merge pull request !599 from LiteOS/perf
2021-09-29 06:15:02 +00: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
openharmony_ci
d59aad1f3a
!580 新增解析异常和backtrace信息脚本
...
Merge pull request !580 from zhangfanfan2/script
2021-09-24 08:29:13 +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
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
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
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
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
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
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
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
YOUR_NAME
7019fdfcbb
feat: 新增解析异常和backtrace信息脚本
...
close: #I47EVQ
Signed-off-by: zff <zhangfanfan2@huawei.com>
Change-Id: Id9c373bf6b36cda024317f927974b08ca61fd9ec
2021-08-27 15:09:50 +08:00
Caoruihong
682ae82158
chore: enable make of mksh and toybox
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ie152b0ad21af5dc8e8c31c71f236500e5726e1c4
2021-08-25 01:46:41 +08:00
Caoruihong
181322a3c1
chore(make): fix and optimize some build scripts
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I2e61b7ea231be78423dc10412e0ab9a710cad8ef
2021-08-23 20:47:18 +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
Caoruihong
9549f5ebd0
chore(musl): reduce the modifications of musl
...
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I32b820bc0eb7465bf54d506e7f5e759ef64101e2
2021-08-19 16:07:12 +08:00
openharmony_ci
4dc059f207
!557 open platform I2S
...
Merge pull request !557 from susha/master
2021-08-17 14:23:27 +00:00
Caoruihong
e1b9a6b185
chore(make): update Makefile
...
remove some unused Makefile code and optimize some code
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I1c31d07481bb6aee47b0c51d63d6b68316c38c88
2021-08-17 21:34:01 +08:00
susha
b5528e1d17
open i2s
...
Signed-off-by: susha <susha@huawei.com>
2021-08-17 20:12:45 +08:00
Caoruihong
8118408123
fix: do not override existing libs
...
preserve existing newer libs under lib and libs dir
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I5f91554890186f7760a73accb246240683b0558b
2021-08-09 23:14:07 +08:00
SimonLi
7a98cad11a
chore(oat): 删除二进制文件,并且新增oat屏蔽
...
Signed-off-by: SimonLi <likailong@huawei.com>
2021-08-06 01:41:09 +08:00
Haryslee
85b4cb7a67
fix: 将用户态内存调测解析脚本移至tools目录下
...
背景:解析脚本之前放在prebuilts目录下,该目录做了调整,该子目录下无合适的目录存放。
方案:将解析脚本移至内核tools目录下。
close #I42T9A
Signed-off-by: Haryslee <lihao189@huawei.com>
Change-Id: I8b4af5df0cc9c9cd740fef8bd3092cf8d2bd1ec7
2021-07-28 17:29:58 +08:00
openharmony_ci
08878bd99f
!462 为hispark_taurus启用ADC及测试用例
...
Merge pull request !462 from 王亚枫/master
2021-07-27 09:24:46 +00:00
yafeng_wang
c71ec9d7e8
feat: Open macro for ADC moudule
2021-07-27 16:15:12 +08:00
Caoruihong
abf4d8fb25
feat: build OHOS_Image from kernel
...
using OHOS_Image as liteos default name
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I00bcc9a6747ffde0f07f3d243150055a644df02f
2021-07-27 01:20:46 +08:00
openharmony_ci
9e9c7b28d4
!448 fix: Ctrl-C move out of LOS_MAGIC_KEY_ENABLE
...
Merge pull request !448 from MGY917/Ctrl-C_support
2021-07-22 02:51:05 +00:00
openharmony_ci
8755dc9d35
!443 从Make编译切换到GN编译
...
Merge pull request !443 from Caoruihong/build_gn
2021-07-22 01:50:19 +00: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
Guangyao Ma
51a50c95b4
feat: support .mkshrc
...
close #I3Y5KE
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
Change-Id: Iea3cfe4da572b1a4e250f90cea24efa2c27ceddb
2021-07-20 14:37:30 +08:00
openharmony_ci
d79fd50693
!313 feat: active mksh & toybox
...
Merge pull request !313 from MGY917/toybox_active
2021-07-15 12:40:12 +00:00
qidechun
cb17fa50ed
feat: 给开发者提供系统信息导出Hidumper工具。
...
给开发者提供系统信息DUMP机制,帮助开发者观察系统功能状态,发现潜在问题。
Close #I3NN7D
Signed-off-by: qidechun <qidechun@huawei.com>
2021-07-14 14:49:58 +08:00
qidechun
a195aac9fb
feat: add blackbox for liteos_a
...
1、在内核增加BlackBox核心框架,对外提供模块回调接口注册和故障处理接口。
2、增加默认的系统模块适配层,处理通用内核态和用户态故障日志抓取和保存。
3、BBOX特性默认关闭,若想使用此特性,请在内核配置文件中增加如下编译选项:
LOSCFG_BLACKBOX=y
LOSCFG_SAVE_EXCINFO=y
LOSCFG_SAVE_EXCINFO可以帮助抓取更多的故障日志。
4、若已经打开BBOX特性,想快速验证此特性,请添加如下编译选项:
LOSCFG_HIDUMPER=y
Close #I406NP
Signed-off-by: qidechun <qidechun@huawei.com>
2021-07-14 09:37:35 +08:00
Guangyao Ma
40f239a7d4
fix: Ctrl-C move out of LOS_MAGIC_KEY_ENABLE
...
由于没有tty,当前的Ctrl-C实现基于uart回调特定函数实现,后续tty实现后
可以重新考虑Ctrl-C设计实现。本次将Ctrl-C移除LOS_MAGIC_KEY_ENABLE,保
证任意情况下可以生效。
Change-Id: I4e1e51b2d92535879bbdbbfa91b0229119d0e90e
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-07-09 17:12:20 +08:00
Guangyao Ma
cacb4f0103
feat: active mksh & toybox
...
Close #I3VEOG
Change-Id: Ibc73aacf68c65e64b88084edfd3549b3137dde07
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-07-09 17:07:06 +08:00
Caoruihong
8784694686
feat: using kconfiglib instead of kconfig
...
kconfiglib support the kconfig macro language,
we need this feature to handle product related
Kconfig configuration.
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I6bb521e93aab6c67b8bc3ac664b64f5e52089a45
2021-07-08 15:44:47 +08:00
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
openharmony_ci
feae60c8fe
!401 【DFX子系统】【BBoxDetector】LiteOS_A死机重启维测框架
...
Merge pull request !401 from pcwlno1/upload10
2021-07-06 08:15:48 +00: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
cc731d1e69
!391 add vibrator liteos defined
...
Merge pull request !391 from kevin/0625_maste
2021-07-05 12:29:56 +00:00
kevin
b1b4ddcc7d
feat:add hdf vibrator liteos definition
...
Change-Id: I0a73f0de3c25e427362fe9d96547c4d847448dda
Signed-off-by: kevin <liufeihu@huawei.com>
2021-07-05 14:53:43 +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
laokz
49856dc1e0
feat(QEMU_ARM_VIRT_CA7): 使能FAT文件系统编译选项
...
Signed-off-by: laokz <laokz@foxmail.com>
Change-Id: I0eece39921292498243bd017f168f953a437731c
2021-06-26 18:11:15 +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