summaryrefslogtreecommitdiff
path: root/i386/intel
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-11-11 02:24:18 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:20 +0200
commitaa3780032d1da66a1d0990ae519cc1f5d975d0e6 (patch)
tree1316f73db1716a311cdd519992fbfd8885d9e9e3 /i386/intel
parenta652906986e061b69fee367ff20a87d2a6b16dd3 (diff)
2008-11-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386/i386/i386asm.sym (PTE_SIZE): New assembly macro. * i386/i386/locore.S (copyout_retry): take PTE_SIZE into account. * i386/intel/pmap.c (pmap_bootstrap, pmap_create): Use WRITE_PTE instead of dereference.
Diffstat (limited to 'i386/intel')
-rw-r--r--i386/intel/pmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index a648592..697e5f8 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -589,7 +589,7 @@ void pmap_bootstrap()
{
int i;
for (i = 0; i < PDPNUM; i++)
- kernel_pmap->pdpbase[i] = pa_to_pte((vm_offset_t) kernel_pmap->dirbase + i * INTEL_PGBYTES) | INTEL_PTE_VALID;
+ WRITE_PTE(&kernel_pmap->pdpbase[i], pa_to_pte((vm_offset_t) kernel_pmap->dirbase + i * INTEL_PGBYTES) | INTEL_PTE_VALID);
}
#else /* PAE */
kernel_pmap->dirbase = kernel_page_dir = (pt_entry_t*)pmap_grab_page();
@@ -625,8 +625,8 @@ void pmap_bootstrap()
pt_entry_t *pte;
/* Initialize the page directory entry. */
- *pde = pa_to_pte((vm_offset_t)ptable)
- | INTEL_PTE_VALID | INTEL_PTE_WRITE | global;
+ WRITE_PTE(pde, pa_to_pte((vm_offset_t)ptable)
+ | INTEL_PTE_VALID | INTEL_PTE_WRITE);
/* Initialize the page table. */
for (pte = ptable; (va < phys_last_addr) && (pte < ptable+NPTES); pte++)
@@ -887,7 +887,7 @@ pmap_t pmap_create(size)
{
int i;
for (i = 0; i < PDPNUM; i++)
- p->pdpbase[i] = pa_to_pte(kvtophys((vm_offset_t) p->dirbase + i * INTEL_PGBYTES)) | INTEL_PTE_VALID;
+ WRITE_PTE(&p->pdpbase[i], pa_to_pte(kvtophys((vm_offset_t) p->dirbase + i * INTEL_PGBYTES)) | INTEL_PTE_VALID);
}
#endif /* PAE */