From 0bacd1300dbcd7f56bdbf1ca73438b6a68c31b8f Mon Sep 17 00:00:00 2001 From: aliguori Date: Wed, 17 Dec 2008 22:32:52 +0000 Subject: Handle suspend in qemu (Gleb Natapov) Reset a PC and tell BIOS that resume from ram is required on the next boot. Signed-off-by: Gleb Natapov Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6080 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/pc.c') diff --git a/hw/pc.c b/hw/pc.c index 73dd8bcc4a..fe03704288 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1135,6 +1135,14 @@ static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size, initrd_filename, 0, cpu_model); } +/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) + BIOS will read it and start S3 resume at POST Entry */ +void cmos_set_s3_resume(void) +{ + if (rtc_state) + rtc_set_memory(rtc_state, 0xF, 0xFE); +} + QEMUMachine pc_machine = { .name = "pc", .desc = "Standard PC", -- cgit v1.2.3