summaryrefslogtreecommitdiffstats
path: root/src/lib/syscall_mm.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-05-20 12:03:29 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-06-06 11:47:27 -0500
commit5623531a2f9efa10450a5e1e3b1eb6bd4a998357 (patch)
tree23225e612af65ec60cf3a324df22111bb5c13eef /src/lib/syscall_mm.C
parent66474f4f93fd10ad3b35ed89cecc3d6b11e99eed (diff)
downloadtalos-hostboot-5623531a2f9efa10450a5e1e3b1eb6bd4a998357.tar.gz
talos-hostboot-5623531a2f9efa10450a5e1e3b1eb6bd4a998357.zip
Tolerate memory UEs during dump extraction.
Change-Id: I0dc57ec047beb47b557b816162d619a5b2a54108 RTC: 64619 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4600 Tested-by: Jenkins Server Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib/syscall_mm.C')
-rw-r--r--src/lib/syscall_mm.C26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/lib/syscall_mm.C b/src/lib/syscall_mm.C
index 5bb85a4fb..98a4aa0a6 100644
--- a/src/lib/syscall_mm.C
+++ b/src/lib/syscall_mm.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -24,7 +24,7 @@
#include <sys/mm.h>
#include <arch/ppc.H>
#include <kernel/vmmmgr.H>
-
+#include <kernel/task.H>
using namespace Systemcalls;
@@ -108,3 +108,25 @@ int mm_linear_map(void *i_paddr, uint64_t i_size)
{
return (int64_t)_syscall2(MM_LINEAR_MAP, i_paddr, (void*)i_size);
}
+
+/**
+ * mm_tolerate_ue. Update task state and do appropriate synchronization.
+ */
+void mm_tolerate_ue(uint64_t i_state)
+{
+ // Get task structure.
+ register task_t* task;
+ asm volatile("mr %0, 13" : "=r"(task));
+
+ // Update task state.
+ task->tolerate_ue = (i_state != 0);
+
+ // Note: We do not need any sort of synchronization instructions here
+ // because the state is only used by the local HW thread which
+ // might be handling the machine check due to memory UE. Any
+ // exception is a context synchronizing event which ensures
+ // that all preceeding instructions have completed, so there
+ // are no visible effects of instruction reordering with respect
+ // to this state change.
+
+}
OpenPOWER on IntegriCloud