UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
3,849 Views
Registered: ‎02-07-2008

PetaLinux boot error on KCU105 simple design

Jump to solution

Hi,

 

I'm getting an error when PetaLinux boots on a very basic design for the KCU105 board. I'm using Vivado 2016.4 and PetaLinux 2016.4. To reproduce the error:

 

1. Create a new Vivado design for the KCU105 board.

2. Create a block design.

3. Add DDR4, use block automation.

4. Add Microblaze, use block automation (ECC, 128K mem, 64K cache, interrupts enabled) and connection automation (cached interface to DDR4), then reconfigure Microblaze for "Linux with MMU".

5. Add Timer, UART and use the block and connection automations. Connect the interrupts.

6. Generate bitstream and export hardware.

7. Create PetaLinux project from the exported hardware, build and boot via JTAG (ie. no kernel or rootfs changes necessary):

 

petalinux-create --type project --template microblaze --name kcu105_base
cd kcu105_base
petalinux-config --get-hw-description ../../Vivado/kcu105_base/kcu105_base.sdk/
petalinux-build
petalinux-boot --jtag --fpga --bitstream ../../Vivado/kcu105_base/kcu105_base.runs/impl_1/design_1_wrapper.bit
petalinux-boot --jtag --kernel

When PetaLinux boots, everything appears normal until it produces the following error, followed by a pause (minutes), followed by a similar error message, and the process repeats itself. It never gets to the login prompt.

 

...<ABOVE LINES REMOVED FOR BREVITY>...
Freeing unused kernel memory: 4424K (c04e0000 - c0932000)
This architecture does not have kernel memory protection.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 59 at /home/jeffrey/projects/fpga-drive-aximm-pcie/PetaLinux/kcu105_base/build/tmp/work-shared/plnx_microblaze/kernel-source/arch/microblaze/kernel/cpu/cache.c:408 __invalidate_dcache_range_nomsr_wt+0x90/0xa4
Modules linked in:
CPU: 0 PID: 59 Comm: init Not tainted 4.6.0-xilinx #2
Kernel Stack:
ef273d58: c000cde4 c09368e0
ef273d60: 00000000 ccceccec c03a4158 00000000 c03aedd8 c000cea4 c03b14b4 00000000
ef273d80: 0000003b c03aedd8 00000198 c0004538 ffffe000 00001fe0 ef250b40 00000000
ef273da0: ffffe492 480234e4 c0004538 c4cccccc c03a40b0 cccccccc c00a2614 ef258b94
...<LINES REMOVED FOR BREVITY>...
ef273fa0: 00000000 480e1cd8 00000000 480e1cec 7ffff000 bf93494c 4819cff4 481a1470 ef273fc0: 00000000 bf93495c 00000000 00000000 00000003 00000000 00000000 00000000 ef273fe0: 00000000 00000000 480e1cec 000056a2 480234e4 00000490 00000000 00000000 Call Trace: [<c00040b8>] microblaze_unwind+0x64/0x7c [<c0003db0>] show_stack+0xe0/0x164 [<c01f04a4>] dump_stack+0x20/0x38 [<c000cde0>] __warn+0x104/0x130 [<c000cea0>] warn_slowpath_null+0x10/0x28 [<c0004534>] __invalidate_dcache_range_nomsr_wt+0x8c/0xa4 [<c00a27c8>] wp_page_copy.isra.7+0x200/0x5a4 [<c00a6194>] handle_mm_fault+0xaf8/0x147c [<c0007c2c>] do_page_fault+0x214/0x4e0 [<c0006684>] page_fault_instr_trap+0x184/0x190 ---[ end trace b4640244dc2224d8 ]---

The message seems to indicate that this is a cache problem.

 

I have experimented with different cache settings to prevent the error from occurring but so far, I've found only one thing that had an effect: When I reduce the DDR4 address range from 2GB to 1GB by changing the base address HIGH to 0xBFFFFFFF, the error does not happen. I don't regard this as a solution because I want to use the entire 2GB of RAM. I would also prefer not to disable the cache.

 

I have tested the KCU105 BSP on my hardware and it works fine and without error.

 

I have attached the complete boot log to this post.

 

I would appreciate any ideas or advice. Thanks.

 

Jeff

 

 

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
4,961 Views
Registered: ‎08-31-2016

Re: PetaLinux boot error on KCU105 simple design

Jump to solution

I had a very similar problem trying to create a BSP for the VCU108 board.  I was able to figure out a solution by closely comparing my Petalinux project to the one that comes with the out-of-the-box KCU105 BSP.  The secret ingredient is in the file/recipe meta-user/recipes-kernel/linux/linux-xlnx/bsp.cfg:

 

CONFIG_TMPFS=y

 

Try adding/creating this recipe in your meta-user.  If you need guidance, examine the project that comes with the 2016.4 KCU105 BSP available for download.

 

 

0 Kudos
6 Replies
3,730 Views
Registered: ‎02-07-2008

Re: PetaLinux boot error on KCU105 simple design

Jump to solution

Any help on this from someone who has successfully run PetaLinux on the KCU105 board would be much appreciated.

 

Thank you.

 

Jeff

 

0 Kudos
Moderator
Moderator
3,697 Views
Registered: ‎04-17-2011

Re: PetaLinux boot error on KCU105 simple design

Jump to solution
Does qemu show a better result:

petalinux-boot --qemu --kernel

Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
4,962 Views
Registered: ‎08-31-2016

Re: PetaLinux boot error on KCU105 simple design

Jump to solution

I had a very similar problem trying to create a BSP for the VCU108 board.  I was able to figure out a solution by closely comparing my Petalinux project to the one that comes with the out-of-the-box KCU105 BSP.  The secret ingredient is in the file/recipe meta-user/recipes-kernel/linux/linux-xlnx/bsp.cfg:

 

CONFIG_TMPFS=y

 

Try adding/creating this recipe in your meta-user.  If you need guidance, examine the project that comes with the 2016.4 KCU105 BSP available for download.

 

 

0 Kudos
3,545 Views
Registered: ‎06-10-2015

Re: PetaLinux boot error on KCU105 simple design

Jump to solution

I am getting this exact issue on a VC709 with Microblaze, also 2 GiB of memory. 

However, the dump does not actually affect the system. I am still able to type the login credentials and the system is responsive and logs me in. 

Have you tried typing into the console regardless of the above message? 

0 Kudos
Moderator
Moderator
3,482 Views
Registered: ‎04-17-2011

Re: PetaLinux boot error on KCU105 simple design

Jump to solution
We have the pre-built images available with KCU105 BSP and it comes with a system.dtb. You can use dtc compiler from linux-xlnx source to convert that to .dts and compare it with the one generated by your custom project. You can adjust it accordingly and try. Also, please try it on Board and see if you are seeing the same panic.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
2,129 Views
Registered: ‎02-07-2008

Re: PetaLinux boot error on KCU105 simple design

Jump to solution

Thanks @andrewkrenz for the solution!

 

After trying so many things to fix this, I tried enabling CONFIG_TMPFS in the kernel config as suggested by andrewkrenz and that eliminated the problem. You can either add the recipe in meta-user/recipes-kernel/linux/linux-xlnx or you can run:

 

petalinux-config -c kernel

 

And then enable: File systems->Pseudo filesystems->Tmpfs virtual memory file system support (former shm fs)

 

Why is it necessary? I have no idea, but I did find this single reference that seems to indicate that the CONFIG_TMPFS should be enabled for KCU105 designs:

 

https://www.xilinx.com/Attachment/README.txt

 

Sorry to others for taking so long to close this post.

 

Jeff

 

0 Kudos