summaryrefslogtreecommitdiffstats
path: root/src/kernel/pagemgr.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-03-20 09:20:17 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-06-26 11:18:28 -0400
commit0e138b0da002197cc86f601be5b307386a5fdfab (patch)
tree9412e5b2803d1022f30b2646ddaefc333a627ac9 /src/kernel/pagemgr.C
parentd2482ab7773d854ec50ffcd7d92bb019a217d4e3 (diff)
downloadtalos-hostboot-0e138b0da002197cc86f601be5b307386a5fdfab.tar.gz
talos-hostboot-0e138b0da002197cc86f601be5b307386a5fdfab.zip
Modify debug framework to be build-independent
During boot, Hostboot will push key pointers into memory. This allows the debug tools to find the pointers (using a known static memory address) to base memory accesses on. This replaces the existing symbol lookup that we use now. That means we don't need to have the exact symbol file for the build we're debugging against. Change-Id: I4618e15a3dc90acc3a89520a502eb818c1b4258c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56097 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel/pagemgr.C')
-rw-r--r--src/kernel/pagemgr.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C
index 42545470a..bfc1bbf7a 100644
--- a/src/kernel/pagemgr.C
+++ b/src/kernel/pagemgr.C
@@ -38,6 +38,7 @@
#include <kernel/memstate.H>
#include <kernel/bltohbdatamgr.H>
#include <kernel/misc.H>
+#include <usr/debugpointers.H>
size_t PageManager::cv_coalesce_count = 0;
@@ -205,6 +206,11 @@ uint64_t PageManager::availPages()
return Singleton<PageManager>::instance()._availPages();
}
+void PageManager::addDebugPointers()
+{
+ return Singleton<PageManager>::instance()._addDebugPointers();
+}
+
PageManager::PageManager()
: iv_pagesAvail(0), iv_pagesTotal(0), iv_lock()
{
@@ -478,3 +484,16 @@ void PageManager::_addMemory(size_t i_addr, size_t i_pageCount)
return;
}
+
+void PageManager::_addDebugPointers()
+{
+ DEBUG::add_debug_pointer(DEBUG::PAGEMANAGER,
+ this,
+ sizeof(PageManager));
+ DEBUG::add_debug_pointer(DEBUG::PAGEMANAGERLOWPAGECOUNT,
+ &PageManager::cv_low_page_count,
+ sizeof(PageManager::cv_low_page_count));
+ DEBUG::add_debug_pointer(DEBUG::PAGEMANAGERCOALESCECOUNT,
+ &PageManager::cv_coalesce_count,
+ sizeof(PageManager::cv_coalesce_count));
+}
OpenPOWER on IntegriCloud