Changeset 6de2480e in mainline for arch/ia32/src/interrupt.c


Ignore:
Timestamp:
2005-05-19T11:55:15Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3ebb64
Parents:
1eee8383
Message:

IA-32 FPU lazy context switching.
Doesn't work on Bochs and sometimes produces wrong results on P4.
Seems to work on VMware and PII.

Build script for IA-32 changed to build floppy images (image.bin) 1440K long.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/interrupt.c

    r1eee8383 r6de2480e  
    8686}
    8787
     88void 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
    8897void nm_fault(__u8 n, __u32 stack[])
    8998{
    9099
     100//      printf("-1\n");       
     101        reset_TS_flag();
    91102        if ((CPU->fpu_owner)!=NULL)
    92103        { 
    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");
    94108                (CPU->fpu_owner)->fpu_context_engaged=0; /* Enables migration */
     109//              printf("owner 3\n");       
     110
    95111        }
    96        
     112//      printf("0\n");
    97113        if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context));
    98114        else {fpu_init();THREAD->fpu_context_exists=1;}
    99 
     115//      printf("1\n");
    100116        CPU->fpu_owner=THREAD;
    101 
    102         reset_TS_flag();
     117//      printf("2\n");
    103118       
     119//      printf("3\n"); 
    104120//      panic("#NM fault\n");
    105121}
Note: See TracChangeset for help on using the changeset viewer.