cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
simon_tam_gmail
Contributor
Contributor
628 Views
Registered: ‎08-20-2019

Simple framebuffer ioremap issue

Hi,

   Has anyone try using the simple-framebuffer device driver in Petalinux? I got the following error during boot:


1.332134] WARNING: CPU: 1 PID: 1 at arch/arm64/mm/ioremap.c:58 __ioremap_cal
1.332146] Modules linked in:
1.332157] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.0-xilinx-v2019.2 #1
1.332167] Hardware name: ZynqMP ZCU106 RevA (DT)
1.332177] pstate: 80000005 (Nzcv daif -PAN -UAO)
1.332186] pc : __ioremap_caller+0xc0/0xe8
1.332195] lr : __ioremap_caller+0x50/0xe8
1.332201] sp : ffffff800803baf0
1.332208] x29: ffffff800803baf0 x28: 0000000000000000
1.332218] x27: 0000000000000000 x26: ffffffbefe997528
1.332229] x25: ffffffc87b050080 x24: ffffffc87b053400
1.332239] x23: 00e8000000000f0f x22: ffffff80084f1750
1.332249] x21: 0000000000000000 x20: 0000000060000000
1.332259] x19: 0000000001fa4000 x18: 0000000000000001
1.332269] x17: 0000000000000000 x16: 0000000000000000
1.332279] x15: ffffffffffffffff x14: ffffffffffffffff
1.332288] x13: 0000000000000000 x12: 0000000000000000
1.332298] x11: 0000000000000000 x10: ffffff80091c5240
1.332308] x9 : 0000000000000000 x8 : 000000007ff00000
1.332318] x7 : 0000000000000018 x6 : ffffff80091fed78
1.332328] x5 : ffffff80091fed78 x4 : 0000000000000001
1.332338] x3 : 0000000000000001 x2 : 000000007ff00000
1.332347] x1 : 0000000000000000 x0 : 0000000000000001
1.332358] Call trace:
1.332366] __ioremap_caller+0xc0/0xe8
1.332375] __ioremap+0x10/0x18
1.332386] simplefb_probe+0x230/0x898
1.332395] platform_drv_probe+0x50/0xa0
1.332405] really_probe+0x1c8/0x280
1.332414] driver_probe_device+0x54/0xe8
1.332423] __driver_attach+0xe4/0xe8
1.332432] bus_for_each_dev+0x70/0xc0
1.332441] driver_attach+0x20/0x28
1.332450] bus_add_driver+0x1dc/0x208
1.332458] driver_register+0x60/0x110
1.332466] __platform_driver_register+0x44/0x50
1.332476] simplefb_init+0x20/0x98
1.332484] do_one_initcall+0x74/0x178
1.332494] kernel_init_freeable+0x13c/0x1d4
1.332504] kernel_init+0x10/0xfc
1.332512] ret_from_fork+0x10/0x18
1.332521] ---[ end trace 92b7f7bd7dea3af1 ]---
1.332539] simple-framebuffer: probe of 60000000.framebuffer failed with erro
1.338042] NET: Registered protocol family 2

Below is what I have in the system-user.dtsi. I tried declaring the simple-framebuffer inside of Chosen{} as well as
a regular device. In both cases the result was the same.

/{
chosen {
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;
framebuffer0: framebuffer@60000000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "simple-framebuffer";
reg = <0x60000000 (3840 * 2160 * 4)>;
width = <3840>;
height = <2160>;
stride = <(3840 * 4)>;
format = "a8b8g8r8";
status = "okay";
};
};
};

As far as I can tell the kernel has issue with running ioremap_caller to the target physical address 0x6000000. I tried  other physical address locations and sizes as well. They result was always the same. There is just something it does not like and won't do the address map.

Can someone shed some light what I need to do?

 

thanks,

 

Simon

0 Kudos
2 Replies
thenumberdevil
Explorer
Explorer
447 Views
Registered: ‎04-21-2020

Hi,

        You may have to reserve the memory so that kernel do not allocate the memory for another purpose. I have added my device tree change. Check the same. It works for me.

/ {
#address-cells = <1>;
#size-cells = <1>;

reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;

display_reserved: framebuffer@01400000 {
no-map;
reg = <0x01400000 0x180000>;
};
};
};

0 Kudos
dyessgg
Participant
Participant
83 Views
Registered: ‎01-07-2014

Your address and size entries must be 64 bits in size so you need 2 words for each:

reg = <0x0 0x60000000 0x0 (3840 * 2160 * 4)>;

0 Kudos