From mboxrd@z Thu Jan 1 00:00:00 1970 From: Malcolm Crossley Subject: Re: S3 resume issues Date: Wed, 2 Jan 2013 20:35:18 +0000 Message-ID: <50E49A06.4010504@citrix.com> References: <50E44F25.2060501@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050104090702060602040507" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ben Guthro Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --------------050104090702060602040507 Content-Type: multipart/alternative; boundary="------------030803010003080506010008" --------------030803010003080506010008 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit On 02/01/13 16:46, Ben Guthro wrote: > On Wed, Jan 2, 2013 at 10:31 AM, Ben Guthro > wrote: > > The actual wakeup vector is wakeup_start in > xen/arch/x86/boot/wakeup.S > > > I'll take a look at this, thanks for the pointer. > > > I've tried putting a "ud2" instruction at the start of wakeup_start - > and the machine doesn't seem to crash. > I also tried a divide by zero in the same place, just for good measure. > > It would appear that this wakeup_start is not getting executed on resume. > Presumably, the BIOS is causing the disk, and CDROM LEDs to flash, > while enumerating the bus. > > A difference between Xen 4.0.y and 4.2.y seems to be the removal of > the boot trampoline fixed address, that much of this is calculated as > an offset of. > Could an error in this path cause such a behavior? It seems the trampoline is allocated at a different location in Xen 4.2 (EBDA - 64k instead of 0x7c000). I have attached a quick patch to move the location back to 0x7c000 to see if that helps your system. I have compile and boot tested the patch but not had time to do a S3 test on it. Can you try it on your system? Can you also run the following command as root in dom0: hexdump -s 0x400 -n 32 /dev/mem > > /btg Malcolm --------------030803010003080506010008 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 02/01/13 16:46, Ben Guthro wrote:
On Wed, Jan 2, 2013 at 10:31 AM, Ben Guthro <ben@guthro.net> wrote:
The actual wakeup vector is wakeup_start in xen/arch/x86/boot/wakeup.S

I'll take a look at this, thanks for the pointer.

I've tried putting a "ud2" instruction at the start of wakeup_start - and the machine doesn't seem to crash.
I also tried a divide by zero in the same place, just for good measure.

It would appear that this wakeup_start is not getting executed on resume.
Presumably, the BIOS is causing the disk, and CDROM LEDs to flash, while enumerating the bus.

A difference between Xen 4.0.y and 4.2.y seems to be the removal of the boot trampoline fixed address, that much of this is calculated as an offset of.
Could an error in this path cause such a behavior?

It seems the trampoline is allocated at a different location in Xen 4.2 (EBDA - 64k instead of 0x7c000). I have attached a quick patch to move the location back to 0x7c000 to see if that helps your system. I have compile and boot tested the patch but not had time to do a S3 test on it. Can you try it on your system?

Can you also run the following command as root in dom0:

hexdump -s 0x400 -n 32 /dev/mem

/btg

Malcolm
--------------030803010003080506010008-- --------------050104090702060602040507 Content-Type: text/x-patch; name="force-x86-trampoline-to-0x7c000.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="force-x86-trampoline-to-0x7c000.patch" # HG changeset patch # Parent a98b2e22ecbb57fee6b061dee3e3fb264fbf6f4e Test patch!: Force x86 boot trampoline to be allocated at 0x7c000 instead of EBDA - 64k diff -r a98b2e22ecbb xen/arch/x86/boot/head.S --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -77,8 +77,8 @@ gdt_boot_descr: cmp $0x2BADB002,%eax jne not_multiboot - /* Set up trampoline segment 64k below EBDA */ - movzwl 0x40e,%eax /* EBDA segment */ + /* Hard code trampoline to 0x7c000 */ + mov $0x8c00,%eax /* hardcoded 0x8c00 */ cmp $0xa000,%eax /* sanity check (high) */ jae 0f cmp $0x4000,%eax /* sanity check (low) */ --------------050104090702060602040507 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------050104090702060602040507--