diff options
| author | Frans Kaashoek <kaashoek@mit.edu> | 2018-09-29 09:05:25 -0400 | 
|---|---|---|
| committer | Frans Kaashoek <kaashoek@mit.edu> | 2018-09-29 09:05:25 -0400 | 
| commit | 572e106e6f4916deae4d2809623f20771fff1d39 (patch) | |
| tree | 2f81a44f6cf0e30105e25c4526c66d3bdb42387c | |
| parent | 3bfcaeaf015ffe0d92937c023e9a0086909a0161 (diff) | |
| download | xv6-labs-572e106e6f4916deae4d2809623f20771fff1d39.tar.gz xv6-labs-572e106e6f4916deae4d2809623f20771fff1d39.tar.bz2 xv6-labs-572e106e6f4916deae4d2809623f20771fff1d39.zip | |
x
| -rw-r--r-- | trapasm.S | 7 | 
1 files changed, 5 insertions, 2 deletions
| @@ -1,6 +1,9 @@  #include "param.h"  #include "x86.h"	  #include "mmu.h" + +# the offset of cs in trapframe (i.e., tf->cs - tf) +#define CSOFF  144  # vectors.S sends all traps here.  .globl alltraps @@ -22,7 +25,7 @@ alltraps:    push %rbx    push %rax -  cmpw $KCSEG, 144(%rsp)   # compare to saved cs +  cmpw $KCSEG, CSOFF(%rsp)   # compare to saved cs    jz 1f     swapgs @@ -33,7 +36,7 @@ alltraps:  .globl trapret  trapret:    cli -  cmpw $KCSEG, 144(%rsp)  # compare to saved cs +  cmpw $KCSEG, CSOFF(%rsp)  # compare to saved cs    jz 1f    swapgs | 
