Fix boot for TI AM571x HS EVM board
cover Fix boot for TI AM571x HS EVM board
The AM571x SoC has 1 GB DDR space. As part of normal re-location process U-Boot copies itself to the top of DDR bank. However, on HS devices, the top 0x2500000 is used by PPA and is firewalled. This results in an exception and the boot fails.
Fix this by reserving the top 0x2600000 memory (aligned to 2MB as per page size for ARM32) in defconfig and devicetree.
Test logs:
https://gist.github.com/3V3RYONE/e86b3f4551986b0400d0e0f66d6ecc66
Beleswar Padhi (2):
configs: am571x_hs_evm_defconfig: Reserve EMIF memory used by PPA
arm: dts: am571x-idk: Reserve EMIF memory used by PPA
arch/arm/dts/am571x-idk.dts | 12 ++++++++++++ configs/am571x_hs_evm_defconfig | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 configs/am571x_hs_evm_defconfig
Signature · 1 line
2.34.1
PATCH 1/2 configs: am571x_hs_evm_defconfig: Reserve EMIF memory used by PPA
The AM571x SoC has 1 GB DDR space. As part of normal re-location process U-Boot copies itself to the top of DDR bank. However, on HS devices, the top 0x2500000 is used by PPA and is firewalled. This results in an exception and the boot fails.
Introduce a new defconfig for AM571x HS platforms and set CONFIG_SYS_MEM_TOP_HIDE to reserve the top 0x2600000 memory (aligned to 2MB as per page size for ARM32) for the same.
--- configs/am571x_hs_evm_defconfig | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/am571x_hs_evm_defconfig
configs/am571x_hs_evm_defconfig new file +3 -0
@@ -0,0 +1,3 @@ +#include <configs/am57xx_hs_evm_defconfig> + +CONFIG_SYS_MEM_TOP_HIDE=0x2600000
Signature · 1 line
2.34.1
Re: [PATCH 1/2] configs: am571x_hs_evm_defconfig: Reserve EMIF memory used by PPA
Quoted 3 lines · Beleswar Padhi
The AM571x SoC has 1 GB DDR space. As part of normal re-location process U-Boot copies itself to the top of DDR bank. However, on HS devices, the top
0x2500000is used by PPA and is firewalled. This results in an
0x2500000 to 37MB
Quoted 5 lines
exception and the boot fails.
Introduce a new defconfig for AM571x HS platforms and set
CONFIG_SYS_MEM_TOP_HIDEto reserve the top0x2600000memory (aligned to 2MB as per page size for ARM32) for the same.
0x2600000 to 38MB
Quoted 16 lines
Signed-off-by Beleswar Padhi <[email protected]>--- configs/am571x_hs_evm_defconfig | 3 +++ 1 file changed, 3 insertions(+)create mode 100644 configs/am571x_hs_evm_defconfig
configs/am571x_hs_evm_defconfig new file +3
-0@@ -0,0 +1,3 @@ +#include <configs/am57xx_hs_evm_defconfig> + +CONFIG_SYS_MEM_TOP_HIDE=0x2600000
Re: [PATCH 1/2] configs: am571x_hs_evm_defconfig: Reserve EMIF memory used by PPA
In reply to Beleswar PadhiQuoted 9 lines · Beleswar Padhi
The AM571x SoC has 1 GB DDR space. As part of normal re-location process U-Boot copies itself to the top of DDR bank. However, on HS devices, the top
0x2500000is used by PPA and is firewalled. This results in an exception and the boot fails.Introduce a new defconfig for AM571x HS platforms and set
CONFIG_SYS_MEM_TOP_HIDEto reserve the top0x2600000memory (aligned to 2MB as per page size for ARM32) for the same.
Quoted 5 lines
Signed-off-by Beleswar Padhi <[email protected]>--- configs/am571x_hs_evm_defconfig | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/am571x_hs_evm_defconfig
Missing MAINTAINERS update as well to catch this.
Signature · 1 line
Tom
PATCH 2/2 arm: dts: am571x-idk: Reserve EMIF memory used by PPA
In reply to Beleswar PadhiThe AM571x SoC has 1 GB DDR space. However on HS devices, the top 0x2500000 is used by PPA and is firewalled. We should reserve this memory in device-tree so that U-Boot doesn't use that memory for anything. Reserve the top 0x2600000 memory (aligned to 2MB as per page size for ARM32) for the same.
--- arch/arm/dts/am571x-idk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/dts/am571x-idk.dts +12 -0
@@ -20,6 +20,18 @@ reg = <0x0 0x80000000 0x0 0x40000000>; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + ppa_firewall_memory_region: ppa-firewall-memory@bda00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xbda00000 0x00 0x2600000>; + no-map; + }; + }; + leds { compatible = "gpio-leds"; cpu0-led {
Signature · 1 line
2.34.1
Re: [PATCH 2/2] arm: dts: am571x-idk: Reserve EMIF memory used by PPA
Quoted 20 lines · Beleswar Padhi
The AM571x SoC has 1 GB DDR space. However on HS devices, the top
0x2500000is used by PPA and is firewalled. We should reserve this memory in device-tree so that U-Boot doesn't use that memory for anything. Reserve the top0x2600000memory (aligned to 2MB as per page size for ARM32) for the same.Signed-off-by Beleswar Padhi <[email protected]>--- arch/arm/dts/am571x-idk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/dts/am571x-idk.dts +1
-0@@ -20,6 +20,18 @@ reg = <0x0 0x80000000 0x0 0x40000000>; }; + reserved-memory {
arch/arm/dts/am571x-idk.dts line 33
Quoted 10 lines
arch/arm/dts/am571x-idk.dts +10
-0+ #address-cells = <2>; + #size-cells = <2>; + ranges; + + ppa_firewall_memory_region: ppa-firewall-memory@bda00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xbda00000 0x00 0x2600000>; + no-map; + }; + };
You will lose this memory on GP device as well .
I suggest to have DT specific to HS device, or reserve this at run-time after detecting HS device.
Quoted 4 lines
arch/arm/dts/am571x-idk.dts +1
-0+ leds { compatible = "gpio-leds"; cpu0-led {
Re: [PATCH 2/2] arm: dts: am571x-idk: Reserve EMIF memory used by PPA
Quoted 34 lines · Udit
Quoted 19 lines · Beleswar Padhi
The AM571x SoC has 1 GB DDR space. However on HS devices, the top
0x2500000is used by PPA and is firewalled. We should reserve this memory in device-tree so that U-Boot doesn't use that memory for anything. Reserve the top0x2600000memory (aligned to 2MB as per page size for ARM32) for the same.Signed-off-by Beleswar Padhi <[email protected]>---
arch/arm/dts/am571x-idk.dts| 12 ++++++++++++1 file changed, 12 insertions(+)arch/arm/dts/am571x-idk.dts +0
-0@@ -20,6 +20,18 @@ reg = <0x0 0x80000000 0x0 0x40000000>; }; + reserved-memory {arch/arm/dts/am571x-idk.dts line 32
Quoted 10 lines
arch/arm/dts/am571x-idk.dts +10
-0+ #address-cells = <2>; + #size-cells = <2>; + ranges; + + ppa_firewall_memory_region: ppa-firewall-memory@bda00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xbda00000 0x00 0x2600000>; + no-map; + }; + };You will lose this memory on GP device as well .
Quoted 1 line
I suggest to have DT specific to HS device, or reserve this at run-time after detecting HS device.
Thanks, while trying to do this via FDT fixups, found out it was already taken care of by:
https://github.com/u-boot/u-boot/blob/master/arch/arm/mach-omap2/fdt-common.c#L72-L107
Thanks,
Beleswar