Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include/arm32 Deal with large page mappings in ...
details: https://anonhg.NetBSD.org/src/rev/7f2973c07109
branches: trunk
changeset: 328337:7f2973c07109
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Mar 31 18:33:21 2014 +0000
description:
Deal with large page mappings in l2pte_set.
Now the RPI can get passed setting the new TTB.
ok matt@
diffstat:
sys/arch/arm/include/arm32/pmap.h | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diffs (37 lines):
diff -r 22ec6354d6bf -r 7f2973c07109 sys/arch/arm/include/arm32/pmap.h
--- a/sys/arch/arm/include/arm32/pmap.h Mon Mar 31 18:18:45 2014 +0000
+++ b/sys/arch/arm/include/arm32/pmap.h Mon Mar 31 18:33:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.128 2014/03/31 01:48:37 matt Exp $ */
+/* $NetBSD: pmap.h,v 1.129 2014/03/31 18:33:21 skrll Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -545,14 +545,20 @@
static inline void
l2pte_set(pt_entry_t *ptep, pt_entry_t pte, pt_entry_t opte)
{
- for (size_t k = 0; k < PAGE_SIZE / L2_S_SIZE; k++) {
- KASSERTMSG(*ptep == opte, "%#x [*%p] != %#x", *ptep, ptep, opte);
- *ptep++ = pte;
- pte += L2_S_SIZE;
- if (opte)
- opte += L2_S_SIZE;
+ if (l1pte_lpage_p(pte)) {
+ for (size_t k = 0; k < L2_L_SIZE / L2_S_SIZE; k++) {
+ *ptep++ = pte;
+ }
+ } else {
+ for (size_t k = 0; k < PAGE_SIZE / L2_S_SIZE; k++) {
+ KASSERTMSG(*ptep == opte, "%#x [*%p] != %#x", *ptep, ptep, opte);
+ *ptep++ = pte;
+ pte += L2_S_SIZE;
+ if (opte)
+ opte += L2_S_SIZE;
+ }
}
-}
+}
static inline void
l2pte_reset(pt_entry_t *ptep)
Home |
Main Index |
Thread Index |
Old Index