Hello all,
We are use AM5728 soc, processor-sdk-linux 05.02.00.10 and 4.14.79 kernel .
Refer to the following post to support 4G DDR.

root@0123456789:~# cat /proc/meminfo
MemTotal: 3918688 kB
MemFree: 3421804 kB
MemAvailable: 3503672 kB
root@0123456789:~# cat /proc/iomem
...
80000000-9fffffff : System RAM
80008000-80dfffff : Kernel code
81000000-810c1edf : Kernel data
a0000000-abffffff : CMEM
ac000000-fe5fffff : System RAM
200000000-27fcfffff : System RAM
It can be used and released normally.
But when using addresses above 0x200000000 as dma, no data can be obtained.
Modified arch/arm/mm/kconfig to force ARCH_DMA_ADDR_T_64BIT to depend on LPAE:
config ARCH_DMA_ADDR_T_64BIT
def_bool ARM_LPAE
My kernel configuration:
CONFIG_ARM_LPAE=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
fdt:
dma_memory_region: dma-memory@b0000000 {
compatible = "shared-dma-pool";
reg = <0x2 0x00000000 0x0 0x12800000>;
reusable;
status = "okay";
};
I can see that dma_addr_t is 8 bytes.
sizeof(dma_addr_t) == 8
The data read by dma is all 0 and an error occurs:
[ 6400.986736] ------------[ cut here ]------------
[ 6400.991382] WARNING: CPU: 0 PID: 0 at ../drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x254/0x370
[ 6401.000814] 44000000.ocp:L3 Custom Error: MASTER SDMA TARGET GPMC (Idle): Data Access in User mode during Functional access
When I only modify the device tree dma reserved memory address to below 0x100000000:
reg = <0x0 0xb0000000 0x0 0x12800000>;
There is no problem.
Therefore, I want to know whether the physical memory above 0x200000000 supports DMA? What changes need to be made?
Best regards
Allen