AnsweredAssumed Answered

How do I change CCSBAR on P4080 CPU.

Question asked by Hyenongi Jeong on Mar 10, 2016
Latest reply on Mar 10, 2016 by Hyenongi Jeong

This is my source code in "rominit.s" (vxWorks BSP)

Then our board is not booted.

How do I modify this code?

 

#define CCSBAR_RESET     0xFE000000

#define CCSBAR                    0xE0000000

 

/* set to ccsbar_reset in LAWBARL8 */

    WRITEADR(r6, r7, P4080_LAWBARL8(CCSBAR_RESET), CCSBAR)

    sync

    WRITEADR(r6, r7, P4080_LAWAR8(CCSBAR_RESET), (LAWAR_ENABLE | LAWAR_TGTIF_RESERVE | LAWAR_SIZE_16MB) )

    LOADVAR(r7, P4080_LAWAR8(CCSBAR_RESET))

    isync    /* ensure LAWAR8 is set */

 

 

  /* get to CCSBAR_H */

    lis     r7, HI(CCSBAR_RESET)

    ori     r7, r7, LO(CCSBAR_RESET)

    lwz     r4, (CCSRBARH_OFFSET)(r7) /* CCSRBARH_OFFSET: 0x0 */

 

 

  /* get to CCSBAR_L */

    lis     r7, HI(CCSBAR_RESET)

    ori     r7, r7, LO(CCSBAR_RESET)

    lwz     r4, (CCSRBARL_OFFSET)(r7) /* CCSRBARL_OFFSET: 0x4 */

 

 

    lis     r6, HI(CCSBAR)

    ori     r6, r6, LO(CCSBAR)

 

 

    xor     r5, r5, r5

    

    lis     r7, HI(CCSBAR_RESET)

    ori     r7, r7, LO(CCSBAR_RESET)

    stw     r5,(CCSRBARH_OFFSET)(r7) /* *(CCSBAR_RESET + CCSRBARH_OFFSET) = r5 */

    stw     r6,(CCSRBARL_OFFSET)(r7) /* *(CCSBAR_RESET + CCSRBARL_OFFSET) = r6 */

    sync

 

 

    lis     r5,HI(CCSBAR_COMMIT)

    ori     r5,r5, LO(CCSBAR_COMMIT)

    stw     r5,(CCSRAR_OFFSET)(r7)

    sync

 

 

 

 

  /* set to clear in LAWBARL8 */

 

 

    WRITEADR(r6, r7, P4080_LAWBARL8(CCSBAR), 0x0)

    sync

    WRITEADR(r6, r7, P4080_LAWAR8(CCSBAR), 0x0)

    LOADVAR(r7, P4080_LAWAR8(CCSBAR))

    isync    /* ensure LAWAR8 is set */

Outcomes