This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set secondary core's registers from primary arm?

Hi all,

Im working on Keystone II Tci6638k2k(4arm+8dsp) custom design board with u-boot. I understand that how u-boot working.

U-boot gives entry point to other cores. Other cores take program counters with this way. But i want to give core registers too. Is it possible? Can primary arm access secondary arm's registers?

Best Regards.

Srt

Parents
  • Hello,

    you can independently set the register values for each core by using CPU ID register.

    For example, the following code will can be used.

    MRC p15,0,r0,c0,c0,5 @ returns CPU ID register
    and r0,r0,#0x3
    cmp r0,#0
    beq core0_set
    cmp r0,#1
    beq core1_set
    cmp r0,#2
    beq cpre2_set
    cmp r0,,#2
    beq core3_set
    ..........
    
    core0_set:
    <set core0 registers>
    
    core1_set:
    <set core1 registers>
    
    core2_set:
    <set core2 registers>
    
    core3_set:
    <set core3 registers>
    

    Isn't this your intention?

    Best regards,

    Yasuhiko Koumoto.

Reply
  • Hello,

    you can independently set the register values for each core by using CPU ID register.

    For example, the following code will can be used.

    MRC p15,0,r0,c0,c0,5 @ returns CPU ID register
    and r0,r0,#0x3
    cmp r0,#0
    beq core0_set
    cmp r0,#1
    beq core1_set
    cmp r0,#2
    beq cpre2_set
    cmp r0,,#2
    beq core3_set
    ..........
    
    core0_set:
    <set core0 registers>
    
    core1_set:
    <set core1 registers>
    
    core2_set:
    <set core2 registers>
    
    core3_set:
    <set core3 registers>
    

    Isn't this your intention?

    Best regards,

    Yasuhiko Koumoto.

Children
  • Hi,

    in the code you are providing you are able to have different core register setting depending on the core ID. But initial question was a way to set core 1 register from core 2. And that is not possible using any kind of instruction. The only way is to have :

    - core 1 setting Core 2 register value in memory

    - core 2 is having dedicated software in charge of reading this memory to get value and set its own register.

    Br

    Sebastien

  • Hello Sebastien,

    thank you for correcting me. I had misunderstood.

    I think your method would be the most appropriate.

    Best regards,

    Yasuhiko Koumoto.