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

Function smapi_identify

freebsd/i386/bios/smapi.c:150–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static void
151smapi_identify (driver_t *driver, device_t parent)
152{
153 device_t child;
154 u_int32_t addr;
155 int length;
156 int rid;
157
158 if (!device_is_alive(parent))
159 return;
160
161 addr = bios_sigsearch(SMAPI_START, SMAPI_SIG, SMAPI_LEN,
162 SMAPI_STEP, SMAPI_OFF);
163 if (addr != 0) {
164 rid = 0;
165 length = ADDR2HDR(addr)->length;
166
167 child = BUS_ADD_CHILD(parent, 5, "smapi", -1);
168 device_set_driver(child, driver);
169 bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length);
170 device_set_desc(child, "SMAPI BIOS");
171 }
172
173 return;
174}
175
176static int
177smapi_probe (device_t dev)

Callers

nothing calls this directly

Calls 5

device_is_aliveFunction · 0.85
device_set_driverFunction · 0.85
bus_set_resourceFunction · 0.85
device_set_descFunction · 0.85
bios_sigsearchFunction · 0.50

Tested by

no test coverage detected