[Crash-utility] [PATCH] [PPC32] Fix vmalloc address translation for BookE

Toshikazu Nakayama nakayama.ts at ncos.nec.co.jp
Thu Feb 2 01:59:40 UTC 2012


(2012/01/19 14:42), Suzuki K. Poulose wrote:
> On ബുധന്‍ 18 ജനുവരി 2012 08:11 വൈകു, Dave Anderson wrote:
>>
>>
>> ----- Original Message -----
>>> (2012/01/16 14:15), Suzuki K. Poulose wrote:
>>>> This patch fixes the vmalloc address translation for BookE.This
>>>> patch is based on the PPC44x definitions and may not work fine for
>>>> other systems.
>>>>
>>>> crash> mod
>>>> mod: cannot access vmalloc'd module memory
>>>> crash>
>>>>
>>>>
>>>> After the patch :
>>>>
>>>> crash> mod
>>>> MODULE NAME SIZE OBJECT FILE
>>>> d1018fd8 mbcache 6023 (not loaded) [CONFIG_KALLSYMS]
>>>> d1077190 jbd 58360 (not loaded) [CONFIG_KALLSYMS]
>>>> d107ca98 llc 4525 (not loaded) [CONFIG_KALLSYMS]
>>>> d1130de4 ext3 203186 (not loaded) [CONFIG_KALLSYMS]
>>>> d114bbac squashfs 26129 (not loaded) [CONFIG_KALLSYMS]
>>>>
>>>>
>>>> On ppc44x, the virtual-address is split as below :
>>>>
>>>> Bits |0 10|11 19|20 31|
>>>> -----------------------------------
>>>> | PGD | PMD | PAGE_OFFSET |
>>>> -----------------------------------
>>>>
>>>> The PAGE_BASE_ADDR is a 64bit value(of type phys_addr_t).
>>>>
>>>> Note : I am not sure how do we distinguish the different values (PGDIR_SHIFT etc)
>>>> for different PPC32 systems. Since there are a lot of different platforms
>>>> under PPC32, we need some mechanism to dynamically determine the PGDIR, PTE
>>>> shift values. One option is to put the information in the VMCOREINFO.
>>>
>>> Hi Suzuki,
>>>
>>> How about using powerpc_base_platform symbol?
>>>
>>> *PTRRELOC(&powerpc_base_platform) = t->platform;
>>>
>>> $ grep -rIw platform arch/powerpc/kernel/cputable.c
>>> /* The platform string corresponding to the real PVR */
>>> .platform = "power3",
>>> .platform = "power3",
>>> .platform = "rs64",
>>> .platform = "rs64",
>>> .platform = "rs64",
>>> .platform = "rs64",
>>> .platform = "power4",
>>> .platform = "power4",
>>> :
>>> :
>>>
>>> This kconfig based platform string data can be read
>>> base_platform = symbol_value("powerpc_base_platform symbols");
>>> read_string(base_platform, buf, buffer-size);
>>> at ppc_init(POST_GDB).
>>>
>>> I think platform can be distinguished with following naming rules.
>>> - CONFIG_40x=y: platform is "ppc403"
>>> - CONFIG_44x=y: platform is "ppc440"
>>>
>>> Thanks,
>>> Toshi
>>
>> That makes good sense. Suzuki, are you re-working the patch
>> with Toshi's suggestion?
>>
> I will take a look at this. Sorry, have been a bit busy.

Hi Suzuki,

I'd put forward a proposal which can make your BookE support easy to adjust.
If this patch set is suitable for your Note's solution,
please merge into your works, and I'm not sure about BookE's word like PPC44X,
also please make reform of its staff.

Thanks,
Toshi.

> Thanks
> Suzuki
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ppc-change-from-define-value-to-variable.patch
Type: text/x-patch
Size: 1849 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120202/11208612/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ppc-add-page-table-size-variables.patch
Type: text/x-patch
Size: 4371 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120202/11208612/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ppc-don-t-use-PAGEOFFSET-for-address-translation.patch
Type: text/x-patch
Size: 2067 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120202/11208612/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ppc-define-BookE-page-table-format.patch
Type: text/x-patch
Size: 1139 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120202/11208612/attachment-0003.bin>


More information about the Crash-utility mailing list