Skip to contentSkip to conversation

2.4: PCIBIOS_MIN_MEM correct?

DISCUSSION Joseph P. Garcia 2 participants 2 messages Feb 4, 2001

lore
Share & tools
lore
#0 lore raw

should PCIBIOS_MIN_MEM be 0x10000000? I caught this when i noticed it is used as the minimum address in the pci assign resource function, used in such situations as the OF/ATY-overlap re-allocate in wallstreets. My system would panic with the lcd melting effect as some may recall.

I brute forced in the following lines in
drivers/pci/setup-res.c:pci_assign_resource()

     min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;

+ if(res->start==0)
+ min = 0x83000000;

resulting in the same mapping used by Michael Schmitz earlier 2.2 patch. (its the only re-alloc on my system, so it works :) My kernel isn't panicing.. yet.

Anyway, looking in /proc/iomem, one might get the idea that PCIBIOS_MIN_MEM should be defined as 0x80000000. This might resolve the problem I had in a less brute way. I haven't tried it myself yet. waiting for a second opinion.

The macro appears to be new in 2.4, so its understandable why it looks like most archs seem to have similar values.

Any one have any insight on this?

--
Joseph P. Garcia
http://www.execpc.com/~jpgarcia

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 1 line · Joseph P. Garcia

should PCIBIOS_MIN_MEM be 0x10000000? I caught this when i noticed it is

That value is suited for `PC' systems.

Quoted 10 lines

used as the minimum address in the pci assign resource function, used in such situations as the OF/ATY-overlap re-allocate in wallstreets. My system would panic with the lcd melting effect as some may recall.

I brute forced in the following lines in
drivers/pci/setup-res.c:pci_assign_resource()

     min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
(quoted diff) +2 -0
+    if(res->start==0)
+         min = 0x83000000;
Quoted 7 lines

resulting in the same mapping used by Michael Schmitz earlier 2.2 patch. (its the only re-alloc on my system, so it works :) My kernel isn't panicing.. yet.

Anyway, looking in /proc/iomem, one might get the idea that PCIBIOS_MIN_MEM should be defined as 0x80000000. This might resolve the problem I had in a less brute way. I haven't tried it myself yet. waiting for a second opinion.

The correct fix is to add bus resources that indicate the allowed region. pci_assign_resource() will assign a region from the allowed region.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/