0
我正在使用512M啓動時間分配內存的特定編碼器。我應該通過dts文件配置分配內存。物理內存分爲低和高爲下文DTS文件:使用dts配置分配啓動時間內存
/* 256MB at 0x0 */
[email protected] {
device_type = "memory";
reg = <0x0 0x00000000 0x0 0x10000000>;
};
/* 2GB at 0x8010000000 */
[email protected] {
device_type = "memory";
reg = <0x80 0x10000000 0x0 0x80000000>;
};
現在我想從分配高端內存劃分出內存的啓動時間。我能想到創建一個DTS條目下面
encoder: [email protected] {
compatible = "xyz, abc";
reg= <0x0 0x80000000 0x0 0x20000000>;
}
這裏編碼器@ xxxx是實際的設備條目,並且它已經下面一組寄存器區域:
encoder: [email protected]{
compatible = "xyz, abc";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x0 0xxxxxxxxxx 0x0 0x1234>;
status = "disabled";
};
所以加入後分隔內存條目看起來像這樣:
encoder: [email protected]{
compatible = "xyz, abc";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x0 0xxxxxxxxxx 0x0 0x1234>;
reg= <0x0 0x80000000 0x0 0x20000000>;
status = "disabled";
};
這項工作?我不確定驅動程序代碼是如何知道內存的起始地址和內存大小的? 任何人都可以請幫忙嗎?
謝謝。