Changeset 42edee68 in mainline for arch/amd64/src/boot/boot.S
- Timestamp:
- 2006-01-08T19:33:17Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0c0410b
- Parents:
- 46d26ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/boot/boot.S
r46d26ee r42edee68 1 1 # 2 2 # Copyright (C) 2005 Ondrej Palkovsky 3 # Copyright (C) 2006 Martin Decky 3 4 # All rights reserved. 4 5 # … … 38 39 39 40 .section K_TEXT_START, "ax" 40 # .code16 41 # .global kernel_image_start 42 # .global multiboot_image_start 43 # kernel_image_start: 44 45 # movl $0x80000000, %eax 46 # cpuid 47 # cmp $0x80000000, %eax # any function > 80000000h? 48 # jbe no_long_mode 49 # movl $(AMD_CPUID_EXTENDED), %eax # Extended function code 80000001 50 # cpuid 51 # bt $29, %edx # Test if long mode is supported. 52 # jnc no_long_mode 53 # 54 # 55 # no_long_mode: 56 # 1: 57 # jmp 1b 58 # 41 59 42 .code32 60 43 .align 4 … … 90 73 # the Default operand size must not be 1 when entering long mode 91 74 75 movl $0x80000000, %eax 76 cpuid 77 cmp $0x80000000, %eax # any function > 80000000h? 78 jbe long_mode_unsupported 79 movl $(AMD_CPUID_EXTENDED), %eax # Extended function code 80000001 80 cpuid 81 bt $29, %edx # Test if long mode is supported. 82 jc long_mode_supported 83 84 long_mode_unsupported: 85 cli 86 hlt 87 88 long_mode_supported: 89 92 90 # Enable 64-bit page transaltion entries - CR4.PAE = 1. 93 91 # Paging is not enabled until after long mode is enabled … … 218 216 219 217 invalid_boot: 218 219 #ifdef CONFIG_SMP 220 221 # copy AP bootstrap routines below 1 MB 222 223 movq $BOOT_OFFSET, %rsi 224 movq $AP_BOOT_OFFSET, %rdi 225 movq $_hardcoded_unmapped_size, %rcx 226 cld 227 rep movsb 228 229 #endif 220 230 221 231 call main_bsp # never returns
Note:
See TracChangeset
for help on using the changeset viewer.