From 5623531a2f9efa10450a5e1e3b1eb6bd4a998357 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Mon, 20 May 2013 12:03:29 -0500 Subject: 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 Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/lib/syscall_mm.C | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/lib/syscall_mm.C') 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 #include #include - +#include 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. + +} -- cgit v1.2.1