Changeset 7df54df in mainline
- Timestamp:
- 2005-09-02T14:00:48Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32f6e1bd
- Parents:
- 73838ed
- Files:
-
- 2 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/Makefile.inc
r73838ed r7df54df 33 33 arch/mm/tlb.c \ 34 34 arch/asm_utils.S \ 35 arch/fmath.c 35 arch/fmath.c \ 36 arch/mm/memory_init.c -
arch/amd64/src/amd64.c
r73838ed r7df54df 39 39 40 40 #include <arch/bios/bios.h> 41 #include <arch/mm/memory_init.h> 41 42 42 43 void arch_pre_mm_init(void) … … 65 66 } 66 67 } 68 69 void arch_late_init(void) 70 { 71 if (config.cpu_active == 1) { 72 memory_print_map(); 73 74 #ifdef __SMP__ 75 acpi_init(); 76 #endif /* __SMP__ */ 77 } 78 } 79 80 void calibrate_delay_loop(void) 81 { 82 return; 83 i8254_calibrate_delay_loop(); 84 i8254_normal_operation(); 85 } -
arch/amd64/src/asm_utils.S
r73838ed r7df54df 44 44 movq $halt, (%rsp) 45 45 jmp printf 46 47 .global has_cpuid 48 .global rdtsc 49 50 51 ## Determine CPUID support 52 # 53 # Return 0 in EAX if CPUID is not support, 1 if supported. 54 # 55 has_cpuid: 56 pushq %rbx 57 58 pushfq # store flags 59 popq %rax # read flags 60 movq %rax,%rbx # copy flags 61 btcl $21,%ebx # swap the ID bit 62 pushq %rbx 63 popfq # propagate the change into flags 64 pushfq 65 popq %rbx # read flags 66 andl $(1<<21),%eax # interested only in ID bit 67 andl $(1<<21),%ebx 68 xorl %ebx,%eax # 0 if not supported, 1 if supported 69 70 popq %rbx 71 ret 72 73 74 rdtsc: 75 xorq %rax,%rax 76 rdtsc 77 ret 78 46 79 47 80 # Push all general purpose registers on stack except %rbp, %rsp -
arch/amd64/src/boot/boot.S
r73838ed r7df54df 34 34 35 35 #define START_STACK 0x7c00 36 #define START_STACK_64 $0xffffffff80007c0036 #define START_STACK_64 0xffffffff80007c00 37 37 38 38 # … … 52 52 movw %ax,%ds 53 53 movw %ax,%ss # initialize stack segment register 54 movl START_STACK,%esp # initialize stack pointer54 movl $(START_STACK),%esp # initialize stack pointer 55 55 56 #call memmap_arch_init56 call memmap_arch_init 57 57 58 58 movl $0x80000000, %eax … … 117 117 .code64 118 118 start64: 119 movq START_STACK_64, %rsp119 movq $(START_STACK_64), %rsp 120 120 121 121 call main_bsp # never returns -
arch/amd64/src/dummy.s
r73838ed r7df54df 35 35 .global cpu_sleep 36 36 .global cpu_print_report 37 .global arch_late_init38 .global calibrate_delay_loop39 37 .global dummy 40 .global rdtsc41 38 .global reset_TS_flag 42 39 .global fpu_init 43 40 44 .global memory_print_map45 .global get_memory_size46 47 get_memory_size:48 movq $4*1024*1024, %rax49 ret50 51 rdtsc:52 41 before_thread_runs_arch: 53 42 userspace: 54 calibrate_delay_loop:55 43 cpu_identify: 56 44 cpu_arch_init: 57 45 cpu_sleep: 58 46 cpu_print_report: 59 arch_late_init:60 calibrate_delay_loop:61 47 reset_TS_flag: 62 48 fpu_init: 63 memory_print_map:64 49 65 50 dummy: -
src/build.amd64
r73838ed r7df54df 5 5 (cd ../arch/amd64/src;make gencontext;./gencontext) 6 6 # Create links to ia32 architecture 7 for a in drivers bios; do 8 ln -sf ../../ia32/src/$a ../arch/amd64/src/ 9 done 10 for a in frame.c tlb.c; do 11 ln -sf ../../../ia32/src/mm/$a ../arch/amd64/src/mm 7 8 ( 9 set -e 10 cd ../arch 11 for a in drivers bios mm/frame.c mm/tlb.c mm/memory_init.c boot/memmap.S; do 12 echo ln -sf `pwd`/ia32/src/$a amd64/src/$a 13 ln -sf `pwd`/ia32/src/$a amd64/src/$a 12 14 done 13 15 14 for a in ega.h i8042.h i8259.h i8254.h cpuid.h interrupt.h bios; do 15 ln -sf ../../ia32/include/$a ../arch/amd64/include/ 16 for a in ega.h i8042.h i8259.h i8254.h interrupt.h bios mm/memory_init.h; do 17 echo ln -sf `pwd`/ia32/include/$a amd64/include/$a 18 ln -sf `pwd`/ia32/include/$a amd64/include/$a 16 19 done 17 ln -sf ../../../ia32/include/mm/memory_init.h ../arch/amd64/include/mm/ 18 20 ) 19 21 make dist-clean ARCH=ia32 20 22 make all ARCH=amd64 -
src/main/main.c
r73838ed r7df54df 187 187 panic("can't create kinit thread\n"); 188 188 thread_ready(t); 189 190 189 /* 191 190 * This call to scheduler() will return to kinit,
Note:
See TracChangeset
for help on using the changeset viewer.