couldn't map memory
Richard Lynch
ceo at l-i-e.com
Fri Sep 17 16:03:21 PDT 2004
Richard Lynch wrote:
> I have installed FreeBSD 5.2.1 on a Dell Insprion 700 m, dual boot with
> the existing XP Home Edition (blech).
>
> Have begun posting my experience at
> http://phpbootcamp.com/articles/inspiron700m.htm
>
> The built-in LAN NIC is a Broadcom 440x.
>
> It works well enough under Windows to send this message. :-^
An update, and re-title, since I've moved quite a bit forward.
I'm also cc-ing -mobile, to which I'm not even subscribed at this time,
cuz I can only keep up with so many lists... Hope that's not too rude.
I disabled bfe in my GENERIC kernel and re-built that, so I could hack the
BFE source and try it as a module without a 20-minute re-build and
re-boot.
So I do "make; make install:" in /usr/src/sys/modules/bfe and then
"kldload /boot/kernel/if_bfe.ko" which seems to "work" -- at least well
enough to print out my debugging statements, or when I'm particularly
stupid, page fault and crash the machine.
I added the device_id as a constant in the BFE header:
--- /usr/src/sys/dev/bfe/if_bfereg.h ---
#define BCOM_DEVICEID_BCM4401_B0 0x170c
I added the device id to the array of known BFE devices:
--- /usr/src/sys/dev/bfe/if_bfe.c ---
static struct bfe_type bfe_devs[] = {
{ BCOM_VENDORID, BCOM_DEVICEID_BCM4401,
"Broadcom BCM4401 Fast Ethernet" },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM4401_B0,
"Broadcom BCM4401-B0 Fast Ethernet" },
{ 0, 0, NULL }
};
I added an id to the MII headers, even thought it's the same:
--- /usr/src/sys/dev/mii/miidevs ---
model BROADCOM BCM4401 0x0036 BCM4401 10/100baseTX PHY
/* Michael Chan of Broadcom was kind enough to email me that 0x36 is right */
model BROADCOM BCM4401_B0 0x0036 BCM4401-B0 10/100baseTX PHY
The bfe_attach function which is getting registered with the Device as a
callback is being called, and eventually reaches the line where it
attempts to do:
sc->bfe_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1,
RF_ACTIVE);
It is at this point that it is then printing out "Could not map memory"
Now, I had already tried setting hints for maddr and msize to the values
being used by Windows, in the hope that they would also be good numbers
for FreeBSD.
However, one thing I'm not sure of -- Do those "hints" affect a Module, or
would they only apply to something built in to the kernel?
Perhaps now that I've gotten the device "recognized" I should move back to
using the kernel re-build with bfe enabled again.
What other ways, short of hacking the source, can be used to provide good
numbers for memory to bus_alloc_resource?
And what magical incantations would allow me to find good numbers, as with
2 GIG of RAM, I suspect it could be a lonnnnnnng time before I stumbled on
good numbers by just guessing.
The is the output of "kldload /boot/kernel/if_bfe.ko" with the above
alterations applied.
Not quite sure why cbb0 and fwohci0 are getting in the picture... Perhaps
the mere attempt to query their PCI vendor_id and device_id causes them to
attempt to re-initialize?...
Sep 17 00:31:09 kernel: cbb0: <PCI-CardBus Bridge> at device 4.0 on pci2
Sep 17 00:31:09 kernel: cbb0: pccbb.c Could not grab register memory
Sep 17 00:31:09 kernel: device_probe_and_attach: cbb0 attach returned 12
Sep 17 00:31:09 kernel: cbb0: <PCI-CardBus Bridge> at device 4.1 on pci2
Sep 17 00:31:09 kernel: cbb0: pccbb.c Could not grab register memory
Sep 17 00:31:09 kernel: device_probe_and_attach: cbb0 attach returned 12
Sep 17 00:31:09 kernel: fwohci0: vendor=104c, dev=802e
Sep 17 00:31:09 kernel: fwohci0: <1394 Open Host Controller Interface>
mem 0xe0200000-0xe0203fff,0xe0209000-0xe02097ff irq 10 at device 4.2 on
pci2
Sep 17 00:31:09 kernel: fwohci0: Could not map memory
Sep 17 00:31:09 kernel: device_probe_and_attach: fwohci0 attach returned 6
Sep 17 00:31:09 kernel: sc->bfe_miibus is NULL.
Sep 17 00:31:09 kernel: bfe0: <Broadcom BCM4401-B0 Fast Ethernet> mem
0xe0206000-0xe0207fff irq 10 at device 5.0 on pci2
Sep 17 00:31:09 kernel: bfe0: couldn't map memory
Sep 17 00:31:09 kernel: device_probe_and_attach: bfe0 attach returned 6
--
Like Music?
http://l-i-e.com/artists.htm
More information about the freebsd-mobile
mailing list