A TLB question

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Hello all,

I am trying to load monta vista linux on my walnut ppc405 board. Since
I want to use both LED (address is 0xF0000030) and UART1 (address
EF600400) for debug, I have to add two TLB entries in initial_mmu
(kernel/head_ppc4xx.S). The code I added as below:

    /* Set up a TLB for LEB controller */
    #define ASIC_BASE 0xF0000000
    lis r3, ASIC_BASE@h
    addi r3, r3, ASIC_BASE@l

    ori r4, r3, 0

    clrrwi r4, r4, 10
    ori r4, r4, (TLB_WR | TLB_EX | TLB_I | TLB_G)

    clrrwi  r3,r3,10        /* Mask off the effective page number */
    ori r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_1K))

    li r0, 12

    tlbwe r4, r0, TLB_DATA
    tlbwe r3, r0, TLB_TAG
 


    /* Set up a TLB for UART controller */
    lis r3, UART0_BASE@h
    addi r3, r3, UART0_BASE@l

    ori r4, r3, 0

    clrrwi r4, r4, 10
    ori r4, r4, (TLB_WR | TLB_EX | TLB_I | TLB_G)

    clrrwi  r3,r3,10        /* Mask off the effective page number */
    ori r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K))

    li r0, 11

    tlbwe r4, r0, TLB_DATA
    tlbwe r3, r0, TLB_TAG
 

For some reason, if I set up TLB for the LED only, the LED works fine.
But if I add TLB entry 11 for the UART, the LED doesn't work. Does
anyone can give me any clue what's happening here?


Thanks,
Frank

Site Timeline