From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwhrG-0000vD-Je for qemu-devel@nongnu.org; Sun, 02 Nov 2008 13:39:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwhrE-0000ul-CX for qemu-devel@nongnu.org; Sun, 02 Nov 2008 13:39:29 -0500 Received: from [199.232.76.173] (port=58347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwhrE-0000ui-6L for qemu-devel@nongnu.org; Sun, 02 Nov 2008 13:39:28 -0500 Received: from mx2.redhat.com ([66.187.237.31]:38840) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KwhrD-0001hR-LV for qemu-devel@nongnu.org; Sun, 02 Nov 2008 13:39:27 -0500 Date: Sun, 2 Nov 2008 20:39:14 +0200 From: Gleb Natapov Message-ID: <20081102183914.GA23163@redhat.com> References: <20081027101249.21464.57377.stgit@gleb-debian.qumranet.com.qumranet.com> <20081027101259.21464.36016.stgit@gleb-debian.qumranet.com.qumranet.com> <20081102100432.GB16809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH 2/6] Add S3 state to DSDT. Handleresumeevent 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: Sebastian Herbszt Cc: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org On Sun, Nov 02, 2008 at 07:13:37PM +0100, Sebastian Herbszt wrote: >>>> + >>>> + 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 */ >>> >>> bios_shadow_init() is called in pci_bios_init(). Why do we need to lock it here? >>> >> Because we don't call pci_bios_init() if it is S3 resume. > > If pci_bios_init() is not called on S3 resume, pci_bios_init_bridges() > is not called either. This way bios_shadow_init() is never called and the > bios is never shadowed. Since it's not shadowed there is no need to lock it. > What do i miss here? > The BIOS is already shadowed during a regular boot. No need to copy it, just lock. >>>> + return; >>>> + } >>>> + } >>>> + >>>> + uuid_probe(); >>>> + >>>> pci_bios_init(); >>>> >>>> if (bios_table_cur_addr != 0) { >>>> >>> >>> rombios32.c r1.32 got: >>> >>> smp_probe(); >>> >>> pci_bios_init(); >>> >>> if (bios_table_cur_addr != 0) { >>> >>> mptable_init(); >>> >>> uuid_probe(); >>> >>> The patch should remove uuid_probe() from the if-case. >>> >> Why? uuid_probe() is needed only if SMBIOS tables are built. And >> smbios_init() call is in the same if. > > Your patch does also add a uuid_probe() before the if-case. Since it does > not remove the one in the if-case, uuid_probe() will be called twice. > Ah. Now I see. I added this by mistake. I'll fix this. -- Gleb.