Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eepro100 works again.




Hi,

I've been bugged two or three times the last month about why 
Etherboot 4.0 doesn't work with the eepro100 anymore. 

I just got out of my lazy bed, and fixed it (*). But there are some
things that someone who wrote the code should comment on.....

First from config.c:

#ifdef	INCLUDE_PCI
	pci_addrs[0] = 0;
	eth_pci_init(pci_nic_list, pci_addrs);
	pci_addrs[1] = 0;
#endif
	printf("Probing...");
	for (t = NIC; t->nic_name != 0; ++t)
	{
		printf("[%s]", t->nic_name);
		if ((*t->eth_probe)(&nic, t->probe_addrs))
			return (1);
	}

puts the PCI IO address in the pci_addrs array. It then calls my probe
function with the t->probe_addrs array, which doesn't tell me where my
card is. I haven't the foggiest about how this works for the NE2000
compatible PCI cards: as far as I can read the code they are probed at
classical ISA (0x200, 0x300, 0x320 etc) adresses.

My current (very ugly) workaround is to export the pci_addrs array,
and to reference that instead of probe_addrs.... I want something
better.


Next, from pci.c:

		for (i = 0; pcidev[i].vendor != 0; i++) {
			if (vendor == pcidev[i].vendor
				&& device == pcidev[i].dev_id) {
				int i;
				for (i=3;i>=0;i--) {
					pcibios_read_config_dword(0, devfn,
						PCI_BASE_ADDRESS_0 + 4 *i, &pci_ioaddr);
					if (pci_ioaddr & 0x01) break;
			  	}
			  
				/* Strip the I/O address out of the
				 * returned value */
				pci_ioaddr &= PCI_BASE_ADDRESS_IO_MASK;
				printf("Found %s at 0x%x\r\n",
				pcidev[i].name, pci_ioaddr);
			}
		}

This is the NEW version. It looks for an -=IO=- address on the PCI
device.  The old code found a noncacheable memory region as the
address I can't really do anything with that.... My eepro100 boasts
three adresses, the second one being the IO address that we need.....

Anybody with eepro100's lurking on this list?

					Roger.


(*) It loads a kernel, initialized the kernel, does the NFS-root
mount, and then crashes. I probably didn't correctly install the NFS
root for my client machine :-) Goes to show that I personally don't
actually use it.... The machine boots perfectly from its harddisk...


-- 
If it's there and you can see it, it's REAL      |___R.E.Wolff@BitWizard.nl  |
If it's there and you can't see it, it's TRANSPARENT |  Tel: +31-15-2137555  |
If it's not there and you can see it, it's VIRTUAL   |__FAX:_+31-15-2138217  |
If it's not there and you can't see it, it's GONE! -- Roy Wilks, 1983  |_____|



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.