diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-01-24 17:30:26 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-06 17:59:14 -0600 |
commit | 13f9e39136ff2351bf4d9c6d0e52c4295683ebf5 (patch) | |
tree | 072157d5b5720f23e9be438b70fbb8f8a6a23c09 /src/usr/dump/test | |
parent | a2c2b1d976850d8cc58a870c4fd1316b0cf86334 (diff) | |
download | talos-hostboot-13f9e39136ff2351bf4d9c6d0e52c4295683ebf5.tar.gz talos-hostboot-13f9e39136ff2351bf4d9c6d0e52c4295683ebf5.zip |
Handle relative dump addresses
PHYP can fill the dump tables (MDST,MDDT) with relative addresses
instead of physical ones. In that case, we need to offset the
values by the PHYP base address to get to the real memory.
Change-Id: I83ed94b3b59e18c71cc0d99d6d2ad1cf5b556ab8
CQ: SW242249
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8381
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/dump/test')
-rw-r--r-- | src/usr/dump/test/dumptest.H | 92 |
1 files changed, 48 insertions, 44 deletions
diff --git a/src/usr/dump/test/dumptest.H b/src/usr/dump/test/dumptest.H index edf9a37aa..63a5f7442 100644 --- a/src/usr/dump/test/dumptest.H +++ b/src/usr/dump/test/dumptest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -122,12 +122,14 @@ class DumpTest: public CxxTest::TestSuite uint64_t src_data[8] = {DUMP_TEST_SRC_DATA_AREA, 64, // 450000 DUMP_TEST_SRC_DATA_AREA + 64, 64, - DUMP_TEST_SRC_DATA_AREA + 192, 64, + (0x8000000000000000 | DUMP_TEST_SRC_DATA_AREA) + + 192, 64, DUMP_TEST_SRC_DATA_AREA + 256, 64}; uint64_t dst_data[8] = {DUMP_TEST_DST_DATA_AREA, 64, // 460000 - DUMP_TEST_DST_DATA_AREA + 64, 64, + (0x8000000000000000 | DUMP_TEST_DST_DATA_AREA) + + 64, 64, DUMP_TEST_DST_DATA_AREA + 256, 64, DUMP_TEST_DST_DATA_AREA + 512, 64}; @@ -164,21 +166,21 @@ class DumpTest: public CxxTest::TestSuite // results output data expected uint64_t result_data[] = { - DUMP_TEST_SRC_DATA_AREA, - DUMP_TEST_DST_DATA_AREA, - 64, 0, + 0x8000000000000000|DUMP_TEST_SRC_DATA_AREA, + 0x8000000000000000|DUMP_TEST_DST_DATA_AREA, + 64, 0, - DUMP_TEST_SRC_DATA_AREA +64, - DUMP_TEST_DST_DATA_AREA +64, - 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA) +64, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA) +64, + 64, 0, - DUMP_TEST_SRC_DATA_AREA+192, - DUMP_TEST_DST_DATA_AREA+256, - 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+192, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+256, + 64, 0, - DUMP_TEST_SRC_DATA_AREA+256, - DUMP_TEST_DST_DATA_AREA+512, - 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+512, + 64, 0, }; uint64_t *va_mapsrcTableAddr = 0; @@ -389,20 +391,20 @@ class DumpTest: public CxxTest::TestSuite // results output data expected uint64_t result_data[] = { - DUMP_TEST_SRC_DATA_AREA+256, - DUMP_TEST_DST_DATA_AREA+1024, 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+1024, 64, 0, - DUMP_TEST_SRC_DATA_AREA+256+64, - DUMP_TEST_DST_DATA_AREA+1024+64, 32, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256+64, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+1024+64, 32, 0, - DUMP_TEST_SRC_DATA_AREA+256+64+32, - DUMP_TEST_DST_DATA_AREA+1024+256, 32, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256+64+32, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+1024+256, 32, 0, - DUMP_TEST_SRC_DATA_AREA+256+128, - DUMP_TEST_DST_DATA_AREA+1024+128, 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256+128, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+1024+128, 64, 0, - DUMP_TEST_SRC_DATA_AREA+256+128+64, - DUMP_TEST_DST_DATA_AREA+1024+128+64, 64, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+256+128+64, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+1024+128+64, 64, 0, }; uint64_t *va_mapsrcTableAddr = 0; @@ -710,27 +712,27 @@ class DumpTest: public CxxTest::TestSuite // results output data expected - uint64_t result_data[] = { - DUMP_TEST_SRC_DATA_AREA+1024, - DUMP_TEST_DST_DATA_AREA+2048, - 16, 0, + uint64_t result_data[] = { + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+1024, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+2048, + 16, 0, - DUMP_TEST_SRC_DATA_AREA+2048, - DUMP_TEST_DST_DATA_AREA+2048+16, - 48, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+2048, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+2048+16, + 48, 0, - DUMP_TEST_SRC_DATA_AREA+3072, - DUMP_TEST_DST_DATA_AREA+2048+128, - 32, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+3072, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+2048+128, + 32, 0, - DUMP_TEST_SRC_DATA_AREA+4096, - DUMP_TEST_DST_DATA_AREA+3072, - 32, 0, + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+4096, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+3072, + 32, 0, - DUMP_TEST_SRC_DATA_AREA+4096+32, - DUMP_TEST_DST_DATA_AREA+3072+64, - 128, 0, - }; + (0x8000000000000000|DUMP_TEST_SRC_DATA_AREA)+4096+32, + (0x8000000000000000|DUMP_TEST_DST_DATA_AREA)+3072+64, + 128, 0, + }; do { @@ -1184,14 +1186,16 @@ class DumpTest: public CxxTest::TestSuite uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(destTable); uint64_t src_data[8] = {DUMP_TEST_SRC_DATA_AREA, 64, // 450000 - DUMP_TEST_SRC_DATA_AREA + 64, 64, + (0x8000000000000000 | DUMP_TEST_SRC_DATA_AREA) + + 64, 64, DUMP_TEST_SRC_DATA_AREA + 128, 64, DUMP_TEST_SRC_DATA_AREA + 192, 64}; uint64_t dst_data[8] = {DUMP_TEST_DST_DATA_AREA+4096, 64, // 4601000 DUMP_TEST_DST_DATA_AREA + 4096 + 64, 64, - DUMP_TEST_DST_DATA_AREA + 4096 + 128, 64, + (0x8000000000000000 | DUMP_TEST_DST_DATA_AREA) + + 4096 + 128, 64, DUMP_TEST_DST_DATA_AREA + 4096 + 192, 32}; // NOTE>> TOO SMALL of a space.. |