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

[Xen-devel] A useless short jmp?

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] A useless short jmp?
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Mon, 18 Jun 2007 22:03:19 +0800
Delivery-date: Mon, 18 Jun 2007 07:01:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcexsWxtRnqse1ngRRSVOXIcWSiSzw==
Thread-topic: A useless short jmp?
In trampoline.S we have a short jmp after lmsw:

trampoline_realmode_entry:
        mov     %cs,%ax
        mov     %ax,%ds
        movb    $0xA5,bootsym(trampoline_cpu_started)
        cld
        cli
        lidt    bootsym(idt_48)
        lgdt    bootsym(gdt_48)
        xor     %ax, %ax
        inc     %ax
        lmsw    %ax                       # CR0.PE = 1 (enter protected
mode)
        mov     $1,%bl                    # EBX != 0 indicates we are an
AP
        jmp     1f
1:      ljmpl   $BOOT_CS32,$bootsym_phys(trampoline_protmode_entry)

According to Intel Spec, it's useless, do we have any special reason to
have it there?
BTW why put mov $1, %bl between lmsw and it's corresponding ljmp?
thanks
-Xin

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

<Prev in Thread] Current Thread [Next in Thread>