Commit Graph

21 Commits

Author SHA1 Message Date
Yin Fengwei adf3a59302 Makefile: Refine Makefile to generate both industry and sdc images
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>
2019-09-02 19:25:31 +08:00
fuyanX 83e887dbb3 memmap:reserve phys-addr for hvlog
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>
2019-08-05 18:27:38 +08:00
Wei Liu 18b4e3023a acrn-config: add README for scenario_config and launch_config
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>
2019-07-30 16:38:23 +08:00
Wei Liu a03b134190 acrn-config: generate a patch and apply to acrn-hypervisor
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>
2019-07-30 16:38:23 +08:00
Wei Liu 8adefe26ac acrn-config: generate board information on target board
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>
2019-07-30 16:38:23 +08:00
yuhong.tao@intel.com 8b27daa778 tools: acrnctl add '--force' option to 'stop' cmd
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>
2019-07-30 13:27:16 +08:00
yuhong.tao@intel.com 59fd4202d3 tools: add force parameter to acrn VM stop operations
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>
2019-07-30 13:27:16 +08:00
Terry Zou a9c38a5cfb HV:Acrn-hypvervisor Root Directory Clean-up and create misc/ folder for Acrn daemons, services and tools.
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>
2019-07-29 22:58:24 +08:00
Alek Du 2a656812df misc: totally remove misc folder
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>
2018-08-10 10:40:49 +08:00
Tan Yew Wayne 8af90e0154 misc: Remove unnecessary ExecStop in systemd services
From systemd documentation: https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStop=
> If this option is not specified, the process is terminated by sending the signal specified in KillSignal= when service stop is requested.

https://www.freedesktop.org/software/systemd/man/systemd.kill.html#KillSignal=
> Defaults to SIGTERM.

Signed-off-by: Tan Yew Wayne <yew.wayne.tan@intel.com>
2018-08-09 08:58:12 +08:00
yuhong.tao@intel.com 9695d3bd15 tools: replace payload[0] of struct mngr_msg with an union
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>
2018-07-19 11:08:18 +08:00
Alek Du 4eae78cb71 cbc: fix the install issue when do make misc-install only
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>
2018-07-03 15:32:11 +08:00
Yuan Liu 21b9ba8a84 misc: disable cbc_lifecycle service always restart by systemd
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>
2018-07-02 15:25:12 +08:00
Yuan Liu 7791934cc4 misc: fix cbc_attach blocks APL NUC boot for 20 seconds
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>
2018-06-29 16:41:50 +08:00
Yuan Liu 5e521e24e2 IOC mediator: Disable hardware flow control by default
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>
2018-06-08 14:29:51 +08:00
Alek Du 5b49529739 cbc_lifecycle: fix a service typo
The service type was set twice and inconsistent.

Signed-off-by: Alek Du <alek.du@intel.com>
2018-06-08 12:07:12 +08:00
Alek Du cbb692d910 add cbc_lifecycle service systemd support
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>
2018-06-05 10:23:15 +08:00
Geoffroy Van Cutsem c4bd0db1ca cbc_lifecycle: fix building using custom output directory
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>
2018-06-05 10:22:46 +08:00
Vineetha G Jaya Kumaran 8e45c663e4 misc: integrate cbc_attach service
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>
2018-06-01 10:22:52 +08:00
Yu Wang d04b1419b2 misc: Add Makefile for misc directory
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>
2018-06-01 10:22:52 +08:00
Alek Du c6d8e7fd73 ioc: add cbc_lifecycle service
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>
2018-05-31 16:09:05 +08:00