diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2005-02-02 18:27:05 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2005-02-02 18:27:05 +0000 |
commit | 9188844c02797f5202e87530974e3ba2fb51a551 (patch) | |
tree | 521a5da00076a93f57e019142fa22bf01685ce86 /xen/arch/x86/boot/x86_64.S | |
parent | 0e0c5e7aef46f8a3ae1daf83169288b4d520a077 (diff) | |
download | xen-9188844c02797f5202e87530974e3ba2fb51a551.tar.gz xen-9188844c02797f5202e87530974e3ba2fb51a551.tar.bz2 xen-9188844c02797f5202e87530974e3ba2fb51a551.zip |
bitkeeper revision 1.1159.212.72 (42011b79Y7C9nEKFZ5pdQXwp8jC9hw)
More x86/64. Now boot secondary CPUs, but I seem to have problems
executing IRET, so interrupts are fatal.
Signed-off-by: keir.fraser@cl.cam.ac.uk
Diffstat (limited to 'xen/arch/x86/boot/x86_64.S')
-rw-r--r-- | xen/arch/x86/boot/x86_64.S | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index f1bc4ece46..d867340480 100644 --- a/xen/arch/x86/boot/x86_64.S +++ b/xen/arch/x86/boot/x86_64.S @@ -52,16 +52,16 @@ __start: /* Set up a few descriptors: on entry only CS is guaranteed good. */ lgdt %cs:0x1001f0 - mov $(__HYPERVISOR_DS),%ecx + mov $(__HYPERVISOR_DS32),%ecx mov %ecx,%ds mov %ecx,%es - /* Check for Multiboot bootloader */ cmp $(SECONDARY_CPU_FLAG),%ebx - je skip_multiboot_check + je skip_boot_checks + + /* Check for Multiboot bootloader */ cmp $0x2BADB002,%eax jne not_multiboot -skip_multiboot_check: /* Save the Multiboot info structure for later use. */ mov %ebx,0x1001e0 @@ -75,7 +75,8 @@ skip_multiboot_check: cpuid bt $29,%edx # Long mode feature? jnc bad_cpu - +skip_boot_checks: + /* Set up FPU. */ fninit @@ -123,6 +124,13 @@ skip_multiboot_check: ret __high_start: + mov $(__HYPERVISOR_DS64),%ecx + mov %ecx,%ds + mov %ecx,%es + mov %ecx,%fs + mov %ecx,%gs + mov %ecx,%ss + lidt idt_descr(%rip) cmp $(SECONDARY_CPU_FLAG),%ebx @@ -203,7 +211,7 @@ SYMBOL_NAME(idt): .quad SYMBOL_NAME(idt_table) ENTRY(stack_start) - .quad SYMBOL_NAME(cpu0_stack) + 8100 + .quad SYMBOL_NAME(cpu0_stack) + 8000 high_start: .quad __high_start @@ -241,9 +249,8 @@ ENTRY(cpu0_stack) # Initial stack is 8kB ENTRY(stext) ENTRY(_stext) -.globl switch_to, ret_from_intr, do_iopl +.globl switch_to, do_iopl switch_to: -ret_from_intr: do_iopl: .globl copy_from_user, copy_to_user, copy_user_generic, new_thread copy_from_user: |