Allwinner: fix booting on a number of devices
Subsystems (2)
PATCH 1/1 Allwinner: fix booting on a number of devices
Revert "sunxi: enable MMU_PGPROT proper page table protection"
This reverts commit 16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.
This causes the follow issue on the A64 boards I have including Pine64+, Pine64-LTS and the Pinephone. Revert until the issue can be properly investigated.
CPU: Allwinner A64 (SUN50I) Model: Pine64+ DRAM: 2 GiB Insufficient RAM for page table: 0x5000 > 0x4000. Please increase the size in get_page_table_size()
resetting ...
System reset not supported on this platform
--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/Kconfig +0 -1
@@ -1207,7 +1207,6 @@ config ARCH_SUNXI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD select DM_SERIAL - select MMU_PGPROT if ARM64 select OF_BOARD_SETUP select OF_CONTROL select PINCTRL
Signature · 1 line
2.51.0
On Wed, 27 Aug 2025 08:50:14 +0100
Peter Robinson <[email protected]> wrote:
Hi Peter,
thanks for the report!
Quoted 4 lines
Revert "sunxi: enable
MMU_PGPROTproper page table protection"This reverts commit
16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.
Quoted 8 lines
This causes the follow issue on the A64 boards I have including Pine64+, Pine64-LTS and the Pinephone. Revert until the issue can be properly investigated.
CPU: Allwinner A64 (SUN50I) Model: Pine64+ DRAM: 2 GiB Insufficient RAM for page table: 0x5000 > 0x4000. Please increase the size in get_page_table_size()
Mmh, how did you get this? I just ran mainline on a Pine64-LTS, and didn't see any issues. Are you running on some specific setup? I am on GCC 11.2.0, TF-A is some v2.12.0-724-gf745e004a, and that's with pine64-lts_defconfig.
Quoted 13 lines
resetting ...
System reset not supported on this platformSigned-off-by Peter Robinson <[email protected]>--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARCH_SUNXI · line 1210
Quoted 4 lines
arch/arm/Kconfig +0
-1@@ -1207,7 +1207,6 @@ config ARCH_SUNXI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD select DM_SERIAL - select MMU_PGPROT if ARM64
Regardless that's quite a sledgehammer. If that's a real issue, we could surely provide our own get_page_table_size() implementation which is more generous?
Cheers,
Andre
Quoted 3 lines
arch/arm/Kconfig +0
-0select OF_BOARD_SETUP select OF_CONTROL select PINCTRL
Hi Andre,
Quoted 13 lines
Quoted 4 lines
Revert "sunxi: enable
MMU_PGPROTproper page table protection"This reverts commit
16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.Quoted 8 lines
This causes the follow issue on the A64 boards I have including Pine64+, Pine64-LTS and the Pinephone. Revert until the issue can be properly investigated.
CPU: Allwinner A64 (SUN50I) Model: Pine64+ DRAM: 2 GiB Insufficient RAM for page table: 0x5000 > 0x4000. Please increase the size in get_page_table_size()
Quoted 4 lines
Mmh, how did you get this? I just ran mainline on a Pine64-LTS, and didn't see any issues. Are you running on some specific setup? I am on GCC 11.2.0, TF-A is some v2.12.0-724-gf745e004a, and that's with pine64-lts_defconfig.
Fedora 42/43, gcc 15.2, binutils 2.44, TF-A 2.13.
I've seen it across Pine64+, Pine64-LTS and Pinephone.
No special setup and I reproduced in on the vanilla upstream checkout from a couple of days ago when I had the time to do the bisect.
Quoted 8 lines
Quoted 8 lines
resetting ...
System reset not supported on this platformSigned-off-by Peter Robinson <[email protected]>--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
Quoted 13 lines
arch/arm/Kconfig config ARCH_SUNXI · line 1210
Quoted 9 lines
arch/arm/Kconfig +0
-1@@ -1207,7 +1207,6 @@ config ARCH_SUNXI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD select DM_SERIAL - select MMU_PGPROT if ARM64Regardless that's quite a sledgehammer. If that's a real issue, we could surely provide our own
get_page_table_size()implementation which is more generous?
You commit that reverts says "This might trigger runtime exceptions in misbehaving drivers, which should then be fixed." which shows that it might cause a problem, and I agree that any drivers should be fixed, but the above output tells me absolutely nothing about even where to begin to look so to use your sledgehammer analogy, if I knew whether I needed a ball-peen hammer or a claw hammer I could but I am basically blind and with my testing the sledge hammer solves the problem.
Peter
On Fri, 29 Aug 2025 16:13:51 +0100
Peter Robinson <[email protected]> wrote:
Hi,
Quoted 18 lines
Quoted 13 lines
Quoted 4 lines
Revert "sunxi: enable
MMU_PGPROTproper page table protection"This reverts commit
16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.Quoted 8 lines
This causes the follow issue on the A64 boards I have including Pine64+, Pine64-LTS and the Pinephone. Revert until the issue can be properly investigated.
CPU: Allwinner A64 (SUN50I) Model: Pine64+ DRAM: 2 GiB Insufficient RAM for page table: 0x5000 > 0x4000. Please increase the size in get_page_table_size()Quoted 4 lines
Mmh, how did you get this? I just ran mainline on a Pine64-LTS, and didn't see any issues. Are you running on some specific setup? I am on GCC 11.2.0, TF-A is some v2.12.0-724-gf745e004a, and that's with pine64-lts_defconfig.
Quoted 6 lines
Fedora 42/43, gcc 15.2, binutils 2.44, TF-A 2.13.
I've seen it across Pine64+, Pine64-LTS and Pinephone.
No special setup and I reproduced in on the vanilla upstream checkout from a couple of days ago when I had the time to do the bisect.
So I tried this with some gcc 15.2 from kernel.org, binutils is at 2.45 there. That worked just fine for me. So can you send me the generated ELF files (u-boot and spl/u-boot-spl), from some upstream commit that breaks for you? And also the final u-boot-sunxi-with-spl.bin? Either for the Pine64+ or LTS. Could be privately, no need to spam the list. I would then try to build something as close as possible to that, and compare the ELF files to mine, to spot any differences.
Cheers,
Andre
Quoted 31 lines
Quoted 8 lines
Quoted 8 lines
resetting ...
System reset not supported on this platformSigned-off-by Peter Robinson <[email protected]>--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)Quoted 13 lines
arch/arm/Kconfig config ARCH_SUNXI · line 1210
Quoted 9 lines
arch/arm/Kconfig +0
-1@@ -1207,7 +1207,6 @@ config ARCH_SUNXI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD select DM_SERIAL - select MMU_PGPROT if ARM64Regardless that's quite a sledgehammer. If that's a real issue, we could surely provide our own
get_page_table_size()implementation which is more generous?You commit that reverts says "This might trigger runtime exceptions in misbehaving drivers, which should then be fixed." which shows that it might cause a problem, and I agree that any drivers should be fixed, but the above output tells me absolutely nothing about even where to begin to look so to use your sledgehammer analogy, if I knew whether I needed a ball-peen hammer or a claw hammer I could but I am basically blind and with my testing the sledge hammer solves the problem.
Peter
Hey Andre,
Quoted 25 lines
Quoted 18 lines
Quoted 13 lines
Quoted 4 lines
Revert "sunxi: enable
MMU_PGPROTproper page table protection"This reverts commit
16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.Quoted 8 lines
This causes the follow issue on the A64 boards I have including Pine64+, Pine64-LTS and the Pinephone. Revert until the issue can be properly investigated.
CPU: Allwinner A64 (SUN50I) Model: Pine64+ DRAM: 2 GiB Insufficient RAM for page table: 0x5000 > 0x4000. Please increase the size in get_page_table_size()Quoted 4 lines
Mmh, how did you get this? I just ran mainline on a Pine64-LTS, and didn't see any issues. Are you running on some specific setup? I am on GCC 11.2.0, TF-A is some v2.12.0-724-gf745e004a, and that's with pine64-lts_defconfig.
Quoted 6 lines
Fedora 42/43, gcc 15.2, binutils 2.44, TF-A 2.13.
I've seen it across Pine64+, Pine64-LTS and Pinephone.
No special setup and I reproduced in on the vanilla upstream checkout from a couple of days ago when I had the time to do the bisect.
Quoted 7 lines
So I tried this with some gcc 15.2 from kernel.org, binutils is at 2.45 there. That worked just fine for me. So can you send me the generated ELF files (u-boot and spl/u-boot-spl), from some upstream commit that breaks for you? And also the final u-boot-sunxi-with-spl.bin? Either for the Pine64+ or LTS. Could be privately, no need to spam the list. I would then try to build something as close as possible to that, and compare the ELF files to mine, to spot any differences.
Sorry for the delay on this.
Just tried this again against the v2025.10 tag with the latest Fedora 43 toolchain bits and still see the problem on the pine64+.
You should have all the bits here
https://pbrobinson.fedorapeople.org/pine64plus/
Let me know if there's anything else you need, or just ping me on chat.
Peter