Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/as.c

    rda1bafb r879585a3  
    3535#include <arch/mm/as.h>
    3636#include <genarch/mm/as_pt.h>
    37 #include <genarch/mm/page_pt.h>
    3837#include <genarch/mm/asid_fifo.h>
    3938#include <arch.h>
     
    5554void as_install_arch(as_t *as)
    5655{
     56        asid_t asid;
    5757        uint32_t sr;
     58
     59        asid = as->asid;
    5860       
    5961        /* Lower 2 GB, user and supervisor access */
    60         for (sr = 0; sr < 8; sr++)
    61                 sr_set(0x6000, as->asid, sr);
     62        for (sr = 0; sr < 8; sr++) {
     63                asm volatile (
     64                        "mtsrin %0, %1\n"
     65                        :
     66                        : "r" ((0x6000 << 16) + (asid << 4) + sr), "r" (sr << 28)
     67                );
     68        }
    6269       
    6370        /* Upper 2 GB, only supervisor access */
    64         for (sr = 8; sr < 16; sr++)
    65                 sr_set(0x4000, as->asid, sr);
     71        for (sr = 8; sr < 16; sr++) {
     72                asm volatile (
     73                        "mtsrin %0, %1\n"
     74                        :
     75                        : "r" ((0x4000 << 16) + (asid << 4) + sr), "r" (sr << 28)
     76                );
     77        }
    6678}
    6779
Note: See TracChangeset for help on using the changeset viewer.