cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dlorych
Visitor
Visitor
397 Views
Registered: ‎09-14-2020

Xen not booting when external DDR4 is included in device tree

Jump to solution

Hi,

I am working on a Petalinux project on a ZCU104, which includes 4 GB of external DDR4. I have got a issue that the kernel is not booting when Xen is enabled and the DDR4 is included in the device tree. If i disable either of them, the kernel boots just fine.

 

The boot hangs after the message "Starting kernel ...". By comparing my build with the Xen build from the ZCU104 BSP, i found out that the device tree (system.dtb) is at fault here. I then decompiled both and compared them. I could get my device tree to work by deleting the following lines:

memory@400000000 {
device_type = "memory";
reg = <0x4 0x0 0x1 0x0>;
};

Note: The DDR4 is also referenced in the amba_pl node, which was not deleted:

amba_pl@0 {
#address-cells = <0x2>;
#size-cells = <0x2>;
compatible = "simple-bus";
ranges;

ddr4@400000000 {
compatible = "xlnx,ddr4-2.2";
reg = <0x4 0x0 0x1 0x0>;
};
};

But both of these segments work fine when Xen is disabled.  Does anyone have an idea why the combination of these does not work? I attached my device tree as well as the BSP device tree below (I had to rename the files because the forum does not allow text files with the .dts format).

 

Thanks for the help.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
dlorych
Visitor
Visitor
354 Views
Registered: ‎09-14-2020

The solution was to rename the second memory node from memory@400000000 to memory_2@400000000. I dont know why this is necessary under Xen, but not necessary when using PetaLinux without Xen.

EDIT:

Or even better, define both memory segments in a single memory node like this:

 

memory {
	device_type = "memory";
	reg = <0x0 0x0 0x0 0x7ff00000
		0x4 0x0 0x1 0x0>;
};

 

This adheres to the specification of device trees, while also working with Xen (unlike the original device tree, which adhered to the specification, while not working with Xen).

View solution in original post

0 Kudos
1 Reply
dlorych
Visitor
Visitor
355 Views
Registered: ‎09-14-2020

The solution was to rename the second memory node from memory@400000000 to memory_2@400000000. I dont know why this is necessary under Xen, but not necessary when using PetaLinux without Xen.

EDIT:

Or even better, define both memory segments in a single memory node like this:

 

memory {
	device_type = "memory";
	reg = <0x0 0x0 0x0 0x7ff00000
		0x4 0x0 0x1 0x0>;
};

 

This adheres to the specification of device trees, while also working with Xen (unlike the original device tree, which adhered to the specification, while not working with Xen).

View solution in original post

0 Kudos