Re: DRAM and PCI devices at same physical address

From: Matt Sexton
Date: Mon Jun 28 2004 - 10:55:15 EST


On Sat, 2004-06-26 at 23:26, Matt Porter wrote:
> On Fri, Jun 25, 2004 at 05:23:00PM -0400, Matt Sexton wrote:
> > I have a dual Xeon system with the Lindenhurst (E7710) chip set and 1 GB
> > of memory. In order to reserve a very large block of memory for a
> > (user-space) device driver I am writing, I pass "mem=XX" to the kernel
> > at boot time. Unfortunately, /proc/pci shows two devices now appearing
> > in the reserved upper memory range.
>
> <snip>
>
> > The devices always appear right after the limit I specify on the kernel
> > boot line. If I specify "mem=512M", then the first device appears at
> > 0x20000000. If I specify nothing, then it appears at 0x40000000. All
> > other PCI devices show up at addresses of 0xDD000000 and above.
> >
> > Is there any way to prevent these devices from showing up in the
> > physical address range of my reserved memory?
>
> You could try using reserve_bootmem() to reserve your driver memory.
>

But then I'd have to modify the kernel. I'd rather just use a loadable
module or user-space driver.

> > Should they be appearing there at all? Does Linux make any guarantees
> > when there is more physical memory than specified by "mem=" ?
>

The problem appears to be that the BIOS did not assign PCI addresses to
the two devices. Linux (2.6.3-4mdkenterprise) then did so, but it
starts assigning at either 256MB, or the first 1MB aligned page after
the end of DRAM, whichever is higher. On my 1GB system with "mem=768M",
this the region of my "reserved" DRAM.

So, using "mem=" to reserve DRAM and having Linux assign PCI addresses
are not compatible.

Matt

> Depends on the arch, I don't know what ia32 does.
>
> -Matt

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/