hv: implement lowlevel S3 enter/wakeup

The S3 enter lowlevel routine saves the cpu context to memory
and enter S3 state

The S3 wakeup lowlevel routine restore cpu context and return.

Signed-off-by: Zheng Gen <gen.zheng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-06-14 10:11:57 +08:00
committed by Xie, nanlin
parent 443491009e
commit a06a2f28cd
5 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
/*
* Copyright (C) <2018> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef HOST_PM_H
extern void __enter_s3(struct vm *vm, uint32_t pm1a_cnt_val,
uint32_t pm1b_cnt_val);
extern void restore_s3_context(void);
#endif /* ARCH_X86_PM_H */

View File

@@ -19,6 +19,7 @@
#include <vcpu.h>
#include <trusty.h>
#include <guest_pm.h>
#include <host_pm.h>
#include <vm.h>
#include <cpuid.h>
#include <mmu.h>