Changes in kernel/arch/ppc32/src/mm/as.c [879585a3:da1bafb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/mm/as.c
r879585a3 rda1bafb 35 35 #include <arch/mm/as.h> 36 36 #include <genarch/mm/as_pt.h> 37 #include <genarch/mm/page_pt.h> 37 38 #include <genarch/mm/asid_fifo.h> 38 39 #include <arch.h> … … 54 55 void as_install_arch(as_t *as) 55 56 { 56 asid_t asid;57 57 uint32_t sr; 58 59 asid = as->asid;60 58 61 59 /* Lower 2 GB, user and supervisor access */ 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 } 60 for (sr = 0; sr < 8; sr++) 61 sr_set(0x6000, as->asid, sr); 69 62 70 63 /* Upper 2 GB, only supervisor access */ 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 } 64 for (sr = 8; sr < 16; sr++) 65 sr_set(0x4000, as->asid, sr); 78 66 } 79 67
Note:
See TracChangeset
for help on using the changeset viewer.