dm: pm: add dm option to select guest notify method

Now, we have two ways to notify guest about power managment
event:
  - ioc on MRB platforms
  - ACPI power button on other platforms
And we hardcode which one is used now.

In coming change, we will add UART based guest notify method.
We add dm command option to select which method will be used
when launch UOS.

Tracked-On: #3564
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang Yu <yu1.wang@intel.com>
This commit is contained in:
Yin Fengwei
2019-09-05 15:30:46 +08:00
committed by ACRN System Integration
parent 1041384993
commit b36d80ea0c
2 changed files with 48 additions and 9 deletions

View File

@@ -5,6 +5,10 @@
#ifndef _DM_INCLUDE_PM_
#define _DM_INCLUDE_PM_
#define PWR_EVENT_NOTIFY_IOC 0x1
#define PWR_EVENT_NOTIFY_PWR_BT 0x2
#define PWR_EVENT_NOTIFY_UART 0x3
int wait_for_resume(struct vmctx *ctx);
int vm_resume(struct vmctx *ctx);
int vm_monitor_resume(void *arg);