From 910aa20cbccd25c05250f7a7d42ad992f913f134 Mon Sep 17 00:00:00 2001
From: Oliver Ford <oliford@NervousEnergy.(none)>
Date: Fri, 18 Apr 2008 21:00:54 +0100
Subject: [PATCH] part: adding supersection support for dump mmu

---
 include/memory.h |    4 ++++
 src/memcmds.cpp  |   18 +++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/include/memory.h b/include/memory.h
index 14cb2b3..566d3ee 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -27,7 +27,11 @@ typedef uint32 mmuL1Desc;
 // Coarse page table address
 #define MMU_L1_COARSE_MASK	0xfffffc00
 // Section descriptor
+#define MMU_L1_IS_SUPER_SEC	(1 << 18)
 #define MMU_L1_SECTION_MASK	0xfff00000
+#define MMU_L1_SUPER_SEC_LOW_MASK	0xff000000
+#define MMU_L1_SUPER_SEC_HIGH_MASK	0x00f00000
+#define MMU_L1_SUPER_SEC_HIGH_SHIFT	12
 #define MMU_L1_AP_MASK		0x00000c00
 #define MMU_L1_AP_SHIFT		10
 #define MMU_L1_CACHEABLE	0x00000008
diff --git a/src/memcmds.cpp b/src/memcmds.cpp
index 2168c49..0596d8a 100644
--- a/src/memcmds.cpp
+++ b/src/memcmds.cpp
@@ -446,11 +446,19 @@ memDumpMMU(const char *tok, const char *args)
                     Output("%08x  |          | %11s |", vaddr, pi->name);
                 continue;
             case MMU_L1_SECTION:
-                if (showall
-                    || RANGES_OVERLAP(start, size, paddr, 1<<pi->map_shift))
-                    Output("%08x  | %08x | %11s |%s"
-                           , vaddr, paddr, pi->name, flagbuf);
-                continue;
+                if( l1d & MMU_L1_IS_SUPER_SEC){
+			uint32 addrHigh = l1d & 
+#define MMU_L1_SUPER_SEC_LOW_MASK	0xff000000
+#define MMU_L1_SUPER_SEC_HIGH_MASK	0x00f00000
+#define MMU_L1_SUPER_SEC_HIGH_SHIFT	12
+			
+		}else{
+			if (showall
+			|| RANGES_OVERLAP(start, size, paddr, 1<<pi->map_shift))
+			Output("%08x  | %08x | %11s |%s"
+				, vaddr, paddr, pi->name, flagbuf);
+			continue;
+		}
             }
             if (showall)
                 Output("%08x  |          | %11s |%s", vaddr, pi->name, flagbuf);
-- 
1.5.2.5

