summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
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/include/kernel
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/include/kernel')
-rw-r--r--src/include/kernel/block.H10
-rw-r--r--src/include/kernel/heapmgr.H11
-rw-r--r--src/include/kernel/pagemgr.H8
-rw-r--r--src/include/kernel/segmentmgr.H9
-rw-r--r--src/include/kernel/taskmgr.H14
5 files changed, 46 insertions, 6 deletions
diff --git a/src/include/kernel/block.H b/src/include/kernel/block.H
index 80f62b3e0..219c7d3e2 100644
--- a/src/include/kernel/block.H
+++ b/src/include/kernel/block.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -149,6 +151,11 @@ class Block
void updateRefCount( uint64_t i_vaddr,
PageTableManager::UsageStats_t i_stats );
+ /**
+ * Add pointers to the global debug area
+ */
+ static void addDebugPointers();
+
friend class Segment;
friend class BaseSegment;
friend class StackSegment;
@@ -285,7 +292,6 @@ class Block
uint64_t i_size, task_t* i_task);
-
private:
/** Base address of the block */
const uint64_t iv_baseAddr;
diff --git a/src/include/kernel/heapmgr.H b/src/include/kernel/heapmgr.H
index 9f1d0a7ed..8710e40c7 100644
--- a/src/include/kernel/heapmgr.H
+++ b/src/include/kernel/heapmgr.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2010,2017 */
+/* Contributors Listed Below - COPYRIGHT 2010,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -116,6 +116,10 @@ class HeapManager
*/
static void free(void * i_ptr);
+ /**
+ * Add pointers to the global debug area
+ */
+ static void addDebugPointers();
protected:
@@ -224,6 +228,11 @@ class HeapManager
*/
void test_pages();
+ /**
+ * Add pointers to the global debug area
+ */
+ void _addDebugPointers();
+
private: // data
Util::Lockfree::Stack<chunk_t> first_chunk[BUCKETS]; //!< free pool
diff --git a/src/include/kernel/pagemgr.H b/src/include/kernel/pagemgr.H
index c842a9360..2431c613d 100644
--- a/src/include/kernel/pagemgr.H
+++ b/src/include/kernel/pagemgr.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2010,2016 */
+/* Contributors Listed Below - COPYRIGHT 2010,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -181,6 +181,11 @@ class PageManager
*/
static void addMemory(size_t i_addr, size_t i_pageCount);
+ /**
+ * Add pointers to the global debug area
+ */
+ static void addDebugPointers();
+
enum
{
KERNEL_HEAP_RESERVED_PAGES = 4,
@@ -208,6 +213,7 @@ class PageManager
void _freePage(void*, size_t); //!< see freePage()
void _coalesce( void ); //!< see coalesce()
void _addMemory(size_t, size_t); //!< see addMemory()
+ void _addDebugPointers(); //!< see addDebugPointers()
/** see queryAvail() */
ALWAYS_INLINE uint64_t _queryAvail() const
diff --git a/src/include/kernel/segmentmgr.H b/src/include/kernel/segmentmgr.H
index 34bbe8fb6..2534590bc 100644
--- a/src/include/kernel/segmentmgr.H
+++ b/src/include/kernel/segmentmgr.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -154,6 +154,10 @@ class SegmentManager
*/
static int devUnmap(void* ea);
+ /**
+ * Add pointers to the global debug area
+ */
+ static void addDebugPointers();
private:
@@ -188,6 +192,9 @@ class SegmentManager
return i_addr >> SLBE_s;
}
+ /** See addDebugPointers */
+ void _addDebugPointers();
+
/** Array of segment objects to associated segment IDs. */
Segment* iv_segments[MAX_SEGMENTS];
};
diff --git a/src/include/kernel/taskmgr.H b/src/include/kernel/taskmgr.H
index 2b2e17f34..71dc6cfc9 100644
--- a/src/include/kernel/taskmgr.H
+++ b/src/include/kernel/taskmgr.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2014 */
+/* Contributors Listed Below - COPYRIGHT 2010,2018 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -144,6 +146,11 @@ class TaskManager
static void waitTask(task_t* t, int64_t tid,
int* status, void** retval);
+ /**
+ * Add pointers to the global debug area
+ */
+ static void addDebugPointers();
+
friend class CpuManager;
protected:
@@ -174,6 +181,11 @@ class TaskManager
*/
void removeTracker(task_tracking_t* t);
+ /**
+ * Add pointers to the global debug area
+ */
+ void _addDebugPointers();
+
/** Atomic monotonically increasing counter to use for TIDs. */
Util::Lockfree::Counter<tid_t> iv_nextTid;
OpenPOWER on IntegriCloud