Excluding first megabyte of memory
proski at gnu.org
Fri Jun 20 19:08:39 BST 2003
On Fri, 20 Jun 2003, Dominik Brodowski wrote:
> This is where (at least on my system the Video ROM and System ROM resides
> -- and that's properly allocated in /proc/iomem, so rsrc_mgr.c excludes
> it... Might it be that your plx9052 module doesn't check it the same way?
I understand that the socket drivers are not checking availability of the
resources yet. What I think is different is that plx9052 uses PCI
registers to set memory and I/O windows, which is rather gross.
I've just released version 0.1.3 (with Linux 2.5.72 support) that
disallows mapping memory in the first megabyte:
> > 000c0000-000c7fff : Video ROM
> > 000cc000-000d97ff : Extension ROM
> > 000f0000-000fffff : System ROM
There is nothing at 0xe0000. Besides, all those areas except Video ROM
are not probed. I've attached the output on the serial console if I
disable the check for the first megabyte and add a printk to show the
memory areas being probed.
First of all, why is the location of "Video ROM" reused for memory
The area size is 16 bytes. That's because I set map_size to 0x10 - the
minimal memory window supported by the plx9052 chip. The map_size field
in undocumented in the kernel, but the documentation from pcmcia-cs
defines it as "the address granularity of memory windows".
I tried to set map_size to 0x1000, and the result is attached too. Not
much different except that the hang happens at 0xe4000-0xe4fff.
There is a large number of calls setting the memory map to the same value.
For example, 0xc0000-0xc000f is allocated exactly 200 times,
0xc4000-0xc400f - 102 times, 0xc8000-0xc800f - 200 times. My guess is
that some of those calls are unnecessary.
> See for yourself, these resources aren't available on your system, either...
I guess pcmcia_core should "see for itself". My point is that there may
be memory areas that are used, but even the kernel doesn't know about
them. I believe that such areas are more likely are more likely to be in
the first megabyte. Hence my questions:
1) How safe would it be to start probing with higher addresses in terms of
other dangerous areas? If we change config.opts in pcmcia-cs, most users
will be just fine.
2) Can it happen that some PCMCIA devices would not work properly if the
memory is mapped above the first megabyte? In other words, is there any
reason to try low addresses first?
3) Is there anything I can do in the driver to avoid stepping on the
Pavel Roskin-------------- next part --------------
z'µìmjÛZrÜ²Ç+¹¶ÞtÖ¦zf©¦)à4ò¥æ©¦XjØ¨ü`Î*R7¶ãFòµëzÇ®Xm¶ÿ+-²)ß§^iÚ+úb¥êæj))îÆ&r&¿jÛZrÛ?ÛM7Ó´ÿ~üãM¼Ûù¦§¸§-------------- next part --------------
More information about the linux-pcmcia