diff options
author | Thi Tran <thi@us.ibm.com> | 2011-11-11 11:01:41 -0600 |
---|---|---|
committer | Thi N. Tran <thi@us.ibm.com> | 2011-11-11 12:13:28 -0600 |
commit | 1595ed5f5602346579dba1f8714d3092f50e928f (patch) | |
tree | 2d58a72a8936ff6eb87eab8e3418b76a536f9b32 /src/usr/testcore | |
parent | c4c52d57c809bc9b6c8a94a8d9fb66489f246a18 (diff) | |
download | talos-hostboot-1595ed5f5602346579dba1f8714d3092f50e928f.tar.gz talos-hostboot-1595ed5f5602346579dba1f8714d3092f50e928f.zip |
Modifications to run Sprint 6 code on VBU
Change-Id: I28b4c114bdfb00a8f252bc4ce12a725f292c266b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/495
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/testcore')
-rw-r--r-- | src/usr/testcore/kernel/vmmbasetest.H | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/usr/testcore/kernel/vmmbasetest.H b/src/usr/testcore/kernel/vmmbasetest.H index 52802fee7..884a91373 100644 --- a/src/usr/testcore/kernel/vmmbasetest.H +++ b/src/usr/testcore/kernel/vmmbasetest.H @@ -33,6 +33,7 @@ #include <arch/ppc.H> #include <sys/mm.h> #include <usr/vmmconst.h> +#include <targeting/targetservice.H> class VmmBaseTest : public CxxTest::TestSuite { @@ -91,7 +92,7 @@ class VmmBaseTest : public CxxTest::TestSuite void testCastOutPages() { - uint64_t l_testAddr = VMM_VADDR_RMVPAGE_TEST; + uint64_t l_testAddr = VMM_VADDR_RMVPAGE_TEST; uint64_t l_testSize = VMM_SIZE_RMVPAGE_TEST; uint64_t vaddr = l_testAddr+l_testSize; uint64_t vsize = PageManager::availPages()*PAGESIZE; @@ -119,7 +120,19 @@ class VmmBaseTest : public CxxTest::TestSuite } (*(volatile uint64_t *)i); sync(); } - nanosleep(1,0); + + // Don't delay in VPO because it will take VERY long to + // run the simulator + TARGETING::EntityPath syspath(TARGETING::EntityPath::PATH_PHYSICAL); + syspath.addLast(TARGETING::TYPE_SYS,0); + TARGETING::Target* sys = TARGETING::targetService().toTarget(syspath); + uint8_t vpo_mode = 0; + if( sys + && sys->tryGetAttr<TARGETING::ATTR_VPO_MODE>(vpo_mode) + && (vpo_mode == 0) ) + { + nanosleep(1,0); + } } private: |