Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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