pdeval = (linaddr & ARM_VM_SECTION_MASK)
| ARM_VM_SECTION
| ARM_VM_SECTION_DOMAIN
- | ARM_VM_SECTION_WT
+ | ARM_VM_SECTION_DEVICE
| ARM_VM_SECTION_USER;
}
char *device_mem;
+/* defined in kernel.lds */
extern char usermapped_start, usermapped_end, usermapped_nonglo_start;
int arch_phys_map(const int index,
if((r=pt_writemap(vmprocess, pt, loc, p, VM_PAGE_SIZE*pages,
ARCH_VM_PTE_PRESENT | ARCH_VM_PTE_USER | ARCH_VM_PTE_RW
#if defined(__arm__)
- | ARM_VM_PTE_WB
+ | ARM_VM_PTE_WT
#endif
, 0)) != OK) {
printf("vm_mappages writemap failed\n");
#if defined(__arm__)
else
flags |= ARCH_VM_PTE_RO;
- flags |= ARM_VM_PTE_WB | ARM_VM_PTE_S ; // LSC FIXME
+ flags |= ARM_VM_PTE_WT ;
#endif
/* Update flags. */
#elif defined(__arm__)
if((r=pt_writemap(dst_vmp, &dst_vmp->vm_pt, viraddr, physaddr, ARCH_PAGEDIR_SIZE,
ARCH_VM_PTE_PRESENT | ARCH_VM_PTE_USER |
- ARM_VM_PTE_WB | ARM_VM_PTE_S, //LSC FIXME
+ ARM_VM_PTE_WT ,
#endif
WMF_OVERWRITE)) != OK) {
return r;
if((r=pt_writemap(dst_vmp, &dst_vmp->vm_pt, viraddr, physaddr, VM_PAGE_SIZE,
ARCH_VM_PTE_PRESENT | ARCH_VM_PTE_USER | ARCH_VM_PTE_RW
#ifdef __arm__
- | ARM_VM_PTE_WB
+ | ARM_VM_PTE_WT
#endif
,
WMF_OVERWRITE)) != OK) {
/* If we expect a writable page, allow a readonly page. */
maskedentry &= ~ARCH_VM_PTE_RO;
}
+ maskedentry &= ~(ARM_VM_PTE_WB|ARM_VM_PTE_WT);
#endif
if(maskedentry != entry) {
printf("pt_writemap: mismatch: ");
pt->pt_dir[kern_pde] = (addr & ARCH_VM_PDE_MASK)
| ARM_VM_SECTION
| ARM_VM_SECTION_DOMAIN
- | ARM_VM_SECTION_WB
+ | ARM_VM_SECTION_WT
| ARM_VM_SECTION_SUPER;
#endif
kern_pde++;
assert(!pt->pt_dir[map_pde]);
pt->pt_dir[map_pde] = addr |
ARM_VM_SECTION | ARM_VM_SECTION_DOMAIN |
- ARM_VM_SECTION_WB |
- ARM_VM_SECTION_SHAREABLE |
+ ARM_VM_SECTION_DEVICE |
ARM_VM_SECTION_SUPER;
addr += ARCH_BIG_PAGE_SIZE;
}
#if defined(__arm__)
if (pb->phys >= 0x80000000 && pb->phys < (0xc0000000 - VM_PAGE_SIZE)) {
// LSC Do this only for actual RAM
- flags |= ARM_VM_PTE_WT;
+ // KEJO:fishy will need to look into this
+ flags |= ARM_VM_PTE_DEVICE;
}
#endif