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/ppc/init9.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 /* this is the same as a c program:
    2  * main(char *argv0){
    3  *      startboot(argv0, &argv0);
    4  * }
    5  *
    6  * it is in asm because we need to set the SB before
    7  * doing it and the only way to do this in c drags in
    8  * too many other routines.
    9  */
   10 
   11 TEXT    _main(SB),$8
   12 
   13         MOVW    $setSB(SB), R2
   14 
   15         /* make a frame */
   16         SUB     $16,R1
   17 
   18         /* argv0 is already passed to us in R3 so it is already the first arg */
   19 
   20         /* copy argv0 into the stack and push its address as the second arg */
   21         MOVW    R3,0x14(R1)
   22         ADD     $0x14,R1,R6
   23         MOVW    R6,0x8(R1)
   24 
   25         BL      startboot(SB)
   26 
   27         /* should never get here */
   28 loop:
   29         BR      loop

Cache object: ceb2324065514d2cd2c2db27ca1e15a6


[ 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.