qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [Bochs-developers] [PATCH v5 1/5] Add S3 state to DSDT.


From: Gleb Natapov
Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH v5 1/5] Add S3 state to DSDT.Handle resume event in the BIOS.
Date: Wed, 10 Dec 2008 12:22:36 +0200

On Tue, Dec 09, 2008 at 07:06:04PM -0500, Kevin O'Connor wrote:
> On Tue, Dec 09, 2008 at 11:26:53PM +0100, Sebastian Herbszt wrote:
> > Gleb Natapov wrote:
> > > On Sat, Dec 06, 2008 at 09:57:38PM -0500, Kevin O'Connor wrote:
> > >> Also, wouldn't this corrupt memory used by the stack (the stack gets
> > >> set to 0xfffe, and s3_post has call insns in it)?
> > > Oh. I thought it was set to be at the top of the first page, but it has
> > > one extra 'f' :( We should change it to be 0xffe instead.
> > 
> > Can you please explain this memory corruption? Why would "this" (?) corrupt
> > memory used by the stack?
> 
> On an s3 resume, memory the OS may be using must not be changed by the
> bios.  When bochs bios detects an s3 resume, it jumps to s3_post with
> the stack pointer set to 0xfffe.  In s3_post, there are "call"
> instruction which will alter memory at 0xfffe (to store the return
> address).  This could break the resume, because the OS could be using
> that memory for something else.
> 
> Gleb is suggesting that we change that to 0xffe, because the OS can't
> be using memory at that address and expect s3 resume to work.  (The
> first 4KiB is reserved for BIOS use.)
> 
And the patch I've sent set sp to 0xffe only on S3 resume path where
stack usage is minimal.

--
                        Gleb.




reply via email to

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