[Cbe-oss-dev] CONFIG_DEBUG_PAGE_ALLOC on ps3

Sascha Sommer saschasommer at freenet.de
Thu Jul 3 03:07:53 EST 2008


Hi,

On Mittwoch, 2. Juli 2008, Geoff Levand wrote:
> Hi,
>
> Sascha Sommer wrote:
> > I wonder if CONFIG_DEBUG_PAGE_ALLOC is supposed to work on the
> > playstation3?
> >
> > Last time I tryed it with some 2.6.26 git kernel from
> > http://git.kernel.org/?p=linux/kernel/git/geoff/ps3-linux.git;a=summary
> > the system crashed during boot.
>
> CONFIG_DEBUG_PAGE_ALLOC does not work on PS3.
>
> To date, the PS3's hypervisor allocates 128 MiB of boot mem starting at
> lpar address zero for the other OS partition, and then makes additional
> hotplug memory available at high lpar addresses, typically around
> 6000_0000_0000h and 7000_0000_0000h.  You can see this output with the
> patch below.
>
>   ps3_mm_region_create:254 requested  7800000h
>   ps3_mm_region_create:255 actual     7000000h
>   ps3_mm_region_create:258 difference 800000h (8MB)
>   ps3_mm_vas_create:213: map.total     = f800000h
>   ps3_mm_vas_create:213: map.rm.size   = 8000000h
>   ps3_mm_vas_create:213: map.vas_id    = 11
>   ps3_mm_vas_create:213: map.htab_size = 100000h
>   ps3_mm_vas_create:213: map.r1.base   = 6c0060000000h
>   ps3_mm_vas_create:213: map.r1.offset = 6c0058000000h
>   ps3_mm_vas_create:213: map.r1.size   = 7000000h
>
> Currently, the Linux kernel doesn't support this kind of memory layout,
> with big gaps between memory regions, so the PS3 platform code does its
> own translation to map the high mem (r1) to lower addresses.  I arranged
> it so r1.base is translated to the top of the boot mem:
>
> unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
> {
> 	return (phys_addr < map.rm.size || phys_addr >= map.total)
> 		? phys_addr : phys_addr + map.r1.offset;
> }
>
> The translation of addresses from the r1 region does not work with
> CONFIG_DEBUG_PAGE_ALLOC, and that is what causes the kernel to hang.
>
> I would like to re-work some of the ps3 memory management code, and
> can look into supporting CONFIG_DEBUG_PAGE_ALLOC at that time, but
> it is now a low priority item for me, so I don't know when I'll get to
> it.
>

Thanks for the explanation.

Regards

Sascha Sommer



More information about the cbe-oss-dev mailing list