[BACK]Return to crt.c CVS log [TXT][DIR] Up to [local] / sys / arch / aviion / stand / netboot

Annotation of sys/arch/aviion/stand/netboot/crt.c, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: crt.c,v 1.2 2006/05/20 22:38:33 miod Exp $ */
                      2:
                      3: #include <sys/types.h>
                      4: #include <machine/prom.h>
                      5:
                      6: #include "stand.h"
                      7:
                      8: extern void netboot(const char *, int, int, int);
                      9:
                     10: /*
                     11:  * This is the boot code entry point.
                     12:  * Note that we do not bother to set r31, and use the default value supplied
                     13:  * by the PROM, which is the top of memory, minus the PROM data area (usually
                     14:  * 128KB).
                     15:  */
                     16: void
                     17: start(const char *args, int dev, int unit, int part)
                     18: {
                     19:        extern int edata, end;
                     20:
                     21:        /*
                     22:         * This code enables the SFU1 and is used for single stage
                     23:         * bootstraps or the first stage of a two stage bootstrap.
                     24:         * Do not use any low register to enable the SFU1. This wipes out
                     25:         * the args.  Not cool at all... r25 seems free.
                     26:         */
                     27:        asm("|  enable SFU1");
                     28:        asm("   ldcr    r25,cr1" ::: "r25");
                     29:        asm("   clr     r25,r25,1<3>"); /* bit 3 is SFU1D */
                     30:        asm("   stcr    r25,cr1");
                     31:
                     32:        memset(&edata, 0, ((int)&end - (int)&edata));
                     33:
                     34:        netboot(args, dev, unit, part);
                     35:        _rtt();
                     36:        /* NOTREACHED */
                     37: }
                     38:
                     39: void
                     40: __main()
                     41: {
                     42: }

CVSweb