Before setting the new TTB wbinv the caches.

This commit is contained in:
matt 2012-09-06 02:03:01 +00:00
parent 275f798852
commit ec9cb30b6d

View File

@ -1,4 +1,4 @@
/* $NetBSD: arm32_kvminit.c,v 1.2 2012/09/05 00:20:57 matt Exp $ */
/* $NetBSD: arm32_kvminit.c,v 1.3 2012/09/06 02:03:01 matt Exp $ */
/*
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
@ -122,7 +122,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.2 2012/09/05 00:20:57 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.3 2012/09/06 02:03:01 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -861,10 +861,11 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_base, vaddr_t vectors, vaddr_t iovbase,
/* Switch tables */
#ifdef VERBOSE_INIT_ARM
printf("switching to new L1 page table @%#lx...", l1pt_pa);
printf("switching to new L1 page table @%#lx...", l1pt_pa);
#endif
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
cpu_idcache_wbinv_all();
cpu_setttb(l1pt_pa);
cpu_tlb_flushID();
cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));