Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 87739fb in mainline


Ignore:
Timestamp:
2012-04-06T20:52:34Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
ea106a6
Parents:
708ec60
Message:

arm32,armv7,paging: Usermode mmio does not need special treatment.

Add some comments explaining memory access mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/mm/page_armv7.h

    r708ec60 r87739fb  
    265265                p->should_be_zero_1 = 0;
    266266                p->domain = 0;
     267                p->ns = 0;
    267268        }
    268269}
     
    293294        }
    294295       
     296        /* tex=0 buf=1 and cache=1 => normal memory
     297         * tex=0 buf=1 and cache=0 => shareable device mmio
     298         */
    295299        p->cacheable = (flags & PAGE_CACHEABLE);
    296        
    297         /* even devices can use bufferable */
    298300        p->bufferable = 1;
    299301        p->tex = 0;
     
    307309        /* default access permission: kernel only*/
    308310        p->access_permission_0 = PTE_AP0_USER_NO_KERNEL_FULL;
    309 
     311       
    310312        if (flags & PAGE_USER) {
    311313                p->access_permission_0 = PTE_AP0_USER_FULL_KERNEL_FULL;
     314                // TODO Fix kernel to use PAGE_WRITE flag properly and
     315                // apply this for kernel pages as well.
    312316                if (!(flags & PAGE_WRITE))
    313317                        p->access_permission_1 = PTE_AP1_RO;
    314                 if (!(flags & PAGE_CACHEABLE)) {
    315                         p->tex = 0x2;
    316                         p->bufferable = 0;
    317                         p->cacheable = 0;
    318                 }
    319318        }
    320319}
Note: See TracChangeset for help on using the changeset viewer.