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

Function vpd_identify

freebsd/x86/bios/vpd.c:132–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 NULL);
131
132static void
133vpd_identify (driver_t *driver, device_t parent)
134{
135 device_t child;
136 u_int32_t addr;
137 int length;
138 int rid;
139
140 if (!device_is_alive(parent))
141 return;
142
143 addr = bios_sigsearch(VPD_START, VPD_SIG, VPD_LEN, VPD_STEP, VPD_OFF);
144 if (addr != 0) {
145 rid = 0;
146 length = ADDR2VPD(addr)->Length;
147
148 child = BUS_ADD_CHILD(parent, 5, "vpd", -1);
149 device_set_driver(child, driver);
150 bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length);
151 device_set_desc(child, "Vital Product Data Area");
152 }
153
154 return;
155}
156
157static int
158vpd_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