Data Structures | |
| struct | s_PXENV_START_UNDI |
| Parameter block for pxenv_start_undi(). More... | |
Defines | |
| #define | PXENV_START_UNDI 0x0000 |
| PXE API function code for pxenv_start_undi(). | |
Typedefs | |
| typedef struct s_PXENV_START_UNDI | PXENV_START_UNDI_t |
Functions | |
| PXENV_EXIT_t | pxenv_start_undi (struct s_PXENV_START_UNDI *start_undi) |
| #define PXENV_START_UNDI 0x0000 |
PXE API function code for pxenv_start_undi().
Definition at line 439 of file pxe_api.h.
Referenced by pxe_api_call(), pxeparent_function_name(), and undinet_probe().
| typedef struct s_PXENV_START_UNDI PXENV_START_UNDI_t |
| PXENV_EXIT_t pxenv_start_undi | ( | struct s_PXENV_START_UNDI * | start_undi | ) |
Definition at line 243 of file pxe_preboot.c.
References s_PXENV_START_UNDI::AX, BUS_TYPE_ISAPNP, BUS_TYPE_PCI, s_PXENV_START_UNDI::BX, DBG, s_PXENV_START_UNDI::DX, find_netdev_by_location(), ISAPNP_CSN_MAX, ISAPNP_CSN_MIN, isapnp_read_port, ISAPNP_READ_PORT_MAX, ISAPNP_READ_PORT_MIN, net_device::name, netdev, pxe_activate(), PXENV_EXIT_FAILURE, PXENV_EXIT_SUCCESS, PXENV_STATUS_SUCCESS, PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC, startup(), and s_PXENV_START_UNDI::Status.
Referenced by pxe_api_call().
00243 { 00244 unsigned int bus_type; 00245 unsigned int location; 00246 struct net_device *netdev; 00247 00248 DBG ( "PXENV_START_UNDI %04x:%04x:%04x", 00249 start_undi->AX, start_undi->BX, start_undi->DX ); 00250 00251 /* Determine bus type and location. Use a heuristic to decide 00252 * whether we are PCI or ISAPnP 00253 */ 00254 if ( ( start_undi->DX >= ISAPNP_READ_PORT_MIN ) && 00255 ( start_undi->DX <= ISAPNP_READ_PORT_MAX ) && 00256 ( start_undi->BX >= ISAPNP_CSN_MIN ) && 00257 ( start_undi->BX <= ISAPNP_CSN_MAX ) ) { 00258 bus_type = BUS_TYPE_ISAPNP; 00259 location = start_undi->BX; 00260 /* Record ISAPnP read port for use by isapnp.c */ 00261 isapnp_read_port = start_undi->DX; 00262 } else { 00263 bus_type = BUS_TYPE_PCI; 00264 location = start_undi->AX; 00265 } 00266 00267 /* Probe for devices, etc. */ 00268 startup(); 00269 00270 /* Look for a matching net device */ 00271 netdev = find_netdev_by_location ( bus_type, location ); 00272 if ( ! netdev ) { 00273 DBG ( " no net device found" ); 00274 start_undi->Status = PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC; 00275 return PXENV_EXIT_FAILURE; 00276 } 00277 DBG ( " using netdev %s", netdev->name ); 00278 00279 /* Activate PXE */ 00280 pxe_activate ( netdev ); 00281 00282 start_undi->Status = PXENV_STATUS_SUCCESS; 00283 return PXENV_EXIT_SUCCESS; 00284 }
1.5.7.1