I am writing a device driver for a network interface card that has 1 MB of
on-board memory which needs to be mapped into the kernel's address space.
Since 1 MB is larger than I/O memory hole (0x0a0000 --> 0x100000) it's not clear
where the memory should be mapped. I tried mapping it somewhere above the
kernel's RAM, but kvtop() crashes (null pointer) when indirectly called to
convert the address passed to the driver's probe routine to a physical address.
Platform: FreeBSD 1.1; i486 50 MHz w/ 16MB RAM
IO Space: IO MEM: 0x0a0000 -> 0x100000
RAM: 0x0000000 -> 0x1000000
NIC: EISA Card w/ 1 MB RAM
(Defualt setting address is 16 MB, manufacture says the settting
must be on a 1 MB boundary).
MISC: 16k Ethernet card mapped at 0xd8000
Attempted Config:
device va0 at isa? port 0x1000 net irq 9 iomem 0x1000000 vector vaintr
config_isadev():
isdp->id_maddr = 0x1000000;
isdp->id_maddr = 0xa0000;
isdp->id_maddr += atdevbase;
(*isdp->id_drive->probe)(isdp);
...
va_probe():
...
phys = vtophys(isa->id_maddr); /* crashes in kvtop() */
Thanks.
/tdm