cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,457 Views
Registered: ‎04-18-2018

Constraining Petalinux to run only on CPU0

Jump to solution

I have set up Petalinux to run the echo_test OpenAMP example on our custom board. I am running Petalinux 2017.3. Our board is a Zynq 7045 design based on the ZC702 board. The example runs fine.

 

However, I am attempting to update code which used the older AMP design described in XAPP1078 to use the newer OpenAMP API described in UG1186. In the old design, Petalinux runs on CPU0 exclusively, and the baremetal app runs on CPU1 exclusively. In the new design Petalinux runs on both CPUs and this cannot be changed. The baremetal app still runs exclusively on CPU1.

 

When I run the command cat /proc/cpuinfo, I can see that Petalinux is using both CPUs. In our design, we need the baremetal app to have the most resources, as it will be doing a lot of work. We want it to have CPU1 all to itself, and we want it to have the majority of the memory (which I also have not figured out, but that is a separate issue).

 

Things I have tried:

  1. Adding maxcpus=1 to the BOOTARGS via petalinux-config. This causes a compile error in rpmsg-user-module and rpmsg-proxy-module.
  2. Turning off Symmetric Processing in petalinux-config -c kernel. However, when I do this, the option for Support ZYNQ remoteproc becomes unavailable. (A bit counter-intuitive to require symmetric processing to do asymmetric processing, but I understand this is needed to initialize some resources for multiple CPUs.)
  3. Setting the number of processors in petalinux-config -c kernel to 1. However, 2 is the lowest allowed number.

How can I tell Petalinux to be constrained to CPU0?

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
1,647 Views
Registered: ‎04-18-2018

Re: Constraining Petalinux to run only on CPU0

Jump to solution

I found this kernel boot arg which seems to do the trick:

 

isolcpus=1

 

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
1,648 Views
Registered: ‎04-18-2018

Re: Constraining Petalinux to run only on CPU0

Jump to solution

I found this kernel boot arg which seems to do the trick:

 

isolcpus=1

 

View solution in original post

0 Kudos