summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-05-20 15:09:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-06-10 10:05:14 -0500
commit879e709081b0474fd6cafd35378fb601481aeac7 (patch)
tree9e4bc25b0ba60712ea816ddeb99a2907e928db77 /src/usr
parent12ef1b0406ba52ce78ee55db292bfb0ae72e5a5b (diff)
downloadtalos-hostboot-879e709081b0474fd6cafd35378fb601481aeac7.tar.gz
talos-hostboot-879e709081b0474fd6cafd35378fb601481aeac7.zip
Update callers to mm_block_map instead of mmio_dev_map
RTC: 71081 Change-Id: Icdf0f32afc926999c974da1a6b24c279f73cb600 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4608 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Melissa J. Connell <missyc@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/dump/test/dumptest.H171
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C96
-rw-r--r--src/usr/hwpf/hwp/occ/occ.C19
-rw-r--r--src/usr/runtime/fakepayload.C5
4 files changed, 152 insertions, 139 deletions
diff --git a/src/usr/dump/test/dumptest.H b/src/usr/dump/test/dumptest.H
index b3c21608a..b38f45b0d 100644
--- a/src/usr/dump/test/dumptest.H
+++ b/src/usr/dump/test/dumptest.H
@@ -36,7 +36,7 @@
#include <devicefw/userif.H>
#include <targeting/common/util.H>
#include <runtime/runtime.H>
-#include <sys/mmio.h>
+#include <sys/mm.h>
#include <util/align.H>
#include <sys/mm.h>
#include <dump/dumpif.H>
@@ -155,7 +155,7 @@ class DumpTest: public CxxTest::TestSuite
{0x3333333333333333, 0x3333333333333333,
0x3333333333333333, 0x3333333333333333,
0x3333333333333333, 0x3333333333333333,
- 0x3333333333333333,0x3333333333333333},
+ 0x3333333333333333, 0x3333333333333333},
{0x4444444444444444, 0x4444444444444444,
0x4444444444444444, 0x4444444444444444,
@@ -181,9 +181,10 @@ class DumpTest: public CxxTest::TestSuite
{
// Get the Va for the page aligned Physical address
- va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),
- THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_srcTableAddr = va_mapsrcTableAddr;
@@ -198,12 +199,12 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump, "DumpTest:test_DumpCollect> got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::CollectDump ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::CollectDump ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -236,9 +237,10 @@ class DumpTest: public CxxTest::TestSuite
for (int i = 0; i<4; i++)
{
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
- THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -271,13 +273,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollect got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollect ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollect ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -385,9 +387,10 @@ class DumpTest: public CxxTest::TestSuite
for (int i = 0; i<4; i++)
{
// Get the Va for the page aligned Physical address
- va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),
- THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer
va_srcTableAddr = va_mapsrcTableAddr;
@@ -402,13 +405,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenDest> got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::CollectDumpUnevenDest ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::CollectDumpUnevenDest ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -451,7 +454,10 @@ class DumpTest: public CxxTest::TestSuite
{
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -493,13 +499,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenDest got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectUnevenDest ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectUnevenDest ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -509,7 +515,10 @@ class DumpTest: public CxxTest::TestSuite
// checking the 4th entry as it crosses through 2 source entries
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -563,13 +572,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenDest got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::CollectDumpUnevenDest ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::CollectDumpUnevenDest ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -679,9 +688,10 @@ class DumpTest: public CxxTest::TestSuite
do
{
- uint64_t *va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[0])),
- THIRTYTWO_GB));
+ uint64_t *va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[0])),
+ PAGESIZE));
uint64_t *va_srcTableAddr = va_mapsrcTableAddr;
@@ -693,20 +703,22 @@ class DumpTest: public CxxTest::TestSuite
memcpy(va_srcTableAddr, src_data0, sizeof(src_data0));
// unmap the previous src entry
- int rc = mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ int rc = mm_block_unmap(
+ reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
- "DumpTest::DumpCollectUnevenSrc mmio_dev_map (1) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mmio_dev_unmap" );
+ "DumpTest::DumpCollectUnevenSrc mm_block_map (1) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mm_block_unmap" );
break;
}
- va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[2])),
- THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[2])),
+ PAGESIZE));
va_srcTableAddr = va_mapsrcTableAddr;
@@ -719,20 +731,21 @@ class DumpTest: public CxxTest::TestSuite
memcpy(va_srcTableAddr, src_data1, sizeof(src_data1));
// unmap the previous src entry
- rc = mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ rc = mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
- "DumpTest::DumpCollectUnevenSrc mmio_dev_map (2) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mmio_dev_unmap" );
+ "DumpTest::DumpCollectUnevenSrc mm_block_map (2) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mm_block_unmap" );
break;
}
- va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[4])),
- THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[4])),
+ PAGESIZE));
va_srcTableAddr = va_mapsrcTableAddr;
@@ -745,20 +758,21 @@ class DumpTest: public CxxTest::TestSuite
memcpy(va_srcTableAddr, src_data2, sizeof(src_data2));
// unmap the previous src entry
- rc = mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ rc = mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
- "DumpTest::DumpCollectUnevenSrc mmio_dev_map (3) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mmio_dev_unmap" );
+ "DumpTest::DumpCollectUnevenSrc mm_block_map (3) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mm_block_unmap" );
break;
}
- va_mapsrcTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[6])),
- THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[6])),
+ PAGESIZE));
va_srcTableAddr = va_mapsrcTableAddr;
@@ -772,13 +786,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
- rc = mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ rc = mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
- "DumpTest::DumpCollectUnevenSrc mmio_dev_map (4) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mmio_dev_unmap" );
+ "DumpTest::DumpCollectUnevenSrc mm_block_map (4) bad RC=%X for addr %llx",rc, va_mapsrcTableAddr);
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : BAD Rc from mm_block_unmap" );
break;
}
}while(0);
@@ -819,9 +833,10 @@ class DumpTest: public CxxTest::TestSuite
// FIRST Destination ENTRY source entires 0 and 1 !!!!
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
- THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -880,13 +895,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenSrc:5 got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc:5 ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc:5 ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -895,9 +910,10 @@ class DumpTest: public CxxTest::TestSuite
// SECOND DEStination ENTRY third source entry!!!!
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
- THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -931,14 +947,13 @@ class DumpTest: public CxxTest::TestSuite
}
// unmap the previous src entry
- rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
+ rc = mm_block_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenSrc:6 got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc:6 ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc:6 ERROR : BAD Rc from mm_block_unmap" );
break;
}
@@ -947,7 +962,10 @@ class DumpTest: public CxxTest::TestSuite
// THIRD destination entry - part of last source!!!!
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -987,13 +1005,13 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenSrc:7 got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc:7 ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc:7 ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -1002,9 +1020,10 @@ class DumpTest: public CxxTest::TestSuite
// FOURTH SRC ENTRY !!!!
// Get the Va for the page aligned Physical address
- va_mapdestTableAddr =
- static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),
- THIRTYTWO_GB));
+ va_mapdestTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(dst_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_destTableAddr = va_mapdestTableAddr;
@@ -1044,14 +1063,13 @@ class DumpTest: public CxxTest::TestSuite
}
// unmap the previous src entry
- rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
+ rc = mm_block_unmap(reinterpret_cast<void*>(va_mapdestTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump,
"DumpTest::DumpCollectUnevenSrc:8 got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectUnevenSrc:8 ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectUnevenSrc:8 ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -1067,7 +1085,7 @@ class DumpTest: public CxxTest::TestSuite
TRACFCOMP(g_trac_dump, "DumpTest::DumpCollectUnevenSRC:1 : Results Data mismatch rc = %d", result_rc);
TS_FAIL( "DumpTest::DumpCollectUnevenSrc ERROR : Unexpected error data mismatch in results table" );
}
-
+
TRACFCOMP( g_trac_dump, "dumpTest::test_dumpCollectUnevenSrc COMPLETE" );
}
@@ -1077,7 +1095,7 @@ class DumpTest: public CxxTest::TestSuite
* @brief Basic dump test that forces an error condition that does not have
* enough destination space to hold the src size.
* This testcase also verifies that we can send a mbox message with
- * dump status to the FSP.
+ * dump status to the FSP.
*
*/
@@ -1166,7 +1184,10 @@ class DumpTest: public CxxTest::TestSuite
{
// Get the Va for the page aligned Physical address
- va_mapsrcTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),THIRTYTWO_GB));
+ va_mapsrcTableAddr = reinterpret_cast<uint64_t*>(
+ mm_block_map(reinterpret_cast<void*>(
+ ALIGN_PAGE_DOWN(src_data[index])),
+ PAGESIZE));
// copy the mapped VA to a VA pointer we will
va_srcTableAddr = va_mapsrcTableAddr;
@@ -1181,12 +1202,12 @@ class DumpTest: public CxxTest::TestSuite
// unmap the previous src entry
int rc =
- mmio_dev_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
+ mm_block_unmap(reinterpret_cast<void*>(va_mapsrcTableAddr));
if (rc != 0)
{
TRACFCOMP(g_trac_dump, "DumpTest::DumpCollectNotEnoughDest ERROR..got an error back from unmap : RC=%X",rc);
- TS_FAIL( "DumpTest::DumpCollectNotEnoughDest ERROR : BAD Rc from mmio_dev_unmap" );
+ TS_FAIL( "DumpTest::DumpCollectNotEnoughDest ERROR : BAD Rc from mm_block_unmap" );
break;
}
index+=2;
@@ -1239,8 +1260,8 @@ class DumpTest: public CxxTest::TestSuite
// This call is just to verify we can call MSG_END .. even though with
// this flow we already sent a msg ERROR.
-
-
+
+
// Successful so send mbox message indicating the dump is complete and successful
l_err = DUMP::sendMboxMsg(DUMP::DUMP_MSG_END_MSG_TYPE);
@@ -1250,7 +1271,7 @@ class DumpTest: public CxxTest::TestSuite
"DumpTest::DumpCollectNotEnoughDest ERROR : Got an errorlog back from sendMboxMsg-END");
TS_FAIL( "DumpTest::DumpCollectNotEnoughDest ERROR : Got an errorlog back from sendMboxMsg-END" );
}
-
+
TRACFCOMP( g_trac_dump, "dumpTest::test_dumpCollectNotEnoughDest COMPLETE" );
diff --git a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
index 03d36e359..51c90a001 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
+++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C
@@ -37,8 +37,8 @@
#include <sys/misc.h> // cpu_thread_count(), P8_MAX_PROCS
#include <vfs/vfs.H> // PORE image
-#include <sys/mmio.h> // mmio_dev_map
-#include <sys/mm.h> // mm_linear_map
+#include <sys/mm.h> // mm_block_map
+#include <sys/mmio.h> // THIRTYTWO_GB
#include <trace/interface.H>
#include <initservice/taskargs.H>
@@ -322,10 +322,8 @@ void* call_host_build_winkle( void *io_pArgs )
void *l_pRealMemBase =
reinterpret_cast
<void * const>(VMM_HOMER_REGION_START_ADDR );
-#if 0
- //TODO RTC 71081 - enabled when switching to dev_map
void* l_pVirtMemBase = NULL;
-#endif
+
ISTEP_ERROR::IStepError l_StepError;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
@@ -337,37 +335,17 @@ void* call_host_build_winkle( void *io_pArgs )
// Get a chunk of real memory big enough to store all the possible
// SLW images.
- //Assert if anyone ever changes VMM_HOMER_REGION_SIZE to not
- //equal 32MB because mmio_dev_map won't support it
- assert(VMM_HOMER_REGION_SIZE == THIRTYTWO_MB,
+ assert(VMM_HOMER_REGION_SIZE <= THIRTYTWO_GB,
"host_build_winkle: Unsupported HOMER Region size");
-#if 0
- //TODO RTC: 71081 change to non-cache inhibited
- //version of mmio_dev_map
l_pVirtMemBase =
- mmio_dev_map(l_pRealMemBase, THIRTYTWO_MB);
+ mm_block_map(l_pRealMemBase, VMM_HOMER_REGION_SIZE);
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Got virtual mem buffer for %d cpus = 0x%p",
P8_MAX_PROCS,
l_pVirtMemBase );
-#else
- const int l_getAddrRc = mm_linear_map (l_pRealMemBase,
- THIRTYTWO_MB);
- if(l_getAddrRc != 0)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ERR_MRK"host_build_winkle ERROR : could not get real mem");
- assert(false);
- // drop out of do block with errorlog.
- break;
- }
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Got virtual mem buffer for %d cpus = 0x%p",
- P8_MAX_PROCS,
- l_pRealMemBase );
-#endif
// Continue, build SLW images
@@ -418,17 +396,12 @@ void* call_host_build_winkle( void *io_pArgs )
uint64_t l_procRealMemAddr =
reinterpret_cast<uint64_t>(l_pRealMemBase)
+ l_procOffsetAddr;
-#if 0
- //TODO RTC: 71081 - change to use virtual offset
- //when switched to mmio_dev_map type interface.
+
void *l_pImageOut =
reinterpret_cast<void * const>
(reinterpret_cast<uint64_t>(l_pVirtMemBase)
+ l_procOffsetAddr) ;
-#else
- void *l_pImageOut =
- reinterpret_cast<void * const>(l_procRealMemAddr);
-#endif
+
uint32_t l_sizeImageOut =
(HOMER_MAX_SLW_IMG_SIZE_IN_MB*MEGABYTE);
@@ -531,36 +504,33 @@ void* call_host_build_winkle( void *io_pArgs )
} while (0);
// @@@@@ END CUSTOM BLOCK: @@@@@
-#if 0
- //TODO RTC 71081 - enable when switching to dev_map
- // interface
if(l_pVirtMemBase)
{
int rc = 0;
- rc = mmio_dev_unmap(l_pVirtMemBase);
+ rc = mm_block_unmap(l_pVirtMemBase);
if (rc != 0)
{
/*@
* @errortype
- * @reasoncode ISTEP::ISTEP_MMIO_UNMAP_ERR
+ * @reasoncode ISTEP::ISTEP_MM_UNMAP_ERR
* @moduleid ISTEP::ISTEP_BUILD_WINKLE_IMAGES
* @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
* @userdata1 Return Code
* @userdata2 Unmap address
- * @devdesc mmio_dev_unmap() returns error
+ * @devdesc mm_block_unmap() returns error
*/
l_errl =
new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
ISTEP::ISTEP_BUILD_WINKLE_IMAGES,
- ISTEP::ISTEP_MMIO_UNMAP_ERR,
+ ISTEP::ISTEP_MM_UNMAP_ERR,
rc,
reinterpret_cast<uint64_t>
(l_pVirtMemBase));
/*@
* @errortype
- * @reasoncode ISTEP_MMIO_UNMAP_ERR
+ * @reasoncode ISTEP_MM_UNMAP_ERR
* @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
* @moduleid ISTEP_HOST_BUILD_WINKLE
* @userdata1 bytes 0-1: plid identifying first error
@@ -572,13 +542,12 @@ void* call_host_build_winkle( void *io_pArgs )
*
*/
l_StepError.addErrorDetails(
- ISTEP::ISTEP_MMIO_UNMAP_ERR,
+ ISTEP::ISTEP_MM_UNMAP_ERR,
ISTEP::ISTEP_HOST_BUILD_WINKLE,
l_errl );
errlCommit( l_errl, HWPF_COMP_ID );
}
}
-#endif
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_build_winkle exit" );
@@ -631,12 +600,7 @@ void* call_proc_set_pore_bar( void *io_pArgs )
// Note that the "i_mem_bar" input to p8_set_pore_bar is the physical
// address of the PORE image, this is the image that will get executed
- // at winkle. The void * i_image parameter actually points to the same
- // place in HostBoot; in fsp or cronus these will be different.
- //
- // @todo this may change for secure boot, need to make up an RTC
- // to handle this, or there may one already???
- //
+ // at winkle.
uint64_t l_imageAddr =
l_procChip->getAttr<TARGETING::ATTR_SLW_IMAGE_ADDR>();
@@ -660,7 +624,10 @@ void* call_proc_set_pore_bar( void *io_pArgs )
l_mem_type );
- void * const l_pImage = reinterpret_cast<void * const>(l_imageAddr);
+ // Map image.
+ void * const l_pImage = reinterpret_cast<void* const>(
+ mm_block_map(reinterpret_cast<void*>(l_imageAddr),
+ HOMER_MAX_SLW_IMG_SIZE_IN_MB*MEGABYTE));
FAPI_INVOKE_HWP( l_errl,
p8_set_pore_bar,
@@ -671,6 +638,33 @@ void* call_proc_set_pore_bar( void *io_pArgs )
l_mem_type
);
+ // Unmap
+ int rc = mm_block_unmap(l_pImage);
+ if ((rc != 0) && (NULL == l_errl)) // The bad rc is lower priority
+ // than any other error, so just
+ // ignore it if something else
+ // happened.
+ {
+ /*@
+ * @errortype
+ * @reasoncode ISTEP::ISTEP_MM_UNMAP_ERR
+ * @moduleid ISTEP::ISTEP_PROC_SET_PORE_BAR
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @userdata1 Return Code
+ * @userdata2 Unmap address
+ * @devdesc mm_block_unmap() returns error
+ */
+ l_errl =
+ new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ISTEP::ISTEP_PROC_SET_PORE_BAR,
+ ISTEP::ISTEP_MM_UNMAP_ERR,
+ rc,
+ reinterpret_cast<uint64_t>
+ (l_pImage));
+ }
+
+
if ( l_errl )
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
diff --git a/src/usr/hwpf/hwp/occ/occ.C b/src/usr/hwpf/hwp/occ/occ.C
index 2d6792145..cea9c392c 100644
--- a/src/usr/hwpf/hwp/occ/occ.C
+++ b/src/usr/hwpf/hwp/occ/occ.C
@@ -28,6 +28,7 @@
#include <devicefw/userif.H>
#include <sys/misc.h>
+#include <sys/mm.h>
#include <sys/mmio.h>
#include <vmmconst.h>
@@ -42,7 +43,7 @@
#include <hwpf/plat/fapiPlatTrace.H>
#include <hwpf/hwpf_reasoncodes.H>
-#include <vfs/vfs.H>
+#include <vfs/vfs.H>
#include <util/utillidmgr.H>
// Procedures
@@ -521,15 +522,13 @@ namespace HBOCC
winkle_loaded = true;
}
- //Assert if anyone ever changes VMM_HOMER_REGION_SIZE to not
- //equal 32MB because mmio_dev_map won't support it
- assert(VMM_HOMER_REGION_SIZE == THIRTYTWO_MB,
+ assert(VMM_HOMER_REGION_SIZE <= THIRTYTWO_GB,
"loadnStartAllOccs: Unsupported HOMER Region size");
//Map entire homer region into virtual memory
homerVirtAddrBase =
- mmio_dev_map(reinterpret_cast<void*>(VMM_HOMER_REGION_START_ADDR),
- THIRTYTWO_MB);
+ mm_block_map(reinterpret_cast<void*>(VMM_HOMER_REGION_START_ADDR),
+ VMM_HOMER_REGION_SIZE);
TargetHandleList procChips;
getAllChips(procChips, TYPE_PROC, true);
@@ -630,22 +629,22 @@ namespace HBOCC
if(homerVirtAddrBase)
{
int rc = 0;
- rc = mmio_dev_unmap(homerVirtAddrBase);
+ rc = mm_block_unmap(homerVirtAddrBase);
if (rc != 0)
{
/*@
* @errortype
* @moduleid fapi::MOD_OCC_LOAD_START_ALL_OCCS
- * @reasoncode fapi::RC_MMIO_UNMAP_ERR
+ * @reasoncode fapi::RC_MM_UNMAP_ERR
* @userdata1 Return Code
* @userdata2 Unmap address
- * @devdesc mmio_dev_unmap() returns error
+ * @devdesc mm_block_unmap() returns error
*/
l_tmpErrl =
new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_OCC_LOAD_START_ALL_OCCS,
- fapi::RC_MMIO_UNMAP_ERR,
+ fapi::RC_MM_UNMAP_ERR,
rc,
reinterpret_cast<uint64_t>
(homerVirtAddrBase));
diff --git a/src/usr/runtime/fakepayload.C b/src/usr/runtime/fakepayload.C
index 0890ecdcd..0b3c3d7e7 100644
--- a/src/usr/runtime/fakepayload.C
+++ b/src/usr/runtime/fakepayload.C
@@ -23,7 +23,6 @@
#include "fakepayload.H"
#include <string.h>
#include <sys/mm.h>
-#include <sys/mmio.h>
#include <util/align.H>
#include <targeting/common/commontargeting.H>
@@ -63,7 +62,7 @@ void FakePayload::load()
assert(ALIGN_PAGE(entry + size) < safeClearArea);
// Map in the payload area.
- void* memArea = mmio_dev_map(reinterpret_cast<void*>(base), THIRTYTWO_GB);
+ void* memArea = mm_block_map(reinterpret_cast<void*>(base), safeClearArea);
// Clear out anything the FSP might have left around (for security).
memset(memArea, '\0', safeClearArea);
@@ -82,7 +81,7 @@ void FakePayload::load()
mm_icache_invalidate(memArea, ALIGN_8(safeClearArea) / sizeof(uint64_t));
// Unmap the payload area.
- mmio_dev_unmap(memArea);
+ assert(0 == mm_block_unmap(memArea));
}
OpenPOWER on IntegriCloud