mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-13 22:06:49 +00:00
DM: Add funciton to update PM_WAK_STS
According to ACPI spec, when system back to working mode from S3, WAK_STS bit (15) should be set. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
a8a27d82d0
commit
7db4c0aac9
@ -175,6 +175,15 @@ pm1_status_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pm_backto_wakeup(struct vmctx *ctx)
|
||||||
|
{
|
||||||
|
/* According to ACPI 5.0 Table 4-16: bit 15, WAK_STS should be
|
||||||
|
* set when system trasition to the working state
|
||||||
|
*/
|
||||||
|
pm1_status |= PM1_WAK_STS;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pm1_enable_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
pm1_enable_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||||
uint32_t *eax, void *arg)
|
uint32_t *eax, void *arg)
|
||||||
|
@ -622,6 +622,7 @@ vm_suspend_resume(struct vmctx *ctx)
|
|||||||
vm_stop_watchdog(ctx);
|
vm_stop_watchdog(ctx);
|
||||||
wait_for_resume(ctx);
|
wait_for_resume(ctx);
|
||||||
|
|
||||||
|
pm_backto_wakeup(ctx);
|
||||||
vm_reset_watchdog(ctx);
|
vm_reset_watchdog(ctx);
|
||||||
vm_reset(ctx);
|
vm_reset(ctx);
|
||||||
}
|
}
|
||||||
|
@ -58,5 +58,6 @@ void dsdt_indent(int levels);
|
|||||||
void dsdt_unindent(int levels);
|
void dsdt_unindent(int levels);
|
||||||
void sci_init(struct vmctx *ctx);
|
void sci_init(struct vmctx *ctx);
|
||||||
void pm_write_dsdt(struct vmctx *ctx, int ncpu);
|
void pm_write_dsdt(struct vmctx *ctx, int ncpu);
|
||||||
|
void pm_backto_wakeup(struct vmctx *ctx);
|
||||||
|
|
||||||
#endif /* _ACPI_H_ */
|
#endif /* _ACPI_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user