Netboot Mailing List (by thread)

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

Etherboot 4.4.1 and 3com 3c507 card




Hi,

I'm trying if I can get the bpbatch program to run with Etherboot,
i. e. use bpbatch after booting from floppy instead of using an
EPROM. Therefore, I created a bootfloppy that contains a loader for my
3c507 card. I can boot from the floppy, and the card is detecded as:


3c507 ioaddr 0x0300, IRQ 9, mem [0x000C8000-0x000C8000], external
xcvr, addr 00:60:8C:5C:16:5B


The DHCP and TFTP servers are not set up yet, so I have tcpdump
running on the server, but no packages are transmitted. Only the card
is detected, but nothing else happens. I know for sure that the card
works fine, i. e. Linux is installed on the client and can do DNS
requests, NFS imports and the like.

When I remove the floppy and boot the client from its disks, the card
is detected (by the Linux driver that comes with the 2.2.10 kernel)
as:


3c507 at 0x300, 00 60 8c 5c 16 5b, IRQ 9, external xcvr, memory
0xc8000-0xd7fff


That's pretty the same as above, but notice the different memory
range. The source of the driver in the kernel
(/usr/src/linux/drivers/net/3c507.c) looks different from the source
in the Etherboot driver (etherboot-4.4.1/src-32/i82586.c). Look at the 
functions


kernel:
  __initfunc(int el16_probe1(struct device *dev, int ioaddr))

	{
		int base;
		int size;
		char mem_config = inb(ioaddr + MEM_CONFIG);
		if (mem_config & 0x20) {
			size = 64*1024;
			base = 0xf00000 + (mem_config & 0x08 ? 0x080000
							   : ((mem_config & 3) << 17));
		} else {
			size = ((mem_config & 3) + 1) << 14;
			base = 0x0c0000 + ( (mem_config & 0x18) << 12);
		}
		dev->mem_start = base;
		dev->mem_end = base + size;
	}

Etherboot:
  static int t507_probe1(struct nic *nic, unsigned short ioaddr)

	mem_config = inb(ioaddr + MEM_CONFIG);
	if (mem_config & 0x20)
	{
		size = 65536L;
		mem_start = 0xf00000L + (mem_config & 0x08 ? 0x080000L
			: (((Address)mem_config & 0x3) << 17));
	}
	else
	{
		size = ((((Address)mem_config & 0x3) + 1) << 14) & 0xffffL;
		mem_start = 0x0c0000L + (((Address)mem_config & 0x18) << 12);
	}



The ,& 0xffffL' operation isn't performed in the kernel source. BTW,
shouldn't if_port be declared local in the Etherboot version of the
driver? If it's used elswhere, too: The kernel source assigns
different values to it, if this is important.


Aha! :) I've removed the ,& 0xffffL' operation, recompiled the drivers
and created a new boot disk. Now the card is detected with the same
memory range the Linux driver reports. It seems to work, i. e. the
client reports an initialisation timeout and pretends to be looking
for the server. Tcpdump on the server reports


22:59:12.326696 0.0.0.0.0 > 255.255.255.255.bootps: (request) xid:0x22e91500 [|bootp]


what looks like something I'd expect :)


But be warned: I'm not a driver programer, and by no means I'm sure
whether the above solution is ok or introduces something terrible.


GH
-- 
Nieder mit der Mineralölsteuer!! Senkt die Benzinpreise!!
===========================================================================
This Mail was sent to netboot mailing list by:
hwilmer@gmx.de
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



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