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

[Xen-devel] A useless short jmp?


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.