enum { PRINTSIZE = 256, }; #define MS2NS(n) (((vlong)(n))*1000000LL) #define TK2MS(x) ((x)*(1000/HZ)) #define MB (1024*1024) /* * Where configuration info is left for the loaded programme. * This will turn into a structure as more is done by the boot loader * (e.g. why parse the .ini file twice?). * There are 3584 bytes available at CONFADDR on the PC. * * The low-level boot routines in l.s leave data for us at CONFADDR, * which we pick up before reading the plan9.ini file. */ #define BOOTLINELEN 64 #define BOOTARGS ((char*)(CONFADDR+BOOTLINELEN)) #define BOOTARGSLEN 1024 /* size reduction */ #define MAXCONF 32 /* from 100; size reduction */ /* * intc bits, as of 18 aug 2009. * specific to rae's virtex5 design */ enum { Bitllfifo, Bittemac, Bitdma, Bitdma2, Bituart, Bitmiiphy, Bitqtmmacfail, /* qtm only */ Bitqtmdraminit, /* qtm only */ Intllfifo=1<wp - (s)->rp) enum { Eaddrlen = 6, /* next two exclude 4-byte ether CRC */ ETHERMINTU = 60, /* minimum transmit size */ ETHERMAXTU = 1514, /* maximum transmit size */ ETHERHDRSIZE = 14, /* size of an ethernet header */ MaxEther = 1, /* from 6; size reduction */ }; typedef struct { uchar d[Eaddrlen]; uchar s[Eaddrlen]; uchar type[2]; uchar data[1500]; uchar crc[4]; } Etherpkt; enum { /* returned by bootpass */ MORE, ENOUGH, FAIL }; enum { INITKERNEL, READEXEC, READ9TEXT, READ9DATA, READGZIP, READEHDR, READPHDR, READEPAD, READEDATA, TRYBOOT, INIT9LOAD, READ9LOAD, FAILED }; struct Boot { int state; Exec exec; char *bp; /* base ptr */ char *wp; /* write ptr */ char *ep; /* end ptr */ }; extern uvlong clockintrs; extern int debug; extern char *defaultpartition; extern int iniread; extern uvlong myhz; extern int pxe; extern int securemem; extern int vga;