MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nexus_probe

Function nexus_probe

freebsd/mips/mips/nexus.c:176–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174static devclass_t nexus_devclass;
175
176static int
177nexus_probe(device_t dev)
178{
179
180 device_set_desc(dev, "MIPS32 root nexus");
181
182 irq_rman.rm_start = 0;
183 irq_rman.rm_end = NUM_MIPS_IRQS - 1;
184 irq_rman.rm_type = RMAN_ARRAY;
185 irq_rman.rm_descr = "Hardware IRQs";
186 if (rman_init(&irq_rman) != 0 ||
187 rman_manage_region(&irq_rman, 0, NUM_MIPS_IRQS - 1) != 0) {
188 panic("%s: irq_rman", __func__);
189 }
190
191 mem_rman.rm_start = 0;
192 mem_rman.rm_end = BUS_SPACE_MAXADDR;
193 mem_rman.rm_type = RMAN_ARRAY;
194 mem_rman.rm_descr = "Memory addresses";
195 if (rman_init(&mem_rman) != 0 ||
196 rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR) != 0) {
197 panic("%s: mem_rman", __func__);
198 }
199
200 return (0);
201}
202
203static int
204nexus_attach(device_t dev)

Callers

nothing calls this directly

Calls 4

device_set_descFunction · 0.85
rman_initFunction · 0.85
rman_manage_regionFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected