This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM572x deactivation of one CortexA15 core

Other Parts Discussed in Thread: AM5728

Hello,

I working on an AM5728 board (include 2 CortexA15 core).

Actually, my Linux working on the two CortexA15 Core.

I need to unactivate one core.

I already read Technical Reference Manual available on TI website.

I seen on page 1637 than I need to set two registers for disable CPU 1 core : 

   -Register PM_CPU1_PWRSTCTRL

         - Bit 7 (FORCED_OFF) shall be placed at 0x1 (Whole logic is forced in OFF state)

         - Bits 1-0 (POWERSTATE) shall be placed at 0x0 (OFF state)

But I don't know how to change registers values ?

Could you explain me how do that

Thank you

Regards

Nicolas

  • Hi,
    In the post you mentioned which describe how to disable CPU1 with the linux sysfs.

    If I want to disable CPU1 directly when system boot up. How can I do?
    Do I need to modify PM_CPU1_PWRSTCTRL register in the dts file?
    But I can't find any CPU1 setting in the dts. Can anyone give an example ? Or there is other way to disable CPU1?

    Thanks in advanced.
    AC
  • Hi,

    One possibility is to disable the SMP from your defconfig file. This is tested & results in registering (bringing up) only one CPU core in the kernel.

    Another one is to hardcode the number of cpus in kernel/smp.c, I am currently testing this.

    Best Regards,
    Yordan

  • Hello,

    Finally I found a way to disabled CPU 1 directly from the Linux.

    In fact, when the system is started, if you enter this following command the CPU 1 shall be disabled : 

    root@am57xx-evm:~# echo 0 > /sys/device/system/cpu/cpu1/online

    Basically, this command write a 0 in CPU1 online file.

    For verify the well application of the command, you can enter this command : 

    root@am57xx-evm:~# cat /proc/cpuinfo

    Only infos on CPU0 are available.

    To re-activate CPU1, enter the opposite command : 

    root@am57xx-evm:~# echo 1 > /sys/device/system/cpu/cpu1/online

    Regards

    Nicolas

  • Hi Nicolas,

    This is exactly what Biser suggested.

    Best Regards,
    Yordan

  • Hi AC,

    I validated the hardcoding of number of cpus activated. So besides the sysfs, and disabling the SMP, you can do the following:

       In kernel/smp.c, you can set:

               unsigned int setup_max_cpus=1;

        instead using the default setting: unsigned int setup_max_cpus=NR_CPUS;

    As a result the kernel bootlog is:

    [    0.050075] Brought up 1 CPUs                                                                                                                          

    [    0.050086] SMP: Total of 1 processors activated (12.29 BogoMIPS).                                                                                      

    [    0.050094] CPU: All CPU(s) started in SVC mode.

    And cat /proc/cpuinfo prints:

    root@am57xx-evm:~# cat /proc/cpuinfo                                                                                                                      

    processor       : 0                                                                                                                                        

    model name      : ARMv7 Processor rev 2 (v7l)                                                                                                              

    BogoMIPS        : 12.29                                                                                                                                    

    Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm                                                        

    CPU implementer : 0x41                                                                                                                                    

    CPU architecture: 7                                                                                                                                        

    CPU variant     : 0x2                                                                                                                                      

    CPU part        : 0xc0f                                                                                                                                    

    CPU revision    : 2                                                                                                                                        

    Hardware        : Generic DRA74X (Flattened Device Tree)                                                                                                  

    Revision        : 0000                                                                                                                                    

    Serial          : 0000000000000000                                                                                                                        

    However, you'll need to modify all the applications in your filesystem that require SMP (and two cpu cores).

    Best Regards,

    Yordan

  • Hi, 

    Thanks a lot for your support !

    I 'll try the last solution (smp.c) tomorrow.

    Nicolas