From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1PCi-0001eX-1T for qemu-devel@nongnu.org; Sat, 15 Nov 2008 12:45:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1PCa-0001aX-EO for qemu-devel@nongnu.org; Sat, 15 Nov 2008 12:45:00 -0500 Received: from [199.232.76.173] (port=35729 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1PCa-0001aB-1w for qemu-devel@nongnu.org; Sat, 15 Nov 2008 12:44:56 -0500 Received: from mail.gmx.net ([213.165.64.20]:34869) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1L1PCY-0000j5-Pn for qemu-devel@nongnu.org; Sat, 15 Nov 2008 12:44:55 -0500 Message-ID: <67824189A71746ACA0DBE3A86D3A647B@FSCPC> From: "Sebastian Herbszt" References: <20081110091134.11822.34230.stgit@dhcp-1-237.local> <20081110091144.11822.2723.stgit@dhcp-1-237.local> In-Reply-To: <20081110091144.11822.2723.stgit@dhcp-1-237.local> Date: Sat, 15 Nov 2008 18:43:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH v3 2/6] Add S3 state to DSDT. Handleresume event in the BIOS. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov , bochs-developers@lists.sourceforge.net Cc: qemu-devel@nongnu.org Gleb Natapov wrote: > @@ -2024,6 +2078,21 @@ void rombios32_init(void) > > smp_probe(); > > + find_bios_table_area(); > + > + if (*shutdown_flag == 0xfe) { > + *s3_resume_vector = find_resume_vector(); > + if (!*s3_resume_vector) { > + BX_INFO("This is S3 resume but wakeup vector is NULL\n"); > + } else { > + BX_INFO("S3 resume vector %p\n", *s3_resume_vector); > + /* redirect bios read access to RAM */ > + pci_for_each_device(find_440fx); > + bios_lock_shadow_ram(); /* bios is already copied */ > + return; > + } > + } > + > pci_bios_init(); > > if (bios_table_cur_addr != 0) { Any reason not to immediately return if the wakeup vector is NULL? @@ -2092,8 +2100,8 @@ void rombios32_init(uint32_t *s3_resume_ /* redirect bios read access to RAM */ pci_for_each_device(find_440fx); bios_lock_shadow_ram(); /* bios is already copied */ - return; } + return; } pci_bios_init(); Right now it's 08129025147i[BIOS ] Starting rombios32 08129025685i[BIOS ] Shutdown flag fe 08129026400i[BIOS ] ram_size=0x02000000 08129026920i[BIOS ] Found 1 cpu(s) 08129042926i[BIOS ] bios_table_addr: 0x000fb8d8 end=0x000fcc00 08129043418i[BIOS ] addr: fb8e0 ... 08129190123i[BIOS ] addr: fcbf0 08129190427i[BIOS ] not found! 08129191319i[BIOS ] This is S3 resume but wakeup vector is NULL 08129191563i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) 08129519297i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) 08129847706i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b 08129847754i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 08129847802i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b 08129847850i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 08129847865i[P2I ] write: ELCR2 = 0x0a 08129848774i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a 08129869073i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600 08129872394i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601 08129875211i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101 08129876440i[BIOS ] region 4: 0x0000c000 08129879084i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680 08129879610i[ACPI ] new irq line = 11 08129902500i[BIOS ] MP table addr=0x000fb9b0 MPC table addr=0x000fb8e0 size=0xd0 08129903706i[BIOS ] SMBIOS table addr=0x000fb9c0 08129906032i[BIOS ] ACPI tables: RSDP addr=0x000fbad0 ACPI DATA addr=0x01ff0000 size=0x9c0 08129908490i[BIOS ] Firmware waking vector 0x1ff00cc 08129919858i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) 08129920699i[BIOS ] bios_table_cur_addr: 0x000fbaf4 08129923802i[BIOS ] S3 resume called 00fe 0x00000000 08129948224p[BIOS ] >>PANIC<< Returned from s3_resume. In any case we bail out in s3_resume() and panic. But if we don' return and let rombios_init() continue the ACPI tables get recreated which could make debugging a bit harder since we lose the old state. - Sebastian