| 148 | } |
| 149 | |
| 150 | static void |
| 151 | smapi_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 | |
| 176 | static int |
| 177 | smapi_probe (device_t dev) |
nothing calls this directly
no test coverage detected