[技术问答] MA35D1 IoT reserved-memory 不一样

[复制链接]
502|1
 楼主| 两只袜子 发表于 2023-7-4 09:05 | 显示全部楼层 |阅读模式
使用128M和512M的内核配置都是一样的,内核里都不包含显示驱动,设备树里除了内存地址范围不同,其他也都相同。128M的保留内存只有19980k,不知道512M的reserved-memory为什么117404K,请问要如何调整reserved-memory?
128M:
5737564a37026146f4.png
512M:
3241564a37033ebd31.png

riplay 发表于 2023-7-5 08:45 | 显示全部楼层
把设备树里面reserved-memory删除display相关内容

output/build/linux-custom/arm64/boot/dts/nuvoton/ma35d1.dtsi

把以下内容

        reserved-memory {

                #address-cells = <2>;

                #size-cells = <2>;

                ranges;

                display_buf: display_buf@0 {

                        reg = <0x0 0x8C800000 0x0 0x3000000>; /* 48MiB */

                        no-map;

                };

                vc8k_buf: vc8k_buf@0 {

                        reg = <0x0 0x8A800000 0x0 0x2000000>; /* 32MiB */

                        no-map;

                };

                gc520l_buf: gc520l_buf@0 {

                        reg = <0x0 0x8A000000 0x0 0x800000>; /* 8MiB */

                        no-map;

                };

                rproc_buf: rproc_buf@0 {

                        reg = <0x0 0x80020000 0x0 0x60000>; /* 384KB */

                        no-map;

                };

        };

修改成

        reserved-memory {

                #address-cells = <2>;

                #size-cells = <2>;

                ranges;

                rproc_buf: rproc_buf@0 {

                        reg = <0x0 0x80020000 0x0 0x60000>; /* 384KB */

                        no-map;

                };

        };





同时需要修改内核Makefile

output/build/linux-custom/arch/arm64/boot/dts/nuvoton/Makefile

把以下内容:

# SPDX-License-Identifier: GPL-2.0

dtb-$(CONFIG_ARCH_MA35D1)    += ma35d1-iot-128m.dtb \

                                ma35d1-iot-256m.dtb \

                                ma35d1-iot-512m.dtb \

                                ma35d1-som-256m.dtb \

                                ma35d1-som-512m.dtb \

                                ma35d1-som-1g.dtb



always          := $(dtb-y)

clean-files     := *.dtb



修改成:

# SPDX-License-Identifier: GPL-2.0

dtb-$(CONFIG_ARCH_MA35D1)    += ma35d1-iot-512m.dtb



always          := $(dtb-y)

clean-files     := *.dtb

您需要登录后才可以回帖 登录 | 注册

本版积分规则

2122

主题

8121

帖子

11

粉丝
快速回复 在线客服 返回列表 返回顶部