The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/pc/plan9l.s

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #include "mem.h"
    2 
    3 /*
    4  * This must match io.h.
    5  */
    6 #define VectorSYSCALL   0x40
    7 
    8 /*
    9  *  Used to get to the first process:
   10  *      set up an interrupt return frame and IRET to user level.
   11  */
   12 TEXT touser(SB), $0
   13         PUSHL   $(UDSEL)                        /* old ss */
   14         MOVL    sp+0(FP), AX                    /* old sp */
   15         PUSHL   AX
   16         MOVL    $0x200, AX                      /* interrupt enable flag */
   17         PUSHL   AX                              /* old flags */
   18         PUSHL   $(UESEL)                        /* old cs */
   19         PUSHL   $(UTZERO+32)                    /* old pc */
   20         MOVL    $(UDSEL), AX
   21         MOVW    AX, DS
   22         MOVW    AX, ES
   23         MOVW    AX, GS
   24         MOVW    AX, FS
   25         IRETL
   26 
   27 /*
   28  * This is merely _strayintr from l.s optimised to vector
   29  * to syscall() without going through trap().
   30  */
   31 TEXT _syscallintr(SB), $0
   32         PUSHL   $VectorSYSCALL                  /* trap type */
   33 
   34         PUSHL   DS
   35         PUSHL   ES
   36         PUSHL   FS
   37         PUSHL   GS
   38         PUSHAL
   39         MOVL    $(KDSEL), AX
   40         MOVW    AX, DS
   41         MOVW    AX, ES
   42         PUSHL   SP
   43         CALL    syscall(SB)
   44 
   45         POPL    AX
   46         POPAL
   47         POPL    GS
   48         POPL    FS
   49         POPL    ES
   50         POPL    DS
   51         ADDL    $8, SP                          /* pop error code and trap type */
   52         IRETL

Cache object: b9b11b0e2ee58b1f8131d47d66070fe7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.