Date: Tue, 7 Oct 2003 14:05:38 +0300 From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> To: freebsd-questions@freebsd.org Subject: sys/i386/i386/exception.s RELENG_4 help to understand several lines Message-ID: <20031007110538.GB428@pm514-9.comsys.ntu-kpi.kiev.ua>
next in thread | raw e-mail | index | archive | help
Hi, Help me to understand several lines from RELENG_4 src/sys/i386/i386/exception.s,v 1.65.2.3 file: 214 calltrap: 215 FAKE_MCOUNT(_btrap) /* init "from" _btrap -> calltrap */ 216 MPLOCKED incl _cnt+V_TRAP 217 MP_LOCK 218 movl _cpl,%ebx /* keep orig. cpl here during trap() */ 219 call _trap 220 /* 221 * Return via _doreti to handle ASTs. Have to change trap frame 222 * to interrupt frame. 223 */ 224 pushl %ebx /* cpl to restore */ 225 subl $4,%esp /* dummy unit to finish intr frame */ 226 incb _intr_nesting_level 227 MEXITCOUNT 228 jmp _doreti Is everything correct with 218, 219 and 224 lines (or comments are wrong)? I checked several places in exception.s and vm86bios.s in sys/i386/i386/ and in all places _cpl is saved in the stack, trap() need frame{} in the stack, so here we can't put _cpl into stack, but it is unclear for me how above listed lines works. How can %ebx contain saved _cpl after trap()? TIA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031007110538.GB428>