Changeset 6de2480e in mainline
- Timestamp:
- 2005-05-19T11:55:15Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3ebb64
- Parents:
- 1eee8383
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/boot/Makefile
r1eee8383 r6de2480e 6 6 dd if=boot.bin of=../../../src/image.bin bs=512 conv=sync 7 7 -cat ../../../src/kernel.bin >>../../../src/image.bin 8 dd if=/dev/zero of=../../../src/image.bin bs=1 seek=$(KERNEL_SIZE) count=`expr 1474560 - $(KERNEL_SIZE)` 8 9 9 10 boot.bin: boot.o -
arch/ia32/include/interrupt.h
r1eee8383 r6de2480e 78 78 extern void gp_fault(__u8 n, __u32 stack[]); 79 79 extern void nm_fault(__u8 n, __u32 stack[]); 80 extern void ss_fault(__u8 n, __u32 stack[]); 80 81 extern void page_fault(__u8 n, __u32 stack[]); 81 82 extern void syscall(__u8 n, __u32 stack[]); -
arch/ia32/src/fpu_context.c
r1eee8383 r6de2480e 52 52 void fpu_lazy_context_save(fpu_context_t *fctx) 53 53 { 54 printf(""); 54 55 asm( 55 56 "mov %0,%%eax;" 56 57 "fxsave (%%eax);" 57 "ret;"58 58 :"=m"(fctx) 59 59 : 60 :" %eax"60 :"eax" 61 61 ); 62 printf(""); 62 63 } 63 64 64 65 void fpu_lazy_context_restore(fpu_context_t *fctx) 65 66 { 67 printf(""); 66 68 asm( 67 69 "mov %0,%%eax;" 68 70 "fxrstor (%%eax);" 69 "ret;"70 71 :"=m"(fctx) 71 72 : 72 :" %eax"73 :"eax" 73 74 ); 75 printf(""); 74 76 } 75 77 -
arch/ia32/src/interrupt.c
r1eee8383 r6de2480e 86 86 } 87 87 88 void ss_fault(__u8 n, __u32 stack[]) 89 { 90 printf("stack[0]=%X, %%eip=%X, %%cs=%X, flags=%X\n", stack[0], stack[1], stack[2], stack[3]); 91 printf("%%eax=%L, %%ebx=%L, %%ecx=%L, %%edx=%L,\n%%edi=%L, %%esi=%L, %%ebp=%L, %%esp=%L\n", stack[-2], stack[-5], stack[-3], stack[-4], stack[-9], stack[-8], stack[-1], stack); 92 printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]); 93 panic("Stack fault\n"); 94 } 95 96 88 97 void nm_fault(__u8 n, __u32 stack[]) 89 98 { 90 99 100 // printf("-1\n"); 101 reset_TS_flag(); 91 102 if ((CPU->fpu_owner)!=NULL) 92 103 { 93 fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context)); 104 // printf("owner %X\n",(int)(&((CPU->fpu_owner)->saved_fpu_context))); 105 fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context)); 106 107 // printf("owner 2\n"); 94 108 (CPU->fpu_owner)->fpu_context_engaged=0; /* Enables migration */ 109 // printf("owner 3\n"); 110 95 111 } 96 112 // printf("0\n"); 97 113 if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context)); 98 114 else {fpu_init();THREAD->fpu_context_exists=1;} 99 115 // printf("1\n"); 100 116 CPU->fpu_owner=THREAD; 101 102 reset_TS_flag(); 117 // printf("2\n"); 103 118 119 // printf("3\n"); 104 120 // panic("#NM fault\n"); 105 121 } -
arch/ia32/src/pm.c
r1eee8383 r6de2480e 122 122 trap_register(13, gp_fault); 123 123 trap_register( 7, nm_fault); 124 trap_register(12, ss_fault); 124 125 } 125 126 -
src/Makefile.config
r1eee8383 r6de2480e 18 18 19 19 # Uncomment if you want to run in the test mode 20 #TEST=__TEST__20 TEST=__TEST__ 21 21 22 22 TEST_FILE=test.c … … 26 26 #TEST_DIR=synch/rwlock2/ 27 27 #TEST_DIR=synch/rwlock3/ 28 TEST_DIR=synch/rwlock4/28 #TEST_DIR=synch/rwlock4/ 29 29 #TEST_DIR=synch/rwlock5/ 30 30 #TEST_DIR=synch/semaphore1/ 31 31 #TEST_DIR=synch/semaphore2/ 32 TEST_DIR=fp/fp0
Note:
See TracChangeset
for help on using the changeset viewer.