Changeset 8fc0d455 in mainline for arch/amd64/src/boot/boot.S
- Timestamp:
- 2005-08-30T17:50:07Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c0a9b3
- Parents:
- b45aa23
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/boot/boot.S
rb45aa23 r8fc0d455 1 1 # 2 # Copyright (C) 2001-2004 Jakub Jermar2 # Copyright (C) 2001-2004 Ondrej Palkovsky 3 3 # All rights reserved. 4 4 # … … 27 27 # 28 28 29 #define __ASM__ 30 31 #include <arch/mm/page.h> 29 32 #include <arch/mm/ptl.h> 33 #include <arch/pm.h> 30 34 31 35 #define START_STACK 0x7c00 … … 52 56 # call memmap_arch_init 53 57 54 mov $0x80000000, %eax58 movl $0x80000000, %eax 55 59 cpuid 56 60 cmp $0x80000000, %eax # any function > 80000000h? 57 61 jbe no_long_mode 58 mov $0x80000001, %eax # Extended function code 8000000162 movl $0x80000001, %eax # Extended function code 80000001 59 63 cpuid 60 64 bt $29, %edx # Test if long mode is supported. … … 69 73 movl %eax,%cr0 # switch to protected mode 70 74 71 jmpl $ 40, $now_in_prot75 jmpl $selector(KTEXT32_DES), $now_in_prot 72 76 73 77 no_long_mode: … … 79 83 now_in_prot: 80 84 # Set up stack & data descriptors 81 movw $ 16, %ax85 movw $selector(KDATA_DES), %ax 82 86 movw %ax, %ds 83 87 movw %ax, %fs … … 107 111 108 112 # At this point we are in compatibility mode 109 jmpl $ 8, $start64113 jmpl $selector(KTEXT_DES), $start64 110 114 111 115 .code64 … … 150 154 .global gdtr_inst 151 155 gdtr_inst: 152 .word 7*8 # GDT_ITEMS * 8153 .long gdt + 0x80000000156 .word selector(GDT_ITEMS) 157 .long KA2PA(gdt) 154 158 155 159 .global idtr_inst 156 160 idtr_inst: 157 161 .word 0 158 .long idt + 0x80000000162 .long KA2PA(idt)
Note:
See TracChangeset
for help on using the changeset viewer.