1a56c8d60SFrans Kaashoek#include "mmu.h" 2e1872bb1Srsc 3e1872bb1Srsc # vectors.S sends all traps here. 4c1b100e9Srsc.globl alltraps 5e1872bb1Srscalltraps: 6e1872bb1Srsc # Build trap frame. 7e1872bb1Srsc pushl %ds 8e1872bb1Srsc pushl %es 9c7317d4dSkolya pushl %fs 10c7317d4dSkolya pushl %gs 11e1872bb1Srsc pushal 12e1872bb1Srsc 13*3e392c72SFrans Kaashoek # Set up data segments. 14e97519a6Srsc movw $(SEG_KDATA<<3), %ax 15e1872bb1Srsc movw %ax, %ds 16e1872bb1Srsc movw %ax, %es 17e1872bb1Srsc 18e1872bb1Srsc # Call trap(tf), where tf=%esp 19e1872bb1Srsc pushl %esp 20e1872bb1Srsc call trap 21e1872bb1Srsc addl $4, %esp 22e1872bb1Srsc 23e1872bb1Srsc # Return falls through to trapret... 2465bd8e13Srsc.globl trapret 2555e95b16Srtmtrapret: 2655e95b16Srtm popal 27c7317d4dSkolya popl %gs 28c7317d4dSkolya popl %fs 2955e95b16Srtm popl %es 3055e95b16Srtm popl %ds 31e1872bb1Srsc addl $0x8, %esp # trapno and errcode 3255e95b16Srtm iret 33