summaryrefslogtreecommitdiffstats
path: root/src/build/debug/Hostboot
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-01-02 10:07:17 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-01-02 15:33:35 -0600
commit9ef1b3e1ce1958b8c58bba74a76085e9af1a8fc1 (patch)
tree4662576171436230d47f3368a84fe30214015d81 /src/build/debug/Hostboot
parente52a96b1dc103294e5e5c19a15bf169b728a5b12 (diff)
downloadtalos-hostboot-9ef1b3e1ce1958b8c58bba74a76085e9af1a8fc1.tar.gz
talos-hostboot-9ef1b3e1ce1958b8c58bba74a76085e9af1a8fc1.zip
Debug Framework fixes for HRMOR.
There were conditions where the HRMOR was being applied twice during virtual memory translation. Enhance the debug framework to handle both HRMOR-adjusted and physically-mapped addresses. Change-Id: I620432deb0ce4115c284e7a996a97f2b46672a01 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2790 Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/debug/Hostboot')
-rwxr-xr-xsrc/build/debug/Hostboot/_DebugFramework.pm54
-rwxr-xr-xsrc/build/debug/Hostboot/_DebugFrameworkVMM.pm14
2 files changed, 51 insertions, 17 deletions
diff --git a/src/build/debug/Hostboot/_DebugFramework.pm b/src/build/debug/Hostboot/_DebugFramework.pm
index e5a811867..09289ebcb 100755
--- a/src/build/debug/Hostboot/_DebugFramework.pm
+++ b/src/build/debug/Hostboot/_DebugFramework.pm
@@ -1,26 +1,26 @@
#!/usr/bin/perl
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/build/debug/Hostboot/_DebugFramework.pm $
+# $Source: src/build/debug/Hostboot/_DebugFramework.pm $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011-2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
#
-# The source code for this program is not published or other-
-# wise divested of its trade secrets, irrespective of what has
-# been deposited with the U.S. Copyright Office.
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_END_TAG
# _DebugFramework.pm
#
# This module is a set of utility functions for the debug framework, which
@@ -49,6 +49,7 @@ our @EXPORT = ( 'callToolModule', 'callToolModuleHelp', 'callToolModuleHelpInfo'
'littleendian',
'read64', 'read32', 'read16', 'read8', 'readStr',
'write64', 'write32', 'write16', 'write8',
+ 'translateHRMOR',
'getIstepList'
);
@@ -598,6 +599,31 @@ sub write8
my $result = ::writeData($addr, 1, $value);
}
+# @sub translateHRMOR
+#
+# Translate an address with the HRMOR if necessary.
+#
+# In the event that the most-significant-bit is on, then the HRMOR should be
+# bypassed, otherwise the HRMOR is applied.
+#
+# @param Address to translate.
+#
+sub translateHRMOR
+{
+ my $addr = shift;
+
+ if (0 != ($addr & 0x8000000000000000))
+ {
+ $addr &= 0x7FFFFFFFFFFFFFFF;
+ }
+ else
+ {
+ $addr += ::getHRMOR();
+ }
+
+ return $addr;
+}
+
# @sub getIstepList
#
# get an array of all the supported istep names from the
diff --git a/src/build/debug/Hostboot/_DebugFrameworkVMM.pm b/src/build/debug/Hostboot/_DebugFrameworkVMM.pm
index 7de8d548d..e8c7dfd3b 100755
--- a/src/build/debug/Hostboot/_DebugFrameworkVMM.pm
+++ b/src/build/debug/Hostboot/_DebugFrameworkVMM.pm
@@ -6,7 +6,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
# p1
#
@@ -82,6 +82,7 @@ use constant BLOCK_SIZE_OFFSET => 8;
use constant BLOCK_PARENT_SEGMENTPTR_OFFSET => 16;
use constant BLOCK_NEXTPTR_OFFSET => 24;
use constant BLOCK_SPTE_OFFSET => 32;
+use constant BLOCK_IS_PHYSICAL => 56;
@@ -311,6 +312,8 @@ sub getPhyAddrfromSPTE
my $SPTE_entry = ::read32 ($SPTE_ptr + $spteindex, 4);
+ my $isPhysical = ::read8 ($block_ptr + BLOCK_IS_PHYSICAL);
+
if ($debug)
{
::userDisplay (sprintf " The SPTE ptr is: %X\n" , $SPTE_ptr);
@@ -335,8 +338,13 @@ sub getPhyAddrfromSPTE
$paddr = $SPTEaddr + $addrOffset;
- # add the HRMOR value to get the actual physical address
- $paddr += ::getHRMOR();
+ if (0 == $isPhysical)
+ {
+ # add the HRMOR value to get the actual physical address
+ $paddr += ::getHRMOR();
+ }
+ # mark address as bypassing HRMOR translation.
+ $paddr |= 0x8000000000000000;
}
else
{
OpenPOWER on IntegriCloud