From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Pali Rohár" <pali@kernel.org>, "Mike Rapoport" <rppt@kernel.org>
Cc: Ash Logan <ash@heyquark.com>,
"paulus@samba.org" <paulus@samba.org>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"j.ne@posteo.net" <j.ne@posteo.net>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Fragmented physical memory on powerpc/32
Date: Sat, 10 Sep 2022 09:39:20 +0000 [thread overview]
Message-ID: <9fbc5338-5e10-032a-8f55-e080bd93f74b@csgroup.eu> (raw)
In-Reply-To: <20220908201701.sd3zqn5hfixmjvhh@pali>
+ Adding Mike who might help if the problem is around memblock.
Le 08/09/2022 à 22:17, Pali Rohár a écrit :
> On Thursday 08 September 2022 17:35:11 Pali Rohár wrote:
>> On Thursday 08 September 2022 15:25:14 Christophe Leroy wrote:
>>> Le 08/08/2022 à 20:40, Pali Rohár a écrit :
>>>> On Friday 10 June 2022 00:24:20 Pali Rohár wrote:
>>>>> On Friday 20 May 2022 14:30:02 Pali Rohár wrote:
>>>>>> + linux-mm
>>>>>>
>>>>>> Do you know what are requirements for kernel to support non-contiguous
>>>>>> memory support and what is needed to enable it for 32-bit powerpc?
>>>>>
>>>>> Any hints?
>>>>
>>>> PING?
>>>>
>>>
>>> The tree following patches landed in powerpc/next branch, so they should
>>> soon be visible in linux-next too:
>>>
>>> fc06755e2562 ("powerpc/32: Drop a stale comment about reservation of
>>> gigantic pages")
>>> b0e0d68b1c52 ("powerpc/32: Allow fragmented physical memory")
>>> 0115953dcebe ("powerpc/32: Remove wii_memory_fixups()")
>>
>> Ou, nice! I will try to test it if it allows me to access more than 2GB
>> of RAM from 4GB DDR3 module with 32-bit addressing mode on P2020 CPU.
>
> Hello! Ok, I have tried it from powerpc/next branch, but seems it does
> not work. I'm getting just early kernel crash.
>
> [ 0.000000] CPU maps initialized for 1 thread per core
> [ 0.000000] (thread shift is 0)
> [ 0.000000] -----------------------------------------------------
> [ 0.000000] phys_mem_size = 0xbe500000
> [ 0.000000] dcache_bsize = 0x20
> [ 0.000000] icache_bsize = 0x20
> [ 0.000000] cpu_features = 0x0000000010010108
> [ 0.000000] possible = 0x0000000010010108
> [ 0.000000] always = 0x0000000010010108
> [ 0.000000] cpu_user_features = 0x84e08000 0x08000000
> [ 0.000000] mmu_features = 0x00020010
> [ 0.000000] -----------------------------------------------------
> mpc85xx_rdb_setup_arch()
> [ 0.000000] ioremap() called early from of_iomap+0x48/0x80. Use early_ioremap() instead
> [ 0.000000] MPC85xx RDB board from Freescale Semiconductor
> [ 0.000000] barrier-nospec: using isync; sync as speculation barrier
> [ 0.000000] barrier-nospec: patched 182 locations
> [ 0.000000] Top of RAM: 0xff700000, Total RAM: 0xbe500000
> [ 0.000000] Memory hole size: 1042MB
> [ 0.000000] Zone ranges:
> [ 0.000000] Normal [mem 0x0000000000000000-0x000000002fffffff]
> [ 0.000000] HighMem [mem 0x0000000030000000-0x00000000ff6fffff]
> [ 0.000000] Movable zone start for each node
> [ 0.000000] Early memory node ranges
> [ 0.000000] node 0: [mem 0x0000000000000000-0x000000007fffffff]
> [ 0.000000] node 0: [mem 0x00000000c0200000-0x00000000eeffffff]
> [ 0.000000] node 0: [mem 0x00000000f0000000-0x00000000ff6fffff]
> [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ff6fffff]
> [ 0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
> [ 0.000000] percpu: Embedded 11 pages/cpu s14196 r8192 d22668 u45056
> [ 0.000000] pcpu-alloc: s14196 r8192 d22668 u45056 alloc=11*4096
> [ 0.000000] pcpu-alloc: [0] 0 [0] 1
> [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 777792
> [ 0.000000] Kernel command line: root=ubi0:rootfs rootfstype=ubifs ubi.mtd=rootfs,2048 rootflags=chk_data_crc rw console=ttyS0,115200
> [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
> [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
> [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> [ 0.000000] Kernel attempted to read user page (7df58) - exploit attempt? (uid: 0)
> [ 0.000000] BUG: Unable to handle kernel data access on read at 0x0007df58
> [ 0.000000] Faulting instruction address: 0xc01c8348
> [ 0.000000] Oops: Kernel access of bad area, sig: 11 [#1]
> [ 0.000000] BE PAGE_SIZE=4K SMP NR_CPUS=2 P2020RDB-PC
> [ 0.000000] Modules linked in:
> [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.0.0-rc2-0caacb197b677410bdac81bc34f05235+ #121
> [ 0.000000] NIP: c01c8348 LR: c01cb2bc CTR: 0000000a
> [ 0.000000] REGS: c10d7e20 TRAP: 0300 Not tainted (6.0.0-rc2-0caacb197b677410bdac81bc34f05235+)
> [ 0.000000] MSR: 00021000 <CE,ME> CR: 48044224 XER: 00000000
> [ 0.000000] DEAR: 0007df58 ESR: 00000000
> [ 0.000000] GPR00: c01cb294 c10d7f10 c1045340 00000001 00000004 c112bcc0 00000015 eedf1000
> [ 0.000000] GPR08: 00000003 0007df58 00000000 f0000000 28044228 00000200 00000000 00000000
> [ 0.000000] GPR16: 00000000 00000000 00000000 0275cb7a c0000000 00000001 0000075f 00000000
> [ 0.000000] GPR24: c1031004 00000000 00000000 00000001 c10f0000 eedf1000 00080000 00080000
> [ 0.000000] NIP [c01c8348] free_unref_page_prepare.part.93+0x48/0x60
> [ 0.000000] LR [c01cb2bc] free_unref_page+0x84/0x4b8
> [ 0.000000] Call Trace:
> [ 0.000000] [c10d7f10] [eedf1000] 0xeedf1000 (unreliable)
> [ 0.000000] [c10d7f20] [c01cb294] free_unref_page+0x5c/0x4b8
> [ 0.000000] [c10d7f70] [c1007644] mem_init+0xd0/0x194
> [ 0.000000] [c10d7fa0] [c1000e4c] start_kernel+0x4c0/0x6d0
> [ 0.000000] [c10d7ff0] [c00003e0] set_ivor+0x13c/0x178
> [ 0.000000] Instruction dump:
> [ 0.000000] 552817be 5509103a 7d294214 55293830 7d4a4a14 812a003c 814a0038 5529002a
> [ 0.000000] 7c892050 5484c23a 5489eafa 548406fe <7d2a482e> 7d242430 5484077e 90870010
> [ 0.000000] ---[ end trace 0000000000000000 ]---
> [ 0.000000]
> [ 0.000000] Kernel panic - not syncing: Fatal exception
> [ 0.000000] Rebooting in 1 seconds..
> [ 0.000000] System Halted, OK to turn off power
>
> 4GB DDR3 SODIMM module is set via Freescale LBC to the whole 4 GB
> address range. And on ranges:
> 0x0000_0000 - 0x7fff_ffff
> 0xc020_0000 - 0xeeff_ffff
> 0xf000_0000 - 0xff6f_ffff
> there is no peripheral device, they are free for DRAM. Between these
> physical ranges are mapped peripheral devices (PCIe and NOR).
>
> Any idea if I'm doing something wrong or there can be a bug in memory code?
>
> Quite suspicious is that "Initmem setup node 0" prints one range where
> are also peripherals, not just DRAM. Crash is on address 0xc01c8348
> which belongs to PCIe.
>
Yes I also find that "Initmem setup node 0" suspicious.
However the crash address 0xc01c8348 is valid kernel address. That's a
virtual address, not a physical address, so that's not PCIe. That's
kernel linear mapping, so that's likely physical address 0x001c8348
offseted by PAGE_OFFSET which is 0xc0000000.
Do you have a way to reproduce this problem under QEMU ?
Thanks
Christophe
next prev parent reply other threads:[~2022-09-10 9:44 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 4:43 [PATCH 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-03-02 4:43 ` [PATCH 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-03-02 13:28 ` Rob Herring
2022-03-02 4:43 ` [PATCH 02/12] powerpc: wiiu: device tree Ash Logan
2022-03-02 13:36 ` Rob Herring
2022-03-03 2:41 ` Ash Logan
2022-03-02 4:43 ` [PATCH 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-03-02 4:43 ` [PATCH 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-03-02 4:43 ` [PATCH 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-03-02 4:44 ` [PATCH 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-03-02 4:44 ` [PATCH 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-03-02 4:44 ` [PATCH 08/12] powerpc: wiiu: latte " Ash Logan
2022-03-02 4:44 ` [PATCH 09/12] powerpc: espresso processor support Ash Logan
2022-03-02 4:44 ` [PATCH 10/12] powerpc: wiiu: platform support Ash Logan
2022-03-02 4:44 ` [PATCH 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-05-13 22:43 ` Pali Rohár
2022-05-20 3:41 ` Ash Logan
2022-05-20 8:04 ` Pali Rohár
2022-05-20 10:44 ` Ash Logan
2022-05-20 12:30 ` Pali Rohár
2022-06-09 22:24 ` Pali Rohár
2022-08-08 18:40 ` Pali Rohár
2022-09-08 15:25 ` Christophe Leroy
2022-09-08 15:35 ` Pali Rohár
2022-09-08 20:17 ` Fragmented physical memory on powerpc/32 Pali Rohár
2022-09-10 9:39 ` Christophe Leroy [this message]
2022-09-12 14:48 ` Mike Rapoport
2022-09-12 21:16 ` Pali Rohár
2022-09-13 6:11 ` Christophe Leroy
2022-09-13 12:36 ` Christophe Leroy
2022-09-14 9:32 ` Mike Rapoport
2022-09-14 9:43 ` Christophe Leroy
2022-09-14 15:55 ` Mike Rapoport
2022-09-14 19:56 ` Pali Rohár
2022-03-02 4:44 ` [PATCH 12/12] powerpc: wiiu: Add minimal default config Ash Logan
2022-06-22 13:10 ` [PATCH v2 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-06-22 13:10 ` [PATCH v2 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-06-22 13:10 ` [PATCH v2 02/12] powerpc: wiiu: device tree Ash Logan
2022-06-22 13:10 ` [PATCH v2 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-06-22 13:10 ` [PATCH v2 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-06-22 13:10 ` [PATCH v2 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-06-22 13:10 ` [PATCH v2 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-06-27 0:15 ` kernel test robot
2022-06-22 13:10 ` [PATCH v2 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-06-22 13:10 ` [PATCH v2 08/12] powerpc: wiiu: latte " Ash Logan
2022-06-27 2:51 ` kernel test robot
2022-06-22 13:10 ` [PATCH v2 09/12] powerpc: espresso processor support Ash Logan
2022-06-22 13:10 ` [PATCH v2 10/12] powerpc: wiiu: platform support Ash Logan
2022-06-22 13:10 ` [PATCH v2 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-06-22 13:10 ` [PATCH v2 12/12] powerpc: wiiu: Add minimal default config Ash Logan
2022-06-28 13:31 ` [PATCH v3 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-06-28 13:31 ` [PATCH v3 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-06-29 9:52 ` Krzysztof Kozlowski
2022-06-28 13:31 ` [PATCH v3 02/12] powerpc: wiiu: device tree Ash Logan
2022-06-29 9:58 ` Krzysztof Kozlowski
2022-06-29 16:13 ` Segher Boessenkool
2022-06-29 18:13 ` Krzysztof Kozlowski
2022-06-29 20:28 ` Segher Boessenkool
2022-06-28 13:31 ` [PATCH v3 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-06-28 13:31 ` [PATCH v3 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-06-28 13:31 ` [PATCH v3 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-06-28 13:31 ` [PATCH v3 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-06-28 13:31 ` [PATCH v3 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-06-28 13:31 ` [PATCH v3 08/12] powerpc: wiiu: latte " Ash Logan
2022-06-28 13:31 ` [PATCH v3 09/12] powerpc: espresso processor support Ash Logan
2022-06-28 13:31 ` [PATCH v3 10/12] powerpc: wiiu: platform support Ash Logan
2022-06-28 13:31 ` [PATCH v3 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-06-28 13:31 ` [PATCH v3 12/12] powerpc: wiiu: add minimal default config Ash Logan
2022-11-15 14:47 ` [PATCH v3 00/12] powerpc: Nintendo Wii U support Christophe Leroy
2022-11-19 11:30 ` [PATCH v4 00/11] " Ash Logan
2022-11-19 11:30 ` [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-11-19 21:36 ` Rob Herring
2022-11-20 15:30 ` Rob Herring
2024-02-20 16:20 ` Christophe Leroy
2024-02-20 16:24 ` Krzysztof Kozlowski
2022-11-19 11:30 ` [PATCH v4 02/11] powerpc: wiiu: device tree Ash Logan
2022-11-19 11:30 ` [PATCH v4 03/11] powerpc: wiiu: bootwrapper support Ash Logan
2022-11-19 11:30 ` [PATCH v4 04/11] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-11-19 11:30 ` [PATCH v4 05/11] powerpc: wiiu: declare as non-coherent Ash Logan
2022-11-19 11:30 ` [PATCH v4 06/11] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-11-19 11:30 ` [PATCH v4 07/11] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-11-19 11:30 ` [PATCH v4 08/11] powerpc: wiiu: latte " Ash Logan
2022-11-19 11:30 ` [PATCH v4 09/11] powerpc: espresso processor support Ash Logan
2022-11-19 11:30 ` [PATCH v4 10/11] powerpc: wiiu: platform support Ash Logan
2022-11-19 11:30 ` [PATCH v4 11/11] powerpc: wiiu: add minimal default config Ash Logan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9fbc5338-5e10-032a-8f55-e080bd93f74b@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=ash@heyquark.com \
--cc=benh@kernel.crashing.org \
--cc=j.ne@posteo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=pali@kernel.org \
--cc=paulus@samba.org \
--cc=robh+dt@kernel.org \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).