All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: PPC 32bits and big RAM mapping problem
@ 2005-12-06 19:55 Rune Torgersen
  0 siblings, 0 replies; 5+ messages in thread
From: Rune Torgersen @ 2005-12-06 19:55 UTC (permalink / raw)
  To: Laurent Lagrange, Matt Porter; +Cc: linuxppc-embedded

> -----Original Message-----
> From:  Rune Torgersen
> Sent: Thursday, December 01, 2005 12:43
> To: Laurent Lagrange
> Cc: linuxppc-embedded@ozlabs.org
> Subject: RE: PPC 32bits and big RAM mapping problem
>=20
> > -----Original Message-----
> > From: Laurent Lagrange
> > Sent: Thursday, December 01, 2005 11:48
> > To: linuxppc-embedded@ozlabs.org
> > Subject: PPC 32bits and big RAM mapping problem
>=20
> > So I'm under the impression to be cornered in my shoes.
> > Any idea, book, article, prediction would be welcome.
>=20
> I have 2GB of ram working on my PPC32 board.
>=20
> You have to change the following in the kernel config:
> Under Advanced Setup:
> 	Set Maximum Low memory (Set to 0x40000000)
> 	Set Custom Kernel config address (Set to 0xA0000000)
>=20
> I do not remember if I had to change anything else.

Finally got enough history ripped out of my old bitkeeper repos...
All I had to do to get 2GB of RAM to work on a 8266 was:

CONFIG_ADVANCED_OPTIONS=3Dy
CONFIG_HIGHMEM_START_BOOL=3Dy
CONFIG_HIGHMEM_START=3D0xee000000
CONFIG_LOWMEM_SIZE_BOOL=3Dy
CONFIG_LOWMEM_SIZE=3D0x40000000
CONFIG_KERNEL_START_BOOL=3Dy
CONFIG_KERNEL_START=3D0xa0000000

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: PPC 32bits and big RAM mapping problem
@ 2005-12-01 20:18 Rune Torgersen
  0 siblings, 0 replies; 5+ messages in thread
From: Rune Torgersen @ 2005-12-01 20:18 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-embedded

> -----Original Message-----
> From: Matt Porter [mailto:mporter@kernel.crashing.org]=20
> Sent: Thursday, December 01, 2005 12:56
> If you have 2GB you had to have something else. Right now
> you have it set to constrict the max lowmem to 1GB. So,
> you must have CONFIG_HIGHMEM on as well to utilize the
> other 1GB.

Ahh.. Yep, have CONFIG_HIGHMEM set.

I only did 1G of kernel low mem, so that there still would be space left
for vmalloc mappings.
I have a 8265 witch uses 0xf0000000 and up for internal stuff and flash,
so with 1G lowmem and kernel baseadr set to 0xa.... I have 0xe0000000 to
0xeffffffff for virtual address space.

I do not remember if I had to patch some other parts of the kernel also.
I do not think I did.
Can't chech right now either, because we used bitkeeper and I cannot
even check the commit logs anymore.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPC 32bits and big RAM mapping problem
  2005-12-01 18:43 Rune Torgersen
@ 2005-12-01 18:56 ` Matt Porter
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Porter @ 2005-12-01 18:56 UTC (permalink / raw)
  To: Rune Torgersen; +Cc: linuxppc-embedded

On Thu, Dec 01, 2005 at 12:43:02PM -0600, Rune Torgersen wrote:
> > -----Original Message-----
> > From: Laurent Lagrange
> > Sent: Thursday, December 01, 2005 11:48
> > To: linuxppc-embedded@ozlabs.org
> > Subject: PPC 32bits and big RAM mapping problem
> 
> > So I'm under the impression to be cornered in my shoes.
> > Any idea, book, article, prediction would be welcome.
> 
> I have 2GB of ram working on my PPC32 board.
> 
> You have to change the following in the kernel config:
> Under Advanced Setup:
> 	Set Maximum Low memory (Set to 0x40000000)
> 	Set Custom Kernel config address (Set to 0xA0000000)
> 
> I do not remember if I had to change anything else.

If you have 2GB you had to have something else. Right now
you have it set to constrict the max lowmem to 1GB. So,
you must have CONFIG_HIGHMEM on as well to utilize the
other 1GB.

To answer the original poster's question: simply enable
CONFIG_HIGHMEM and UP system will have 768MB in lowmem and
the rest in highmem.  If there's some constraint on your
application (like many embedded apps) that requires all
2GB in lowmem then configure:

Set Maximum low memory (Set to 0x80000000)
Set custom kernel base address (Set to 0x40000000)
Set custom user task size (Set to 0x40000000)

Don't do this unless highmem won't work for your app. If you
use this approach each process will be limited to 1GB of virtual
memory which may or may not be an OK tradeoff for your app.

-Matt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: PPC 32bits and big RAM mapping problem
@ 2005-12-01 18:43 Rune Torgersen
  2005-12-01 18:56 ` Matt Porter
  0 siblings, 1 reply; 5+ messages in thread
From: Rune Torgersen @ 2005-12-01 18:43 UTC (permalink / raw)
  To: Laurent Lagrange; +Cc: linuxppc-embedded

> -----Original Message-----
> From: Laurent Lagrange
> Sent: Thursday, December 01, 2005 11:48
> To: linuxppc-embedded@ozlabs.org
> Subject: PPC 32bits and big RAM mapping problem

> So I'm under the impression to be cornered in my shoes.
> Any idea, book, article, prediction would be welcome.

I have 2GB of ram working on my PPC32 board.

You have to change the following in the kernel config:
Under Advanced Setup:
	Set Maximum Low memory (Set to 0x40000000)
	Set Custom Kernel config address (Set to 0xA0000000)

I do not remember if I had to change anything else.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* PPC 32bits and big RAM mapping problem
@ 2005-12-01 17:47 Laurent Lagrange
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Lagrange @ 2005-12-01 17:47 UTC (permalink / raw)
  To: linuxppc-embedded


Hello,

I have a PPC board with an address width fixed to 32bits, so I can address
4GB.

   M          M        M         M          M          M           M
  0          0        0         0          0          1           e
 0          2        8         c          e          e           f
 ---------------------------------------------------------------------------
---
 | Physical |        | PCI     | Kernel   | Kernel   | User      |
Peripheral |
 | RAM      | unused | memory  | memory   | reserved | memory    | mapping
|
 |          |        |         | kmalloc  |          | vmalloc   |
|
 | ex 512MB |        | ex 1GB  | ex 512MB | 16MB     |           | ex 32MB
|
 |      2GB max      | 1GB max | max ?    |          | 464MB max |
|
 ---------------------------------------------------------------------------
---
                              (0)                   (1)         (2)

00M stand for 0x00000000
(0) kernel_base
(1) vmalloc_start
(2) vmalloc_end

The exemple above shows a classical(?) mapping with a physical RAM of 512MB.
The physical RAM can growth up to 2GB, but if the kernel maps a Kernel
memory
of 2GB, there is no more place for the other items. The 4GB are eated.

Even with only 512MB of RAM, the kernel can't fully vmalloc it for user.

I know that the kernel and drivers kmalloc in Kernel memory which has the
full
space but when the users wants more RAM, it is for vmallocations.
Now when the physical RAM increases, the User memory is reduced for vmalloc.
And I don't talk about Peripheral mappings which also reduce the User
memory.

So I'm under the impression to be cornered in my shoes.
Any idea, book, article, prediction would be welcome.

Thanks
Laurent

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-12-06 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 19:55 PPC 32bits and big RAM mapping problem Rune Torgersen
  -- strict thread matches above, loose matches on Subject: below --
2005-12-01 20:18 Rune Torgersen
2005-12-01 18:43 Rune Torgersen
2005-12-01 18:56 ` Matt Porter
2005-12-01 17:47 Laurent Lagrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.