* Non-contiguous physical memory
@ 2009-01-21 15:18 Aaron Pace
2009-01-21 17:28 ` Kumar Gala
0 siblings, 1 reply; 6+ messages in thread
From: Aaron Pace @ 2009-01-21 15:18 UTC (permalink / raw)
To: linuxppc-dev
Hello,
I'm working on a design using a Freescale MPC8572 processor.
We are using 4 gigs of memory, and also need a window of 512 megs for
PCI-E devices.
What I have done is set up the first 2G of memory from 0x0 - 0x7f, the
PCI windows from 0x8 - 0x9f, localbus devices + CCSRBAR from 0xf -
0xffffffff, and the second 2G of ram from 0x1.0000.0000 -
0x1.8000.0000.
I've got this set up in U-boot (although it only uses the low mem),
but Linux will only use the first contiguous physical area (the
message is "Only using first contiguous memory region").
Is it possible to have multiple non-contiguous physical memory chunks
used for memory allocation?
If not, is there a better way to set this up without losing large
chunks of memory?
Thanks,
Aaron
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Non-contiguous physical memory
2009-01-21 15:18 Non-contiguous physical memory Aaron Pace
@ 2009-01-21 17:28 ` Kumar Gala
2009-01-21 18:00 ` Aaron Pace
2009-01-23 17:52 ` Michele Pallaro
0 siblings, 2 replies; 6+ messages in thread
From: Kumar Gala @ 2009-01-21 17:28 UTC (permalink / raw)
To: Aaron Pace; +Cc: linuxppc-dev
On Jan 21, 2009, at 9:18 AM, Aaron Pace wrote:
> Hello,
>
> I'm working on a design using a Freescale MPC8572 processor.
> We are using 4 gigs of memory, and also need a window of 512 megs for
> PCI-E devices.
> What I have done is set up the first 2G of memory from 0x0 - 0x7f, the
> PCI windows from 0x8 - 0x9f, localbus devices + CCSRBAR from 0xf -
> 0xffffffff, and the second 2G of ram from 0x1.0000.0000 -
> 0x1.8000.0000.
> I've got this set up in U-boot (although it only uses the low mem),
> but Linux will only use the first contiguous physical area (the
> message is "Only using first contiguous memory region").
> Is it possible to have multiple non-contiguous physical memory chunks
> used for memory allocation?
> If not, is there a better way to set this up without losing large
> chunks of memory?
Its possible in that Linux supports this. However the PPC32 code does
not exist and would need to be added to support non-contiguous memory
ranges.
What exact PCI-E needs do you have? Is PCI-E performance critical?
Is (are) your pci device(s) 64-bit address capable?
I ask because depending on the answers doing straight 4G and PCI above
that range might be sufficient for your needs.
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Non-contiguous physical memory
2009-01-21 17:28 ` Kumar Gala
@ 2009-01-21 18:00 ` Aaron Pace
2009-01-21 23:25 ` Kumar Gala
2009-01-23 17:52 ` Michele Pallaro
1 sibling, 1 reply; 6+ messages in thread
From: Aaron Pace @ 2009-01-21 18:00 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
>
> Its possible in that Linux supports this. However the PPC32 code does not
> exist and would need to be added to support non-contiguous memory ranges.
>
> What exact PCI-E needs do you have? Is PCI-E performance critical? Is
> (are) your pci device(s) 64-bit address capable?
>
> I ask because depending on the answers doing straight 4G and PCI above that
> range might be sufficient for your needs.
>
> - k
>
Hello, thanks for responding.
The first take at this used your idea of mapping the PCI-E ranges
above the 4G boundary.
We have a localbus bridge device on the PCI-E bus that only supports
32-bit MMIO, but I believe we could satisfactorily work around that
problem using the ATMU registers.
However, one question that I had that I wasn't able to verify to my
satisfaction was whether I could ioremap a 36-bit physical address
when building for ppc32, as the PCI-E devices have memory ranges that
need to be accessible from userspace. If that is possible, then this
may be the way to go, although it would still be nice not to lose the
128 meg for the localbus & CCSR region.
Thanks,
-Aaron
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Non-contiguous physical memory
2009-01-21 18:00 ` Aaron Pace
@ 2009-01-21 23:25 ` Kumar Gala
0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2009-01-21 23:25 UTC (permalink / raw)
To: Aaron Pace; +Cc: linuxppc-dev
On Jan 21, 2009, at 12:00 PM, Aaron Pace wrote:
>>
>> Its possible in that Linux supports this. However the PPC32 code
>> does not
>> exist and would need to be added to support non-contiguous memory
>> ranges.
>>
>> What exact PCI-E needs do you have? Is PCI-E performance
>> critical? Is
>> (are) your pci device(s) 64-bit address capable?
>>
>> I ask because depending on the answers doing straight 4G and PCI
>> above that
>> range might be sufficient for your needs.
>>
>> - k
>>
>
> Hello, thanks for responding.
> The first take at this used your idea of mapping the PCI-E ranges
> above the 4G boundary.
> We have a localbus bridge device on the PCI-E bus that only supports
> 32-bit MMIO, but I believe we could satisfactorily work around that
> problem using the ATMU registers.
> However, one question that I had that I wasn't able to verify to my
> satisfaction was whether I could ioremap a 36-bit physical address
> when building for ppc32, as the PCI-E devices have memory ranges that
> need to be accessible from userspace. If that is possible, then this
> may be the way to go, although it would still be nice not to lose the
> 128 meg for the localbus & CCSR region.
you can get 36-bit physical addresses but you need to enable "Large
physical address support".
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Non-contiguous physical memory
2009-01-21 17:28 ` Kumar Gala
2009-01-21 18:00 ` Aaron Pace
@ 2009-01-23 17:52 ` Michele Pallaro
2009-01-23 19:50 ` Kumar Gala
1 sibling, 1 reply; 6+ messages in thread
From: Michele Pallaro @ 2009-01-23 17:52 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Aaron Pace
Hello,
I have a similar problem with my custom board CPU mpc8548 (E500V2) with
4Gbytes of RAM
0x0000_0000 -- 0x7FFF_FFFF 2Gbytes
0x1_0000_0000 -- 0x1_7FFF_FFFF 2Gbytes
I Enable the option PHYS_64BIT, and set in dts
memory {
#address-cells = <2>;
#size-cells = <1>;
device_type = "memory";
reg = <00000000 00000000 00000000 7FFFFFFF
00000001 00000000 00000000 7FFFFFFF>;
};
But the kernel can see just 2Gbytes of memory.
How the kernel can see the other 2Gbytes ?
Michele
On Wed, 2009-01-21 at 11:28 -0600, Kumar Gala wrote:
> On Jan 21, 2009, at 9:18 AM, Aaron Pace wrote:
>
> > Hello,
> >
> > I'm working on a design using a Freescale MPC8572 processor.
> > We are using 4 gigs of memory, and also need a window of 512 megs for
> > PCI-E devices.
> > What I have done is set up the first 2G of memory from 0x0 - 0x7f, the
> > PCI windows from 0x8 - 0x9f, localbus devices + CCSRBAR from 0xf -
> > 0xffffffff, and the second 2G of ram from 0x1.0000.0000 -
> > 0x1.8000.0000.
> > I've got this set up in U-boot (although it only uses the low mem),
> > but Linux will only use the first contiguous physical area (the
> > message is "Only using first contiguous memory region").
> > Is it possible to have multiple non-contiguous physical memory chunks
> > used for memory allocation?
> > If not, is there a better way to set this up without losing large
> > chunks of memory?
>
> Its possible in that Linux supports this. However the PPC32 code does
> not exist and would need to be added to support non-contiguous memory
> ranges.
>
> What exact PCI-E needs do you have? Is PCI-E performance critical?
> Is (are) your pci device(s) 64-bit address capable?
>
> I ask because depending on the answers doing straight 4G and PCI above
> that range might be sufficient for your needs.
>
> - k
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Non-contiguous physical memory
2009-01-23 17:52 ` Michele Pallaro
@ 2009-01-23 19:50 ` Kumar Gala
0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2009-01-23 19:50 UTC (permalink / raw)
To: michele.pallaro; +Cc: linuxppc-dev, Aaron Pace
On Jan 23, 2009, at 11:52 AM, Michele Pallaro wrote:
> Hello,
> I have a similar problem with my custom board CPU mpc8548 (E500V2)
> with
> 4Gbytes of RAM
>
> 0x0000_0000 -- 0x7FFF_FFFF 2Gbytes
> 0x1_0000_0000 -- 0x1_7FFF_FFFF 2Gbytes
>
> I Enable the option PHYS_64BIT, and set in dts
>
> memory {
> #address-cells = <2>;
> #size-cells = <1>;
> device_type = "memory";
> reg = <00000000 00000000 00000000 7FFFFFFF
> 00000001 00000000 00000000 7FFFFFFF>;
> };
>
> But the kernel can see just 2Gbytes of memory.
> How the kernel can see the other 2Gbytes ?
>
> Michele
This should be:
reg = < 0x00000000 0x00000000 0x00000000 0x80000000
0x00000001 0x00000000 0x00000000 0x80000000 >;
Its a start, size pair.
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-23 19:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 15:18 Non-contiguous physical memory Aaron Pace
2009-01-21 17:28 ` Kumar Gala
2009-01-21 18:00 ` Aaron Pace
2009-01-21 23:25 ` Kumar Gala
2009-01-23 17:52 ` Michele Pallaro
2009-01-23 19:50 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).