Commit Graph

598 Commits

Author SHA1 Message Date
openharmony_ci d07637e648 !53 Add latest post-review fixes for Qemu ARM Virt support
Merge pull request !53 from Zbigniew/qemu-arm-dev
2020-12-31 21:33:38 +08:00
Zbigniew Bodek fab70c738d Remove redundant extern SystemInit
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I3c93fd703eb184d946f25a7f6be3c70124b469c1
2020-12-31 19:28:58 +08:00
Zbigniew Bodek 3cac7c61bb Apply post review fixes for style in shell
Improve style of the ifdef in OsShellSourceInit().

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I733423ce7e0d923702ea62f9e319a92525ebe161
2020-12-31 19:28:58 +08:00
Zbigniew Bodek 7797f017a2 Disable LTO only for Qemu ARM build
Keep flag enabled for HiSi cameras whereas
LTO will be disabled for Qemu as a workaround.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Iad7295d108dfea0928537281f87eb46836ee6681
2020-12-31 19:28:58 +08:00
openharmony_ci 58da2cb0c2 !33 OpenHarmony LiteOS-A QEMU support
Merge pull request !33 from WojciechZmuda/qemu-arm-dev
2020-12-31 18:21:58 +08:00
Zbigniew Bodek 0403820b22 Change path to Qemu ARM platform's config and init
Change "vendor" to "device" where the latest
version of MR puts stuff related to Qemu ARM Virt.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
2020-12-31 00:54:47 +08:00
Zbigniew Bodek f0990f3b92 Update configuration files after HRTIMER option
Update only those configuration files that are used
during build (clang and clang+debug).

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I5639b0074e8c4e0fef4e21d9f3b8c1582bb038d5
2020-12-31 00:54:42 +08:00
Zbigniew Bodek 51263d8796 Add kernel configuration option to enable/disable HR Timer
High resolution timer can now be excluded from the build.
There is currently no HR Timer implementation for other
platform than HiSi.

Note: HR Timer will be enabled by default

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I5daf8e0ceec2a17025b579513e3bd74db1040916
2020-12-31 00:54:38 +08:00
Zbigniew Bodek 07c89a8473 Fix IS_PERIPH_ADDR() and IS_MEMORY_ADDR() macros
The macros assume that constants that are compared against
"addr" are either unsigned or less than INT_MAX.
In some cases it is not true so change costants to unsigned
using U32_C macros.
The correct solution would be to change teh MEM_ADDR, PMM_BASE, etc.
to be unsigned long but currently "U" suffix is appended in various
places so the assumption is that those macros use default definition
(which is int).

Put "addr" into brackets by the way since it could be an expression
rather than one variable.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ife9bc5863b4934ecaab64b24faa084b87d7d7ea5
2020-12-31 00:54:33 +08:00
Zbigniew Bodek 994ad00de7 Change DEFINE macro to U32_C
The macro to append "U" suffix should be named
according to what it actually does which is defining U32 constant.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I55701f0650c88bd083c062581af5c7a1b966bc0b
2020-12-31 00:53:09 +08:00
Harmonica 5dabe5e1ee update kernel/extended/liteipc/hm_liteipc.c. 修改一个不不合理的英文用词 2020-12-28 15:50:18 +08:00
openharmony_ci 0d56a61aa8 !51 为资源回收进程添加一个保护标签
Merge pull request !51 from likailong/master
2020-12-26 14:03:40 +08:00
likailong 3dd32b9901 Description: add protect flag to resource task
Reviewed-by: shenwei and zhangfanfan
2020-12-26 10:43:04 +08:00
openharmony_ci 05e11d4034 !50 [Lightweight PR]: 解决系统异常时,由于console打印问题,导致系统异常信息不能输出的问题。
Merge pull request !50 from zhangfanfan2/N/A
2020-12-25 11:08:55 +08:00
openharmony_ci bafa57fdbc !49 【轻量级 PR】:No idle PCB debug
Merge pull request !49 from zhangfanfan2/N/A
2020-12-25 11:08:53 +08:00
zhangfanfan2 3b883d3828 解决系统异常时,由于console打印问题,导致系统异常信息不能输出的问题。 2020-12-25 10:10:40 +08:00
zhangfanfan2 5ed6f6598e No idle PCB debug 2020-12-25 09:59:11 +08:00
openharmony_ci b5571e02e4 !46 【轻量级 PR】:No idle PCB debug
Merge pull request !46 from zhangfanfan2/N/A
2020-12-24 15:37:11 +08:00
openharmony_ci f6959724aa !47 【轻量级 PR】:No idle TCB debug
Merge pull request !47 from zhangfanfan2/N/A
2020-12-24 15:07:35 +08:00
zhangfanfan2 a541338656 代码中mount nfs问题修复 2020-12-24 14:48:18 +08:00
zhangfanfan2 b64e399c10 No idle TCB debug 2020-12-24 14:22:28 +08:00
zhangfanfan2 0c635d79e6 No idle PCB debug 2020-12-24 14:20:50 +08:00
openharmony_ci 58830073a6 !44 修复堆内存异常分支未释放锁的问题
Merge pull request !44 from likailong/master
2020-12-24 09:05:08 +08:00
likailong e10c9af86f Description: fix mutex unlock error
Reviewed-by: zhangfanfan
2020-12-23 16:34:37 +08:00
openharmony_ci c69eee403e !39 修正OsSigTimedWaitNoLock只清除一个pending信号
Merge pull request !39 from laokz/signal
2020-12-09 14:08:36 +08:00
openharmony_ci cefcb35aee !40 订正hilog、vm_syscall等文件中的typos
Merge pull request !40 from laokz/hilog
2020-12-09 13:20:47 +08:00
laokz a706de2fad fix hilog, vm_syscall etc. typos 2020-12-08 18:00:32 +08:00
laokz 4ea33fa9f9 修正OsSigTimedWaitNoLock只清除一个pending信号 2020-12-05 17:38:05 +08:00
openharmony_ci f5f823ba99 !26 spelling mistakes
Merge pull request !26 from JING/N/A
2020-12-04 18:33:04 +08:00
openharmony_ci 9bc3a1cf3f !37 修复SYSV shm有关函数
Merge pull request !37 from laokz/shm
2020-12-03 14:28:18 +08:00
laokz bd9b180b27 修复SYSV shm函数:OsShmRegionFree物理页解映射、共享段删除条件,ShmGet操作标志检查,ShmatVmmAlloc对已存在映射的处理。 2020-12-01 18:59:22 +08:00
openharmony_ci 8271a069f2 !35 修正liteipc的typos
Merge pull request !35 from laokz/liteipc
2020-12-01 09:14:22 +08:00
laokz 86194762a1 修正liteipc两处typos 2020-11-30 15:30:06 +08:00
openharmony_ci cdb5d0e48a !34 修改region相关的几个问题
Merge pull request !34 from laokz/vmmap
2020-11-28 08:57:29 +08:00
laokz c2b31e9628 修改region相关:优化OsVmRegionSplit红黑树节点操作,修改OsVmRegionAdjust起始地址不在region时的行为,修复OsIsRegionCanExpand计算错误,更正几处typos 2020-11-27 20:49:06 +08:00
Zbigniew Bodek 3247d4f651 Fix build error due to "unequal" brackets
For some reason more brackets is worse than no brackets
and warning is generated that is threated as error.
Therefore remove brackets to fix the build when
LOSCFG_PLATFORM_ROOTFS is defined

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I610a5893217039a36d894641c54a83ff4d4b7822
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 5400ef180a Introduce Qemu ARM Virt CA7 platform debug configuration file
Minimal system configuration for Qemu ARM Virtual platform
based on Cortex-A7, with GICv2.

Some debugging options are enabled to allow for shell bring-up,
hence debug configuration type.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ifa01cd44733fd0154044013f45772d178e19e78e
2020-11-17 23:07:01 +08:00
Zbigniew Bodek e0406e3df7 Fix various build problems when building for non-HiSi config
Mainly adding missing headers, removing redundant headers that
induce undefined symbols or rearranging existing headers
according to dependencies betheen them.
Also add missing include paths to makefiles and make configs.

Note: direct inclusion of pthread.h in disk.h is caused by the
latter being used almost everywhere, including third_party libraries.
Putting pthread.h there releases us from affecting more code.

Basically fixes build for anything that is not default HiSi
configuration.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Icdcb0874d9fed34d01fa282d33bd2e041c2ac436
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 01cd099ea9 Create Shell task in kernel when PLATFORM_ROOTFS is disabled
If the platform doesn't support rootfs but shell and serial
console are enabled, create Shell task in kernel.
Note that normally, shell task is created by /bin/init.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: If3bf55313d897569b59902b07eaa042eee71a8df
2020-11-17 23:07:01 +08:00
Zbigniew Bodek cef02d9340 Add stub for fetching bootargs for Qemu ARM virt
Currently unused but when rootfs is enabled
we should get this error and quickly narrow down
where to add proper bootargs handling.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ie8d96fc3b6ad7cc33abe67530ca8ff9526b46855
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 89fb5eb32f Fix build when NET_LWIP_SACK is disabled
Allows to disable NET_LWIP_SACK in the kernel configuration.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ibcde4a811e67d61bc713d405414c4991cbc1bdd3
2020-11-17 23:07:01 +08:00
Zbigniew Bodek e559c86d77 Workaround missing machine_resource_init in BSD initialization
BSD compatibility is not optional for the kernel to build, however
platform dependent portion of this configuration, machine_resource_init(),
which is called by nexus_init() is implemented only in the platform
specific library for HiSilicon chips (libhi35xx_bsp.a).
Workaround lack of this library, so that the kernel can be built
for other platforms as well, by excluding it from the compilation.

This change should be removed as soon as the appropriate function
is implemented for other platforms.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I66f15b167b9769f17820f5f0edb7ae8b0ebc9246
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 850a566916 Workaround linking problem caused by missing SystemInit during build
During LiteOS consolidation, system_init.o object that contains
SystemInit() doesn't exist yet as it is being built later
and linked in ./vendor directory when OHOS_Image is created.
This is not the case when building for HiSilicon platforms as
SystemInit is provided for them in precompiled libraries.

Workaround this issue by creating "weak" function in LiteOS
that will be replaced by the "strong" symbol from ./vendor
in linking phase of the OHOS_Image.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39f327a350722a3e41a370ee93ba3b734c5681b0
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 669221b620 Workaround undefined __stack_chk_guard by disabling LTO
Disable LTO to avoid undefined __stack_chk_guard symbol
problem. "externally_visible" attribute could be a fix for
that but it is not known to our LLVM.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39e0ccaee5897c696a7a9a235e433cf9113853ce
2020-11-17 23:07:01 +08:00
Zbigniew Bodek aff8a3e3c1 Fix build when KERNEL_DYNLOAD is disabled
Fix unused function warning treated as error
when KERNEL_DYNLOAD option is switched off.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I21a01ff3d7ecb7b2e65bacbaa985c6390f5e4be7
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 22f0e9ac30 Fix build when HILOG is disabled
Fix build when BASE_CORE_HILOG option is disabled.
Use similar printing function to output missing HILOG
logs.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Id5c63568ccb1ba90daadddf7e26d3e0f6c9f30ce
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 064427fcaf Allow enabling SSP for platforms that don't randomize canary
HiSilicon-specific randomization routine for the __stack_chk_guard
should not be called for other platforms that don't implement
this function.
Fix build for targets that don't link with HiSi libraries when
stack smashing protector is enabled.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I1843c897b32991fddc3d0ba362d188c4a621d052
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 4188734ee4 Allow to disable stack protector feature
Currently disabling stack protector will cause build to fail.
This commit will fix that problem and allow to toggle feature
when needed.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Iee8ccfdb9fce4ba69aa557e2ac915ddc45b2f21e
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 450f63d7b0 Add Qemu ARM virtual platform to build configuration files
Remove some dependencies on HiSilicon and add new platform to build.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I8504bcc9a1bf1756e1e20694986d7774156f8b8e
2020-11-17 23:07:01 +08:00
Zbigniew Bodek 59db6662c2 Add new Qemu ARM virtual platform to Kconfig
Qemu ARM virtual platform emulates an ARM machine
with configurable, ARM components. This commit adds
configuration option for Cortex-A7 based virtual machine.

qemu_arm_virt_ca7 name is derived from a command
to invoke Qemu:
qemu-system-arm -M virt -cpu cortex-a7

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ia267ee7c989b8c22e6c19d6f11ff3ee2eef8148b
2020-11-17 23:07:01 +08:00