Hi Bharathiraja,

On 20/10/2023 15:50, Bharathiraja Nallathambi wrote:
Hi Ralf,

Thanks for providing the suggestion, with the boot log, we found the below message,

/[    0.045828] psci: no cpu_on method, not booting CPU1/

Hmm.


We went on updating the inmate Linux dts with the following node,

/psci {
compatible = "arm,psci-1.0";
method = "smc";
};/

The device trees are in jailhouse upstream, right? Actually,
'enable-method = "psci";' in the cpu section of the dt was sufficient so far. Maybe this changed to cpu-on? It might be that your change is required for more recent kernel versions.

If so, patches welcome! :-)

Thanks,
  Ralf



Now we are able to see both the CPUs enabled and working as expected

/[    0.003483] CPU1: Booted secondary processor 0x0000000003 [0x410fd083]/

Thanks for the support.

Thanks and Regards,
Bharathiraja Nallathambi

On Wednesday, 11 October 2023 at 01:26:19 UTC+5:30 Ralf Ramsauer wrote:



    On 10/10/2023 17:17, Bharathiraja Nallathambi wrote:
     > Hi,
     >
     > I was trying jailhouse with a linux inmate on an imx8mp-evk board. I
     > have created a yocto build with jailhouse and linux kernel
    6.1.22-rt8
     > which is having the patches for real time linux.
     > Booted the board with running run '/jh_mmcboot/' in the uboot
    prompt.
     >
>  Once logged into the device, I have started the jailhouse by running,
     >
     > /cd /usr/share/jailhouse/scripts && ./init_jailhouse_env.sh && cp
     > /run/media/boot-mmcblk1p1/Image
    /usr/share/jailhouse/inmates/kernel/ &&
     > ../tools/jailhouse enable ../cells/imx8mp.cell; jailhouse cell
    list;/
     >
     >  the above command will load the jailhouse.ko and will enable the
    jailhouse
     >
     > I got the output of 'jailhouse cell list' as,
     > /root@imx8mp-lpddr4-evk:/usr/share/jailhouse/scripts# jailhouse
    cell list
     > ID      Name                    State             Assigned
     > CPUs           Failed CPUs
     > 0       imx8mp                  running           0-3 /
     >
     >  Then I started the linux inmate, the CPU offset in the cell
     > configuration is 0xc which will assign two cores. I am using the
    same
     > host kernal image for the inmate also (6.1.22-rt8). Used the below
     > command to start the inmate
     >
     > ../tools/jailhouse cell linux ../cells/imx8mp-linux-demo.cell
     > ../inmates/kernel/Image -d ../inmates/dtb/inmate-imx8mp-evk.dtb -c
     > "clk_ignore_unused console=ttymxc3,115200
     > earlycon=ec_imx6q,0x30890000,115200 root=/dev/mmcblk2p2 rootwait
    rw";
     > jailhouse cell list;
     >
     >  I got the output of 'jailhouse cell list' as,
     >
     > /root@imx8mp-lpddr4-evk:/usr/share/jailhouse/scripts# jailhouse
    cell list
     > ID      Name                    State             Assigned
     > CPUs           Failed CPUs
     > 0       imx8mp                  running           0-1
     > 1       linux-inmate-demo       running           2-3 /
     >
     >  I could login to the inmate using serial console. But the output of
     > 'cat /proc/cpuinfo' is showing only one core.
     >
     > /root@imx8mp-lpddr4-evk:~# cat /proc/cpuinfo
     > processor       : 0
     > BogoMIPS        : 16.66
     > Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
     > CPU implementer : 0x41
     > U architecture: 8
     > CPU variant     : 0x0
     > CPU part        : 0xd03
     > CPU resion      : 4/
     >
     > the 'nproc --all' is giving 2
     >
     >  It looks like 2 cores are assigned to the inmate but one of the
    core
     > is offline.
     >
     > / root@imx8mp-lpddr4-evk:/usr/share/jailhouse/scripts# cat
     > /sys/devices/system/cpu/cpu0/online /
     >
     > /1
     > root@imx8mp-lpddr4-evk:/usr/share/jailhouse/scripts# cat
     > /sys/devices/system/cpu/cpu1/online
     > 0/
     >
     >  Am I doing something wrong? How can I turn on both the CPUS for the
     > inmate.

    What does the non-root Linux kernel console output during boot? Are
    there any error messages that might give you a hint why bringing up
    secondary CPUs failed?

    Ralf

     >
     > Thanks and Regards,
     > Bharathiraja Nallathambi
     >
     > --
     > You received this message because you are subscribed to the Google
     > Groups "Jailhouse" group.
     > To unsubscribe from this group and stop receiving emails from it,
    send
     > an email to jailhouse-de...@googlegroups.com
     > <mailto:jailhouse-de...@googlegroups.com>.
     > To view this discussion on the web visit
     >
    
https://groups.google.com/d/msgid/jailhouse-dev/CAGA%3DGbzmH9eiuBrKjVeeKf--5fRFVGxwyCe6D20e4MDn66d3tw%40mail.gmail.com
 
<https://groups.google.com/d/msgid/jailhouse-dev/CAGA%3DGbzmH9eiuBrKjVeeKf--5fRFVGxwyCe6D20e4MDn66d3tw%40mail.gmail.com>
 
<https://groups.google.com/d/msgid/jailhouse-dev/CAGA%3DGbzmH9eiuBrKjVeeKf--5fRFVGxwyCe6D20e4MDn66d3tw%40mail.gmail.com?utm_medium=email&utm_source=footer
 
<https://groups.google.com/d/msgid/jailhouse-dev/CAGA%3DGbzmH9eiuBrKjVeeKf--5fRFVGxwyCe6D20e4MDn66d3tw%40mail.gmail.com?utm_medium=email&utm_source=footer>>.

--
You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscr...@googlegroups.com <mailto:jailhouse-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/4cf5731e-a3ff-47ca-a1d7-c4f11a9e096bn%40googlegroups.com <https://groups.google.com/d/msgid/jailhouse-dev/4cf5731e-a3ff-47ca-a1d7-c4f11a9e096bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/f882f247-b4b7-44f3-a820-235c30453d7c%40oth-regensburg.de.

Reply via email to