Bug

cma的alignment

adtxl
2022-04-24 / 0 评论 / 902 阅读 / 正在检测是否收录...

1.问题说明

由于一段cma reserved memory大小设置的不正确,导致地址没有对齐,由此导致的后面启动黑屏问题。

报错如下:

[    0.000000] -(0)[0:swapper]Reserved memory: created CMA memory pool at 0x0000000086800000, size 176 MiB
[    0.000000] -(0)[0:swapper]OF: reserved mem: initialized node memory@86800000, compatible id shared-dma-pool
[    0.000000] -(0)[0:swapper]Reserved memory: incorrect alignment of CMA region
[    0.000000] -(0)[0:swapper]Removed memory: created DMA memory pool at 0x00000000d0300000, size 200 MiB
[    0.000000] -(0)[0:swapper]OF: reserved mem: initialized node memory@d0300000, compatible id removed-dma-pool

未对齐的内存:

        fb_reserved: memory@c0000000 {
            reg = <0 0xc0000000 0 0x5f00000>;
            no-map;
        };

2. cma memory对齐要求

4M对齐

https://patchwork.kernel.org/project/linux-arm-kernel/patch/DM2PR0301MB1213832E956A5414482EDD74F3150@DM2PR0301MB1213.namprd03.prod.outlook.com/

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/632538/linux-am5728-cma-page-alignment-for-ipu

0

评论

博主关闭了当前页面的评论