Open balaji-ch opened 3 years ago
Thank you for the issue.
What kind of DTS do you use?
What arguments does the dd command specify?
The DTS is as follows
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x40000000>;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
image_buf0: img_buf@0xbc000000 {
compatible = "shared-dma-pool";
no-map;
reg = <0x0 0xbc000000 0x0 0x4000000>;
};
udmabuf@0 {
compatible = "ikwzm,u-dma-buf";
device-name = "udmabuf0";
size = <0x04000000>; // 64MiB
memory-region = <&image_buf0>;
};
The command is as follows
dd if=/dev/udmabuf0 bs=1 count=1024 skip=3154116608
Hey I am able to resolve it by
dd if=/dev/udmabuf0 bs=1 count=1024 skip=0
But when I use it like this
dd if=/dev/mem bs=1 count=1024 skip=0
or
dd if=/dev/mem bs=1 count=1024 skip=3154116608
I get error reading /dev/mem/ : Bad address
3154116608 is 0xbc000000
/dev/udmabuf is treated as a file of the size specified by the size property. An error will occur if you specify an area that exceeds the size.
I don't know why /dev/mem fails.
Hi,
Is there a way to check that memory allocated is contagious?
For example, in Ubuntu VM (CMA enabled and disabled CONFIG_STRICT_DEVMEM)
I could test this by dumping the physical memory from the ubuntu vm as
sudo dd if=/dev/mem bs=1 count=8388608 skip=9057599488
But on an embedded board where I reserved the memory via DTS (instead of CMA) and when tested in the similar fashion it says dd: /dev/udmabuf0: cannot skip invalid argument