summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/Process.cpp2
-rw-r--r--Kernel/VM/MemoryManager.cpp42
-rw-r--r--Kernel/VM/MemoryManager.h2
3 files changed, 23 insertions, 23 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index d2d5ca7745..90e15d3829 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -1266,6 +1266,8 @@ void Process::dump_regions()
region.vmobject().is_purgeable() ? 'P' : ' ',
region.name().characters());
}
+
+ MM.dump_kernel_regions();
}
void Process::sys$exit(int status)
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index 2c0ce2a4b9..554ca03903 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -227,29 +227,6 @@ Region* MemoryManager::user_region_from_vaddr(Process& process, VirtualAddress v
return &region;
}
dbg() << process << " Couldn't find user region for " << vaddr;
- if (auto* kreg = kernel_region_from_vaddr(vaddr)) {
- dbg() << process << " OTOH, there is a kernel region: " << kreg->range() << ": " << kreg->name();
- } else {
- dbg() << process << " AND no kernel region either";
- }
-
- process.dump_regions();
-
- kprintf("Kernel regions:\n");
- kprintf("BEGIN END SIZE ACCESS NAME\n");
- for (auto& region : MM.m_kernel_regions) {
- kprintf("%08x -- %08x %08x %c%c%c%c%c%c %s\n",
- region.vaddr().get(),
- region.vaddr().offset(region.size() - 1).get(),
- region.size(),
- region.is_readable() ? 'R' : ' ',
- region.is_writable() ? 'W' : ' ',
- region.is_executable() ? 'X' : ' ',
- region.is_shared() ? 'S' : ' ',
- region.is_stack() ? 'T' : ' ',
- region.vmobject().is_purgeable() ? 'P' : ' ',
- region.name().characters());
- }
return nullptr;
}
@@ -664,6 +641,25 @@ void MemoryManager::unregister_region(Region& region)
m_user_regions.remove(&region);
}
+void MemoryManager::dump_kernel_regions()
+{
+ kprintf("Kernel regions:\n");
+ kprintf("BEGIN END SIZE ACCESS NAME\n");
+ for (auto& region : MM.m_kernel_regions) {
+ kprintf("%08x -- %08x %08x %c%c%c%c%c%c %s\n",
+ region.vaddr().get(),
+ region.vaddr().offset(region.size() - 1).get(),
+ region.size(),
+ region.is_readable() ? 'R' : ' ',
+ region.is_writable() ? 'W' : ' ',
+ region.is_executable() ? 'X' : ' ',
+ region.is_shared() ? 'S' : ' ',
+ region.is_stack() ? 'T' : ' ',
+ region.vmobject().is_purgeable() ? 'P' : ' ',
+ region.name().characters());
+ }
+}
+
ProcessPagingScope::ProcessPagingScope(Process& process)
{
ASSERT(current);
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h
index 24e750f1c6..d8c5542368 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/VM/MemoryManager.h
@@ -106,6 +106,8 @@ public:
static Region* region_from_vaddr(Process&, VirtualAddress);
static const Region* region_from_vaddr(const Process&, VirtualAddress);
+ void dump_kernel_regions();
+
private:
MemoryManager();
~MemoryManager();