diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-05-20 12:03:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-06 11:47:27 -0500 |
commit | 5623531a2f9efa10450a5e1e3b1eb6bd4a998357 (patch) | |
tree | 23225e612af65ec60cf3a324df22111bb5c13eef /src/include | |
parent | 66474f4f93fd10ad3b35ed89cecc3d6b11e99eed (diff) | |
download | talos-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/include')
-rw-r--r-- | src/include/kernel/machchk.H | 42 | ||||
-rw-r--r-- | src/include/kernel/task.H | 48 | ||||
-rw-r--r-- | src/include/sys/mm.h | 22 |
3 files changed, 88 insertions, 24 deletions
diff --git a/src/include/kernel/machchk.H b/src/include/kernel/machchk.H new file mode 100644 index 000000000..51cd14acc --- /dev/null +++ b/src/include/kernel/machchk.H @@ -0,0 +1,42 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/kernel/machchk.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* 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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __KERNEL_MACHCHK_H +#define __KERNEL_MACHCHK_H + +#include <stdint.h> +#include <kernel/task.H> + +namespace Kernel +{ + namespace MachineCheck + { + /** Handles memory UE machine checks. + * + * @param[in] t - Task which took the machine check. + * @return bool - True if MC successfully handled, false otherwise. + */ + bool handleLoadUE(task_t* t); + } +} + +#endif diff --git a/src/include/kernel/task.H b/src/include/kernel/task.H index d41172bd9..a4b9128e5 100644 --- a/src/include/kernel/task.H +++ b/src/include/kernel/task.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/kernel/task.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2010-2012 - * - * p1 - * - * 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. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/kernel/task.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2013 */ +/* */ +/* p1 */ +/* */ +/* 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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** @file task.H * @brief Defines kernel information about tasks. */ @@ -115,6 +114,9 @@ struct task_t /** Detached state of the task. */ bool detached; + /** Determine if the task should tolerate memory UEs. */ + bool tolerate_ue; + // Pointers for queue containers. task_t* prev; task_t* next; diff --git a/src/include/sys/mm.h b/src/include/sys/mm.h index f3488b3d8..d71d5a1b3 100644 --- a/src/include/sys/mm.h +++ b/src/include/sys/mm.h @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -141,6 +141,26 @@ void mm_icache_invalidate(void * i_addr, size_t i_cpu_word_count); */ uint64_t mm_virt_to_phys( void* i_vaddr ); +/** @fn mm_tolerate_ue + * @brief Allows a task to tolerate a memory UE without being killed. + * + * This should be used when copying content from memory of unknown quality, + * such as during a memory preserved IPL. When a memory UE is consumed by + * the task, instead of killing the task, the kernel will replace the + * memory access by a special value of '0xdeadd47a'. + * + * @param[in] i_state - Should the task tolerate memory UEs: 0 = no, 1 = yes. + * + * Example usage: + * mm_tolerate_ue(1); + * memcpy(src, dest, size); + * mm_tolerate_ue(0); + */ +void mm_tolerate_ue(uint64_t i_state); +/** Value inserted into process when it encounters a UE, if mm_tolerate_ue is + * enabled. */ +enum { MM_UE_MAGIC_VALUE = 0xdeadd47adeadd47aull }; + #ifdef __cplusplus } #endif |