Ignore:
Timestamp:
May 29, 2013, 1:24:09 AM (11 years ago)
Author:
alain
Message:

Major evolution to support physical addresses larger than 32 bits.
The map.xml format has been modified: the vsegs associated to schedulers
are now explicitely defined and mapped in the page tables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/boot/reset.S

    r234 r238  
    182182boot_to_kernel_init:
    183183
    184     # all processors initialise SCHED register with boot_schedulers_paddr[pid]
     184    # all processors initialise the CP0 SCHED register
     185    # SCHED contains the schedulers array virtual base address
    185186    mfc0        k0, CP0_PROCID
    186187    andi    k0, k0, 0xFFF
    187188    sll         k0, k0, 2               # k0 <= 4*pid
    188     la          k1, boot_schedulers_paddr
    189     addu    k1, k1, k0          # k1 <= &boot_scheduler_paddr[pid]
    190     lw          k1,     0(k1)           
    191     mtc0        k1, CP0_SCHED
    192 
    193     # all processors initialize PTPR register with boot_ptabs_paddr[0]
     189    la          k1, boot_schedulers
     190    addu    k1, k1, k0          # k1 <= &boot_schedulers[pid]
     191    lw          k0,     0(k1)           
     192    mtc0        k0, CP0_SCHED
     193
     194    # all processors initialize the CP2 PTPR register
     195    # At this stage, all PTPR registers contain the physical base
     196    # address (13 bits right shifted) of the page table for vspace[0]
    194197    la      k1, boot_ptabs_paddr
    195     lw      k1, 0(k1)   
    196     srl     k1, k1, 13
    197     mtc2        k1,     CP2_PTPR       
    198 
    199         # all processors activate MMU
     198    lw      k0, 0(k1)           # k0 <= paddr_lsb
     199    lw      k1, 4(k1)           # k1 <= paddr_msb
     200    srl     k0, k0, 13          # k0 <= paddr_lsb shifted
     201    sll     k1, k1, 19          # k1 <= paddr_msb shifted
     202    or      k0, k0, k1
     203    mtc2        k0,     CP2_PTPR       
     204
     205        # all processors activate MMU (already done for processor 0)
    200206    li      k1, 0xF
    201207    mtc2    k1, CP2_MODE
Note: See TracChangeset for help on using the changeset viewer.