]> git.lizzy.rs Git - plan9front.git/blob - sys/src/boot/alphapc/dat.h
fltfmt: %.0g should print with one significant figure
[plan9front.git] / sys / src / boot / alphapc / dat.h
1 typedef struct Hwrpb    Hwrpb;
2 typedef struct Hwcpu    Hwcpu;
3 typedef struct Hwcrb    Hwcrb;
4 typedef struct Hwdsr    Hwdsr;
5 typedef struct Procdesc Procdesc;
6 typedef struct Memdsc   Memdsc;
7 typedef struct Memclust Memclust;
8 typedef struct PCB              PCB;
9
10 struct Hwrpb
11 {
12         uvlong  phys;
13         uvlong  sign;
14         uvlong  rev;
15         uvlong  size;
16         uvlong  cpu0;
17         uvlong  by2pg;
18         uvlong  pabits;
19         uvlong  maxasn;
20         char            ssn[16];
21         uvlong  systype;
22         uvlong  sysvar;
23         uvlong  sysrev;
24         uvlong  ifreq;
25         uvlong  cfreq;
26         uvlong  vptb;
27         uvlong  resv;
28         uvlong  tbhint;
29         uvlong  ncpu;
30         uvlong  cpulen;
31         uvlong  cpuoff;
32         uvlong  nctb;
33         uvlong  ctblen;
34         uvlong  ctboff;
35         uvlong  crboff;
36         uvlong  memoff;
37         uvlong  confoff;
38         uvlong  fruoff;
39         uvlong  termsaveva;
40         uvlong  termsavex;
41         uvlong  termrestva;
42         uvlong  termrestx;
43         uvlong  termresetva;
44         uvlong  termresetx;
45         uvlong  sysresv;
46         uvlong  hardresv;
47         uvlong  csum;
48         uvlong  rxrdymsk;
49         uvlong  txrdymsk;
50         uvlong  dsroff;         /* rev 6 or higher */
51 };
52
53 extern Hwrpb* hwrpb;
54
55 struct Hwcpu
56 {
57         uvlong  hwpcb[16];
58         uvlong  state;
59         uvlong  palmainlen;
60         uvlong  palscratchlen;
61         uvlong  palmainpa;
62         uvlong  palscratchpa;
63         uvlong  palrev;
64         uvlong  cputype;
65         uvlong  cpuvar;
66         uvlong  cpurev;
67         uvlong  serial[2];
68         /* more crap ... */
69 };
70
71 struct Hwdsr
72 {
73         vlong   smm;
74         uvlong  lurtoff;
75         uvlong  sysnameoff;
76 };
77
78 struct Hwcrb
79 {
80         uvlong  dispatchva;
81         uvlong  dispatchpa;
82         uvlong  fixupva;
83         uvlong  fixuppa;
84         /* more, uninteresting crud */
85 };
86
87 struct Procdesc
88 {
89         uvlong  bollocks;
90         uvlong  addr;
91 };
92
93 struct Memclust
94 {
95         uvlong  pfn;
96         uvlong  npages;
97         uvlong  ntest;
98         uvlong  vabitm;
99         uvlong  pabitm;
100         uvlong  csumbitm;
101         uvlong  usage;
102 };
103
104 struct Memdsc
105 {
106         uvlong  csum;
107         uvlong  opt;
108         uvlong  nclust;
109         Memclust        clust[1];
110 };
111
112 enum
113 {
114         PRINTSIZE =     256,
115         MB =            (1024*1024),
116 };
117
118 #define L_MAGIC         ((((4*23)+0)*23)+7)
119
120 typedef struct Exec Exec;
121 struct  Exec
122 {
123         uchar   magic[4];               /* magic number */
124         uchar   text[4];                /* size of text segment */
125         uchar   data[4];                /* size of initialized data */
126         uchar   bss[4];                 /* size of uninitialized data */
127         uchar   syms[4];                /* size of symbol table */
128         uchar   entry[4];               /* entry point */
129         uchar   spsz[4];                /* size of sp/pc offset table */
130         uchar   pcsz[4];                /* size of pc/line number table */
131 };
132
133 enum {
134         Eaddrlen        = 6,
135         ETHERMINTU      = 60,           /* minimum transmit size */
136         ETHERMAXTU      = 1514,         /* maximum transmit size */
137         ETHERHDRSIZE    = 14,           /* size of an ethernet header */
138
139         MaxEther        = 2,
140 };
141
142 typedef struct {
143         uchar   d[Eaddrlen];
144         uchar   s[Eaddrlen];
145         uchar   type[2];
146         uchar   data[1500];
147         uchar   crc[4];
148 } Etherpkt;
149
150 /*
151  *      Process Control Block, used by OSF/1 PALcode when we switch to it
152  */
153 struct PCB {
154         uvlong  ksp;
155         uvlong  usp;
156         uvlong  ptbr;
157         ulong   asn;
158         ulong   pcc;
159         uvlong  unique;
160         ulong   fen;
161         ulong   dummy;
162         uvlong  rsrv1;
163         uvlong  rsrv2;
164 };
165
166
167 #include        "conf.h"
168
169 extern Bootconf conf;