WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Problem with BIOS timer interrupts

To: "Gary Grebus" <ggrebus@xxxxxxxxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Problem with BIOS timer interrupts
From: "Huang2, Wei" <Wei.Huang2@xxxxxxx>
Date: Tue, 18 Nov 2008 13:31:34 -0600
Cc:
Delivery-date: Tue, 18 Nov 2008 11:32:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1227034222.17638.83.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1227034222.17638.83.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclJrpFuog+dC1aySXe8uIEVo/3vTwAB3DeA
Thread-topic: [Xen-devel] Problem with BIOS timer interrupts
Gary,

Which CPU family you are using? 0xF? There is an errata which seems to
be related. See page 50. 

http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
33610.pdf


-Wei
                

-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Gary Grebus
Sent: Tuesday, November 18, 2008 12:50 PM
To: xen-devel
Subject: [Xen-devel] Problem with BIOS timer interrupts

Hi,

While changing our Xen 3.2.x based HVM BIOS ROM to use gPXE instead of
etherboot, I ran into an interesting behavior.  The gPXE code, which
runs in real mode, contains the following sequence:

wait_for_tick:
        pushl   %eax
        pushw   %fs
        movw    $0x40, %ax
        movw    %ax, %fs
        movl    %fs:(0x6c), %eax
1:      pushf
        sti
        hlt
        popf
        cmpl    %fs:(0x6c), %eax
        je      1b
        popw    %fs
        popl    %eax
        ret

It uses this to timeout waiting for a key press.  The expected interrupt
is from the BIOS timer implemented in rombios.  But in fact, the loop
hangs.  However, if I insert a nop instruction between the sti and hlt,
then things work as expected.

Is there something wrong with this sequence?  This happens on AMD, so
it's not a quirk of the real mode emulations on Intel. 

I notice that in the gPXE code currently in xen-unstable, the path that
uses this code is patched out.

        /gary

-- 
Gary Grebus
Virtual Iron Software, Inc.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel