Help me to understand several lines from RELENG_4
src/sys/i386/i386/exception.s,v 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()?

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to