Skip to content

Device tree CMA configuration exceeds physical RAM on 512 MB i.MX8MN-QS8M-ND00 board #9

@enco1791

Description

@enco1791

Description

The device tree currently provided for the i.MX8MN-QS8M-ND00 configures a CMA (Contiguous Memory Allocator) region that is incompatible with some hardware configurations.

The board is shipped with 512 MB of physical RAM, however the device tree defines the following CMA settings:

linux,cma {
        size = <0 0x18000000>; 
        alloc-ranges = <0 0x40000000 0 0x20000000>;
};

This configuration requires allocation of 384MB in the memory region of 1.5GB to 2GB wich is enterily outside of the available physical memory. As a result this introduces several problems depending on the linux system configuration. I observed severe memory pressure as well as memory deadlocks during boot.

Regression details

The issue was introduced by commit

9b8f434897dce88101e42c48d9272dd84274a9d7

which changed the CMA configuration as follows:

@@ -162,8 +162,8 @@
 };
 
&resmem {
	/* overwrite freescale cma setting since it's not allocatable */
	linux,cma {
-		size = <0 0xf000000>;
-		/delete-property/ alloc-ranges;
+		size = <0 0x18000000>;
+		alloc-ranges = <0 0x40000000 0 0x20000000>;
	};
};

Expected behavior

The allocated memory size and region for the CMA should not exceed the available physical RAM of the smallest boards configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions