mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-11 01:44:55 +00:00
enter_s3 is main function for ACRN to enter S3 state with following process: - pause vm0 - save the wakeup vec of vm0 and set wakeup vec of ACRN. So resume from S3 will jump to ACRN wakeup - offline APs - update the main entry of trampoline to resume entry. After BSP is resume from S3, it will jump to resume entry instead of AP startup routine - turn off vmx - suspend devices - enter S3. exit S3 with following process: - release trampoline_spinlock which is hold in trampoline code - resume devices - enable vmx - update the main entry of trampoline to AP startup routine. - online APs. The following operations will be resume vm0 which will be added in next patch. Signed-off-by: Zheng Gen <gen.zheng@intel.com> Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
17 lines
365 B
C
17 lines
365 B
C
/*
|
|
* Copyright (C) <2018> Intel Corporation
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef HOST_PM_H
|
|
|
|
#define BIT_WAK_STS 15U
|
|
|
|
int enter_s3(struct vm *vm, uint32_t pm1a_cnt_val,
|
|
uint32_t pm1b_cnt_val);
|
|
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 */
|