| 1 | #include "ioconf.h" |
| 2 | /* |
| 3 | * MACHINE GENERATED: DO NOT EDIT |
| 4 | * |
| 5 | * ioconf.c, from "XEN3_DOMU" |
| 6 | */ |
| 7 | |
| 8 | #include <sys/param.h> |
| 9 | #include <sys/conf.h> |
| 10 | #include <sys/device.h> |
| 11 | #include <sys/mount.h> |
| 12 | |
| 13 | static const struct cfiattrdata acpibuscf_iattrdata = { |
| 14 | "acpibus" , 0, { |
| 15 | { NULL, NULL, 0 }, |
| 16 | } |
| 17 | }; |
| 18 | static const struct cfiattrdata ioapicbuscf_iattrdata = { |
| 19 | "ioapicbus" , 1, { |
| 20 | { "apid" , "-1" , -1 }, |
| 21 | } |
| 22 | }; |
| 23 | static const struct cfiattrdata pcibuscf_iattrdata = { |
| 24 | "pcibus" , 1, { |
| 25 | { "bus" , "-1" , -1 }, |
| 26 | } |
| 27 | }; |
| 28 | static const struct cfiattrdata xendevbuscf_iattrdata = { |
| 29 | "xendevbus" , 0, { |
| 30 | { NULL, NULL, 0 }, |
| 31 | } |
| 32 | }; |
| 33 | static const struct cfiattrdata cpubuscf_iattrdata = { |
| 34 | "cpubus" , 1, { |
| 35 | { "apid" , "-1" , -1 }, |
| 36 | } |
| 37 | }; |
| 38 | static const struct cfiattrdata isabuscf_iattrdata = { |
| 39 | "isabus" , 0, { |
| 40 | { NULL, NULL, 0 }, |
| 41 | } |
| 42 | }; |
| 43 | static const struct cfiattrdata xenbuscf_iattrdata = { |
| 44 | "xenbus" , 1, { |
| 45 | { "id" , "-1" , -1 }, |
| 46 | } |
| 47 | }; |
| 48 | static const struct cfiattrdata hypervisorbuscf_iattrdata = { |
| 49 | "hypervisorbus" , 0, { |
| 50 | { NULL, NULL, 0 }, |
| 51 | } |
| 52 | }; |
| 53 | static const struct cfiattrdata hypervisorcf_iattrdata = { |
| 54 | "hypervisor" , 1, { |
| 55 | { "apid" , "-1" , -1 }, |
| 56 | } |
| 57 | }; |
| 58 | static const struct cfiattrdata ipmibuscf_iattrdata = { |
| 59 | "ipmibus" , 0, { |
| 60 | { NULL, NULL, 0 }, |
| 61 | } |
| 62 | }; |
| 63 | |
| 64 | CFDRIVER_DECL(raid, DV_DISK, NULL); |
| 65 | |
| 66 | CFDRIVER_DECL(vnd, DV_DISK, NULL); |
| 67 | |
| 68 | CFDRIVER_DECL(cgd, DV_DISK, NULL); |
| 69 | |
| 70 | CFDRIVER_DECL(md, DV_DISK, NULL); |
| 71 | |
| 72 | CFDRIVER_DECL(fss, DV_DISK, NULL); |
| 73 | |
| 74 | CFDRIVER_DECL(tap, DV_IFNET, NULL); |
| 75 | |
| 76 | CFDRIVER_DECL(dm, DV_DULL, NULL); |
| 77 | |
| 78 | static const struct cfiattrdata * const mainbus_attrs[] = { &ipmibuscf_iattrdata, &hypervisorbuscf_iattrdata, &ioapicbuscf_iattrdata, &cpubuscf_iattrdata, NULL }; |
| 79 | CFDRIVER_DECL(mainbus, DV_DULL, mainbus_attrs); |
| 80 | |
| 81 | static const struct cfiattrdata * const hypervisor_attrs[] = { &hypervisorcf_iattrdata, &acpibuscf_iattrdata, &xendevbuscf_iattrdata, &pcibuscf_iattrdata, &isabuscf_iattrdata, NULL }; |
| 82 | CFDRIVER_DECL(hypervisor, DV_DULL, hypervisor_attrs); |
| 83 | |
| 84 | static const struct cfiattrdata * const xenbus_attrs[] = { &xenbuscf_iattrdata, NULL }; |
| 85 | CFDRIVER_DECL(xenbus, DV_DULL, xenbus_attrs); |
| 86 | |
| 87 | CFDRIVER_DECL(xencons, DV_TTY, NULL); |
| 88 | |
| 89 | CFDRIVER_DECL(xennet, DV_IFNET, NULL); |
| 90 | |
| 91 | CFDRIVER_DECL(xbd, DV_DISK, NULL); |
| 92 | |
| 93 | CFDRIVER_DECL(balloon, DV_DULL, NULL); |
| 94 | |
| 95 | CFDRIVER_DECL(vcpu, DV_DULL, NULL); |
| 96 | |
| 97 | |
| 98 | struct cfdriver * const cfdriver_list_initial[] = { |
| 99 | &raid_cd, |
| 100 | &vnd_cd, |
| 101 | &cgd_cd, |
| 102 | &md_cd, |
| 103 | &fss_cd, |
| 104 | &tap_cd, |
| 105 | &dm_cd, |
| 106 | &mainbus_cd, |
| 107 | &hypervisor_cd, |
| 108 | &xenbus_cd, |
| 109 | &xencons_cd, |
| 110 | &xennet_cd, |
| 111 | &xbd_cd, |
| 112 | &balloon_cd, |
| 113 | &vcpu_cd, |
| 114 | NULL |
| 115 | }; |
| 116 | |
| 117 | extern struct cfattach mainbus_ca; |
| 118 | extern struct cfattach hypervisor_ca; |
| 119 | extern struct cfattach xenbus_ca; |
| 120 | extern struct cfattach xencons_ca; |
| 121 | extern struct cfattach xennet_ca; |
| 122 | extern struct cfattach xbd_ca; |
| 123 | extern struct cfattach balloon_ca; |
| 124 | extern struct cfattach vcpu_ca; |
| 125 | |
| 126 | /* locators */ |
| 127 | static int loc[3] = { |
| 128 | -1, -1, -1, |
| 129 | }; |
| 130 | |
| 131 | static const struct cfparent pspec0 = { |
| 132 | "hypervisorbus" , "mainbus" , DVUNIT_ANY |
| 133 | }; |
| 134 | static const struct cfparent pspec1 = { |
| 135 | "xendevbus" , "hypervisor" , DVUNIT_ANY |
| 136 | }; |
| 137 | static const struct cfparent pspec2 = { |
| 138 | "xenbus" , "xenbus" , DVUNIT_ANY |
| 139 | }; |
| 140 | |
| 141 | #define NORM FSTATE_NOTFOUND |
| 142 | #define STAR FSTATE_STAR |
| 143 | |
| 144 | struct cfdata cfdata[] = { |
| 145 | /* driver attachment unit state loc flags pspec */ |
| 146 | /* 0: mainbus0 at root */ |
| 147 | { "mainbus" , "mainbus" , 0, NORM, NULL, 0, NULL }, |
| 148 | /* 1: hypervisor* at mainbus? */ |
| 149 | { "hypervisor" , "hypervisor" , 0, STAR, NULL, 0, &pspec0 }, |
| 150 | /* 2: xenbus* at hypervisor? */ |
| 151 | { "xenbus" , "xenbus" , 0, STAR, NULL, 0, &pspec1 }, |
| 152 | /* 3: xencons* at hypervisor? */ |
| 153 | { "xencons" , "xencons" , 0, STAR, NULL, 0, &pspec1 }, |
| 154 | /* 4: xennet* at xenbus? id -1 */ |
| 155 | { "xennet" , "xennet" , 0, STAR, loc+ 0, 0, &pspec2 }, |
| 156 | /* 5: xbd* at xenbus? id -1 */ |
| 157 | { "xbd" , "xbd" , 0, STAR, loc+ 1, 0, &pspec2 }, |
| 158 | /* 6: balloon* at xenbus? id -1 */ |
| 159 | { "balloon" , "balloon" , 0, STAR, loc+ 2, 0, &pspec2 }, |
| 160 | /* 7: vcpu* at hypervisor? */ |
| 161 | { "vcpu" , "vcpu" , 0, STAR, NULL, 0, &pspec1 }, |
| 162 | { NULL, NULL, 0, 0, NULL, 0, NULL } |
| 163 | }; |
| 164 | |
| 165 | static struct cfattach * const mainbus_cfattachinit[] = { |
| 166 | &mainbus_ca, NULL |
| 167 | }; |
| 168 | static struct cfattach * const hypervisor_cfattachinit[] = { |
| 169 | &hypervisor_ca, NULL |
| 170 | }; |
| 171 | static struct cfattach * const xenbus_cfattachinit[] = { |
| 172 | &xenbus_ca, NULL |
| 173 | }; |
| 174 | static struct cfattach * const xencons_cfattachinit[] = { |
| 175 | &xencons_ca, NULL |
| 176 | }; |
| 177 | static struct cfattach * const xennet_cfattachinit[] = { |
| 178 | &xennet_ca, NULL |
| 179 | }; |
| 180 | static struct cfattach * const xbd_cfattachinit[] = { |
| 181 | &xbd_ca, NULL |
| 182 | }; |
| 183 | static struct cfattach * const balloon_cfattachinit[] = { |
| 184 | &balloon_ca, NULL |
| 185 | }; |
| 186 | static struct cfattach * const vcpu_cfattachinit[] = { |
| 187 | &vcpu_ca, NULL |
| 188 | }; |
| 189 | |
| 190 | const struct cfattachinit cfattachinit[] = { |
| 191 | { "mainbus" , mainbus_cfattachinit }, |
| 192 | { "hypervisor" , hypervisor_cfattachinit }, |
| 193 | { "xenbus" , xenbus_cfattachinit }, |
| 194 | { "xencons" , xencons_cfattachinit }, |
| 195 | { "xennet" , xennet_cfattachinit }, |
| 196 | { "xbd" , xbd_cfattachinit }, |
| 197 | { "balloon" , balloon_cfattachinit }, |
| 198 | { "vcpu" , vcpu_cfattachinit }, |
| 199 | { NULL, NULL } |
| 200 | }; |
| 201 | |
| 202 | const short cfroots[] = { |
| 203 | 0 /* mainbus0 */, |
| 204 | -1 |
| 205 | }; |
| 206 | |
| 207 | /* pseudo-devices */ |
| 208 | |
| 209 | const struct pdevinit pdevinit[] = { |
| 210 | { cpuctlattach, 1 }, |
| 211 | { rndattach, 1 }, |
| 212 | { accf_dataattach, 1 }, |
| 213 | { accf_httpattach, 1 }, |
| 214 | { cryptoattach, 1 }, |
| 215 | { swcryptoattach, 1 }, |
| 216 | { ccdattach, 1 }, |
| 217 | { cgdattach, 1 }, |
| 218 | { raidattach, 1 }, |
| 219 | { fssattach, 1 }, |
| 220 | { putterattach, 1 }, |
| 221 | { mdattach, 1 }, |
| 222 | { vndattach, 1 }, |
| 223 | { dmattach, 1 }, |
| 224 | { bpfilterattach, 1 }, |
| 225 | { ipfilterattach, 1 }, |
| 226 | { loopattach, 1 }, |
| 227 | { pppattach, 1 }, |
| 228 | { pppoeattach, 1 }, |
| 229 | { slattach, 1 }, |
| 230 | { tapattach, 1 }, |
| 231 | { tunattach, 1 }, |
| 232 | { greattach, 1 }, |
| 233 | { gifattach, 1 }, |
| 234 | { stfattach, 1 }, |
| 235 | { vlanattach, 1 }, |
| 236 | { bridgeattach, 1 }, |
| 237 | { ptyattach, 1 }, |
| 238 | { clockctlattach, 1 }, |
| 239 | { ksymsattach, 1 }, |
| 240 | { vcodaattach, 1 }, |
| 241 | { nsmbattach, 1 }, |
| 242 | { drvctlattach, 1 }, |
| 243 | { 0, 0 } |
| 244 | }; |
| 245 | |