qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [Bochs-developers] [PATCH v4 2/5] Preserve memory conte


From: Gleb Natapov
Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH v4 2/5] Preserve memory content duringSMM init.
Date: Tue, 18 Nov 2008 09:46:28 +0200

On Tue, Nov 18, 2008 at 12:51:17AM +0100, Sebastian Herbszt wrote:
> smm_init() is currently only run on VM start and overwriting
> memory is not an issue there. This would matter on S3 resume,
> but smm_init() is not run there. It is only run from pci_bios_init(),
> but on S3 resume we bail out from rombios32.c before this call.
> Your patch to handle S3 in qemu does use qemu_system_reset_request()
> which does reset some emulated devices. Since piix4_pm does not
> register a reset handler it is not reset. I assume the reset on S3 resume
> is a hardware reset and the state of piix4_pm should be reset too, right?
S3 removes power from all devices except memory, so yes, piix4_pm should
be reset to its power up state.

> cpu_reset() in target-i386/helper.c does set smbase to 0x30000. Since the
> piix4_pm state is not lost, APMC_EN is still set and even on a normal reset
> SMBASE is not relocated. If i don't mistake smm_init() should be run on S3
> resume and we would need something like
>
> pci_for_each_device(find_piix4pm)
> if (piix4pm_pcidev)
>    smm_init();
>
> in the resume path in rombios32.c.
>
Yes, you are right. I'll add it.

--
                        Gleb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]