Commit Graph

5 Commits

Author SHA1 Message Date
Conghui Chen 557e7f19f7 Makefile: add gcc flags to prevent some optimization
Add the below flags, they are needed in -O2:

-fno-delete-null-pointer-checks:
    * tells the compiler NOT to assume that null pointer deference does
    not exist.

    * Without this flag, below case cannot be detected:
    a pointer might point to nullsometime during run-time and if there
    is no validation for that pointer, it will cause the program to crash.
    Since we don’t receive an error message saying that a pointer is
    pointing to null, we will have a hard time trying to find the problem.

-fwrapv:
    * tells the compiler that signed overflow always wraps.

    * Without this flag, x + 10 > x will always be true for signed x.
     With the flag, x + 10 > x is not always be true, as the overflow is
     defined for x, and it could wrap.

Tracked-On: #4194
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
2019-12-10 10:02:15 +08:00
Yuan Liu 73b8c91e06 Misc: lifemngr-daemon-on-UOS for windows
For cross-VM S5 notify via vUART, life_mngr service is running on UOS.
It is listening on COM2 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: Yuan Liu <yuan1.liu@intel.com>
2019-10-24 13:20:53 +08:00
fuyanX df5ef925bf Misc: life_mngr clear compile warning
As Makefile's strict check, clear compile warnings for life_mngr.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
fuyanX 91366b876c Misc: lifemngr add Makefile
Add Makefile for life_mngr. life_mngr is a service on UOS.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Reviewed-by: VanCutsem, Geoffroy <geoffroy.vancutsem@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
fuyanX 2ea2716cd9 Misc: lifemngr-daemon-on-UOS
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>
2019-09-16 09:39:54 +08:00