Print this page
loader: allow 1MB device maps
There's no reason we shouldn't allow 1MB PTEs for use on device memory.
*** 161,175 ****
if (ARMPT_L1E_ISVALID(*pte))
fakeload_panic("armboot_mmu: asked to map a mapped region!\n");
l1e = (arm_l1s_t *)pte;
*pte = 0;
l1e->al_type = ARMPT_L1_TYPE_SECT;
! /* Assume it's not device memory */
l1e->al_bbit = 1;
l1e->al_cbit = 1;
l1e->al_tex = 1;
l1e->al_sbit = 1;
if (!(prot & PF_X))
l1e->al_xn = 1;
l1e->al_domain = 0;
--- 161,182 ----
if (ARMPT_L1E_ISVALID(*pte))
fakeload_panic("armboot_mmu: asked to map a mapped region!\n");
l1e = (arm_l1s_t *)pte;
*pte = 0;
l1e->al_type = ARMPT_L1_TYPE_SECT;
!
! if (prot & PF_DEVICE) {
! l1e->al_bbit = 1;
! l1e->al_cbit = 0;
! l1e->al_tex = 0;
! l1e->al_sbit = 1;
! } else {
l1e->al_bbit = 1;
l1e->al_cbit = 1;
l1e->al_tex = 1;
l1e->al_sbit = 1;
+ }
if (!(prot & PF_X))
l1e->al_xn = 1;
l1e->al_domain = 0;