fix the issue: WebUI could not generate configuration patch for a new imported board
Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
The file format of 2 source files is dos format with line endings
as CRLF, change to unix format with line endings as LF.
Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
align with sample launch script for Preempt-RT Linux, remove ethernet
device from config file.
v1-v2:
1). correct desc for ethernet device
Tracked-On: #3751
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
hvlog is for debug purpose and its address is board specific,
so remove the param in sos cmdline.
If user want to support hvlog in his own board, then he can add
the param in sos cmdline manually.
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
ATOM-N3350 only has two cores, so we only support SDC and
logical_partition scenario.
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
Change default apl-up2 CPU support from ATOM-N3350 to ATOM-N4200.
For apl-up2 N3350 support, we will add another apl-up2-n3350 board xml.
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
align the usage of acrn-config tool and their README
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Need to reserved 16M for HV debug usage like sbuf/ramoops before HV RAM START
to avoid possible conflict with HV memory.
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
add launch sample xmls for acrn-config to generate launch scripts.
launch script will generated by acrn-config/launch_config tool,
acrn-config/launch_config need launch config xml as input.
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
1. generate launch script file and apply to the source file
usage: launch_cfg_gen.py [h]--board <board_info_file> --scenario <scenario_info_file>
--launch <launch_info_file> --uosid <uosid id>
board_info_file : file name of the board info
scenario_info_file : file name of the scenario info
launch_info_file : file name of the launch info
uosid : the uos id which to launch:[0..max uos id]
sample:
$ python3 launch_cfg_gen.py --board ../xmls/board-xmls/apl-mrb.xml
--scenario ../xmls/config-xmls/apl-mrb/sdc.xml
--launch ../xmls/launch_config/mrb_launch.xml --uosid 0
v1-v2:
1). usage: '--vm' -> '--uosid'
2). add 'uuid' option for acrn-dm
3). support parse tag from 'rootfs' to 'rootfs_dev'
4). support parse tag from 'hard_rtos' to 'Preempt-Rt Linux'
5). support pasre tag from 'redirect_console' to 'console_type'
6). add 'nvme' passthrough option
7). modify uos_type to upper string in webUI
8). support to generate launch file by uosid, this map to scenario
id
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
1. grap 'ext4' rootfs, and store it as "BLOCK_DEVICE_INFO" tag
2. remove 'Tab' from app tools
3. add support to parse ' ' from scenario xml
v1-v2:
1). modify the board info "ROOT_DEVICE_INFO" -> "BLOCK_DEVICE_INFO"
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
1. if SCENARIO=$(SCENARIO) is specified in make param, then override
the default CONFIG_$(SCENARIO) value in existed .config. This means
we don't need to modify the default SCENARIO config in Kconfig file
to build the hypervisor;
2. Some board name shortcuts like apl-nuc/kbl-nuc-i7 need to be converted
to official board name to make sure overrides working;
3. Previously make sbl-hypervisor did not load the defconfig so the
defconfig for boards are lost, this patch fix this issue;
4. remove SCENARIO param when make hypervisor, because SCENARIO could
be got from SCENARIO_NAME which parsed from .config;
Tracked-On: #3593
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reserve memory for hv sbuf to avoid its possible overwriting on kernel memory,
need to update the kernel param in corresponding config-xmls;
Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
For cross-VM S5 notify via vUART, life_mngr service is running on UOS.
It is listening on /dev/ttyS1 to get SOS's commands.
The protocol is: SOS send "shutdown", UOS feedback "acked".
When SOS triggle shutdown, SOS can 1) check VM's status until UOS
stopped, 2) retry shutdown UOS normally with timeout.
So, no matter life_mngr server is running, SOS's shutdown procedure will
properly finish.
Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
1. add $(board) xmls which generate by acrn-config/target
acrn-config/target/board_parser.py will generate native board
information and store to $(board).xml
then, acrn-config/board_config/board_cfg_gen.py will use the xml to
generate hypervisor/arch/x86/configs/$(board)/ source file and apply to
the local acrn-hypervisor
2. add $(scenario) xmls for acrn-config/scenario_config to config scenario
acrn-config/scenario_config/scenario_cfg_gen.py will parse scenario xmls and
generate hypervisor/scenarios/$(scenario) source file and apply to the
local acrn-hypervisor
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
1.the script will parse the the board information which already
generated, $(scenario).xml modified by user, generate scenario
vm configuration and apply to the acrn-hypervisor source code base.
2.parse cpu/memory/ttys/rootfs information from native os and store it to
the source code
3.implemnt scenario_config and it's usage
usage: scenario_cfg_gen.py --board <board_info_file> -scenario <scenario_info_file>
board_info_file : file name of the board info
scenario_info_file : file name of the scenario info
sample:
$ python3 scenario_cfg_gen.py --board ../board-xmls/apl-mrb.xml
--scenario ../config-xmls/scenarios/sdc.xml
Also improvement board config generate usage:
sample:
$ python3 board_cfg_gen.py --board ../board-xmls/apl-mrb.xml
--scenario ../config-xmls/scenarios/sdc.xml
V1-V2:
1). parse board_setting.xml was removed as these configuration will be
stitch into scenario configuration
2). parse console for different formats
3). parse epc sections
4). add logical partition rootfs
5). support to parse clos, while webui set to None type
6). support to parse bootargs, while webui set to nul
7). convert '-' to '_' for pci sub class name while generating source file
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
1. add misc.py to get systemd ram and root device
2. add more specify comments for arguments of functions
v1-v2:
typo: Parser -> Parse
some grammar check
v2-v3:
add the message for Cx state
Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
The web UI application for ACRN VM configuration tool based on Flask web framework:
1. import board info xml which is generated by acrn-config/target on target boards; or select one
board from the imported list of UI.
2. load scenario settings or import scenario settings from local.
3. edit scenario settings from web UI.
4. export and save the edited scenario setting, the application will prompt error messages from UI
if there are illegal configured items.
5. generate board source code, generate scenario source code.
6. load launch settings or import launch settings from local.
7. edit launch settings from web UI.
8. export and save the edited launch setting; the application will prompt error messages from UI
if there are illegal configurable items
9. generate launch scripts based on current launch setting.
Tracked-On: #3602
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Because of this commit:
commit 63e258bd01
Author: Tianhua Sun <tianhuax.s.sun@intel.com>
Date: Wed Jul 17 14:33:47 2019 +0800
efi-stub: update string operation in efi-stub
Remove unsafe API in efi-stub
1, use Strnlen instead of StrLen except the parameter
is a static string.
2, strlen() only work on static strings.
Tracked-On: #3276
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
In the default case, bootloader_name will be point to a separate ro
section which hold the constant string, free this memory later will
cause undefined behavior (memory corruption, exception and so on).
Tracked-On: #3644
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
We are trying to add both industry and sdc images to CL build. To
maintain the build interface unchanged (no change from CL side), we
extend the build command to generate the different target images.
To identity different images, we use rule:
$(HV_FILE).$(BOARD).$(FIRMWARE).$(SCENARIO)
as target image file name.
Tracked-On: #3593
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
acrn.conf:add memmap phys-addr 2M for hvlog,
not mapped by kernel.
Tracked-On: projectacrn/acrn-hypervisor#3533
Signed-off-by: YanX Fu <yanx.fu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
currently scenario config and launch config is not ready, leave these
two folders for futrue useage and make folder structure clear.
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Shuang Zheng shuang.zheng@intel.com
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
the script will parser the the board information which already generated on
target board, and apply to the acrn-hypervisor as a patch.
usage: board_cfg_gen.py --board <board_info_file>
sample:
$ python3 board_cfg_gen.py --board ../target_board/board_info.xml
v1-v2:
1. allow to generate new board patch
v2-v3:
1. modify the description of generator tools
2. parser board_name.xml file
3. coding as PEP8 guildline
Tracked-On: #3480
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Shuang Zheng shuang.zheng@intel.com
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
These tools run on the target board and genearate board information.
usage: python3 board_parser.py <board_name> [--out board_info_file]
sample:
$ sudo python3 board_parser.py apl-up2
v1-v2:
1. allow board parameter for new board
v2-v3:
1. add the usage descriptions for tools
2. add description of kernel cmd line for README
3. output informations to a xml type
4. coding as PEP8 guildline
Tracked-On: #3480
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Shuang Zheng shuang.zheng@intel.com
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Run 'acrnctl stop VM_NAME --force‘ to force stop VM
When run 'acrnctl stop VM_NAME', acrn-dm let guest OS to shutdown
itself. If something wrong with guest OS, it can't shutdown, we can
run 'acrnctl stop VM_NAME --force', thus acrn-dm directly set suspend
mode to VM_SUSPEND_POWEROFF and quit main loop.
Tracked-On: #3484
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Add 'force' parameter to acrn_stop(), which will be write to request
message, the value of data.acrnd_stop.force. So we can tell DM to
force stop VM, instead of telling UOS to shutdown itself.
Tracked-On: #3484
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
This patch is to clean-up acrn-hypervisor root directory, targt only 5 folders under acrn-hypervisor:1.hypervisor,2.devicemodel,3.misc,4.doc,5.build
Tracked-On: #3482
Signed-off-by: Terry Zou <terry.zou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
misc now has a new home: https://github.com/intel/ioc-cbc-tools.
The "Execstop" patch will be synced to new git tree soon.
ioc-cbc-tools was just added to Clear Linux, and will be added to
software-defined-cockpit bundle after this patch merged.
Merging this patch may cause some IOC releated feature block until we
get a new Clear Linux release. This is the switch window ...
Signed-off-by: Alek Du <alek.du@intel.com>
acrn-manager message structure has a flexible member
payload[0], that risks to out-of-boundary memory access,
and usage of uninitialized variable.
And the req/ack message pairs has various types, which
extend mngr_msg. mngr_send_msg() requires programmer cast
the type of input messages to struct mngr_msg, that is
inconvenient.
We replace payload[0] with an union, which contains all
payload data. So that type cast for mngr_send_msg() is no
longer needed. And we can avoid potential out-of-boundary
memory accessing and using of uninitialized variable
Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
The install -D is misleading people since it only creates the leading
directories.
The problem was hidden due to we always call make install and the
destination folder was already created in previous install script.
Signed-off-by: Alek Du <alek.du@intel.com>
Due to cbc_lifecycle service already has its own retry mechanism,so change the
Restart type to "no".
This change is also indirectly avoid cbc_lifecycle always restart for the
non-IOC boards. Actually, there has one defect for current IOC CBC architecture
due to lack IOC hardware detection mechanism. The related guys are already aware
it and WIP.
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Alex Du <alek.du@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
This patch resolved systemd be blocking for 20 seconds due to waiting the
"READY=1" from cbc_attach. And cbc_attach will retry 60 sec at the worst case
which can be reproduced on non-IOC boards.
This is one temporary solution. The final solution need modify SBL to export IOC
ACPI device through ACPI table, and also Linux IOC CBC driver need trigger
uevent which should be the trigger of launching cbc_attach service.
This patch changes the service type to simple instead of notify due to systemd is
needn't wait cbc related services. And change Restart to no due to cbc_attach
already has retry mechanism.
These changes are also reasonable for the board integrated IOC component.
So they should be keep even the long term final solution implemented.
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Alex Du <alek.du@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
This is one workaround patch to resolve read/write failed for /dev/cbc-lifecycle
and /dev/cbc-signals cdev nodes. It cause cbc_lifecycle service can't send
heartbeat to IOC firmware, also can't receive any signal data from IOC firmware.
This patch need to be revert once the IOC firmware or CBC driver fixed the root
cause.
The [-f] option means enable hardware flow control by set CRTSCTS attribute for
c_cflag of termios, without [-f] option will unset the attribute.
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Vineetha G Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
Reviewed-by: Alex Du <alek.du@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Now cbc_attach service installed by default and thus we can enable
cbc_lifecycle service too.
Signed-off-by: Alek Du <alek.du@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
The 'cbc_lifecycle' component fails to build when using a custom
output directory (e.g.: 'make O=build-test'). This patch fixes
this by replacing a hard-coded path with the variable that points
at the right location where to find its target dependencies.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
cbc_attach is one SOS service that enable IOC CBC line discipline feature.
It started by systemd by default, and exit if failed to set the line
discipline that means the platform does not support IOC.
Signed-off-by: Vineetha G Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Vineetha G Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
Reviewed-by: Key Seong Lim <key.seong.lim@intel.com>
Reviewed-by: Alex Du <alek.du@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch adds build architecture for misc directory and support cbc_lifecycle
build.
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
The cbc_lifecycle service will listen on /dev/cbc-lifecycle tty port to
receive "wakeup reason" information from ioc controller as well as send
heartbeat to ioc to set different power cycle method.
The RTC funtionality is not implemented by current ioc firmware yet,
hence the service leaves it as an empty handler now.
Signed-off-by: Alek Du <alek.du@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>