summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures/ppe
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2017-10-18 22:52:49 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2018-02-01 15:45:16 -0600
commit6d3ef4010fd759d818bd104f9de56b0c35a51b4a (patch)
tree9608b2439bc95434798e0247f0039fd4eca5178a /import/chips/p9/procedures/ppe
parent8e213eb46460a89972c4e6f61131e3ec6fc66d18 (diff)
downloadtalos-hcode-6d3ef4010fd759d818bd104f9de56b0c35a51b4a.tar.gz
talos-hcode-6d3ef4010fd759d818bd104f9de56b0c35a51b4a.zip
STOP: IOTA Panic Code Cleanup
Key_Cronus_Test=PM_REGRESS Change-Id: Ib22fdbf22c48c8e7dab1e2faa624b22e1abbf3a2 CQ: SW409501 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48602 Dev-Ready: Gregory S. Still <stillgs@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/ppe')
-rw-r--r--import/chips/p9/procedures/ppe/iota/iota_panic_codes.h24
-rw-r--r--import/chips/p9/procedures/ppe/iota/iota_ppe42.S5
-rw-r--r--import/chips/p9/procedures/ppe/iota/iota_ppe42.h7
-rw-r--r--import/chips/p9/procedures/ppe/iota/iota_ppe42_vectors.S13
4 files changed, 33 insertions, 16 deletions
diff --git a/import/chips/p9/procedures/ppe/iota/iota_panic_codes.h b/import/chips/p9/procedures/ppe/iota/iota_panic_codes.h
index bf23b4b1..318cebe9 100644
--- a/import/chips/p9/procedures/ppe/iota/iota_panic_codes.h
+++ b/import/chips/p9/procedures/ppe/iota/iota_panic_codes.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2016,2017 */
+/* COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -44,12 +44,12 @@ typedef enum
IOTA_NULLPTR_TASK = 0x0001,
IOTA_MACHINE_STATE_STACK_OVERFLOW = 0x0002,
IOTA_MACHINE_STATE_STACK_UNDERFLOW = 0x0003,
- IOTA_UNUSED_0004 = 0x0004,
- IOTA_UNUSED_0005 = 0x0005,
- IOTA_UNUSED_0006 = 0x0006,
- IOTA_UNUSED_0007 = 0x0007,
- IOTA_UNUSED_0008 = 0x0008,
- IOTA_UNUSED_0009 = 0x0009,
+ IOTA_MACHINE_CHECK_PANIC = 0x0004,
+ IOTA_DATA_STORAGE_PANIC = 0x0005,
+ IOTA_INSTRUCTION_STORAGE_PANIC = 0x0006,
+ IOTA_DATA_ALIGNMENT_PANIC = 0x0007,
+ IOTA_ILLEGAL_INSTRUCTION = 0x0008,
+ IOTA_SOFTWARE_HALT = 0x0009,
IOTA_UNUSED_000a = 0x000a,
IOTA_UNUSED_000d = 0x000d,
IOTA_UNUSED_001c = 0x001c,
@@ -256,5 +256,15 @@ typedef enum
IOTA_UNUSED_0d1f = 0x0d1f
} iotaPanicCode_t;
+#else
+
+/// Assembler specific panic codes
+#define IOTA_MACHINE_CHECK_PANIC 0x0004
+#define IOTA_DATA_STORAGE_PANIC 0x0005
+#define IOTA_INSTRUCTION_STORAGE_PANIC 0x0006
+#define IOTA_DATA_ALIGNMENT_PANIC 0x0007
+#define IOTA_ILLEGAL_INSTRUCTION 0x0008
+#define IOTA_SOFTWARE_HALT 0x0009
+
#endif // __ASSEMBLER__
#endif
diff --git a/import/chips/p9/procedures/ppe/iota/iota_ppe42.S b/import/chips/p9/procedures/ppe/iota/iota_ppe42.S
index f00fab4d..58ee0491 100644
--- a/import/chips/p9/procedures/ppe/iota/iota_ppe42.S
+++ b/import/chips/p9/procedures/ppe/iota/iota_ppe42.S
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2017 */
+/* COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -25,6 +25,7 @@
#include "iota.h"
#include "iota_ppe42.h"
#include "std_irq_config.h"
+#include "iota_panic_codes.h"
.global g_iota_execution_stack
@@ -134,7 +135,7 @@ __iota_save_interrupt_state_and_schedule:
.global __iota_halt
__iota_halt:
- trap
+ _pk_panic IOTA_SOFTWARE_HALT
## pull in the macro that calculates all the external interrupt config
## defined in pk/std/std_irq_config.h
diff --git a/import/chips/p9/procedures/ppe/iota/iota_ppe42.h b/import/chips/p9/procedures/ppe/iota/iota_ppe42.h
index 2779962f..aa9a26a7 100644
--- a/import/chips/p9/procedures/ppe/iota/iota_ppe42.h
+++ b/import/chips/p9/procedures/ppe/iota/iota_ppe42.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2017 */
+/* COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -66,6 +66,11 @@
#ifdef __ASSEMBLER__
// *INDENT-OFF*
+# halt ppe with panic code macro
+.macro _pk_panic, code
+ tw 31,(\code)/256, (\code)%256
+.endm
+
# This routine is called on any exception or interrupt and saves some state
# prior to setting up the call to and calling __iota_save_interrupt_state_and_schedule
# Note: must be <=8 instructions!
diff --git a/import/chips/p9/procedures/ppe/iota/iota_ppe42_vectors.S b/import/chips/p9/procedures/ppe/iota/iota_ppe42_vectors.S
index 271a3384..f7dade09 100644
--- a/import/chips/p9/procedures/ppe/iota/iota_ppe42_vectors.S
+++ b/import/chips/p9/procedures/ppe/iota/iota_ppe42_vectors.S
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2017 */
+/* COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -23,6 +23,7 @@
/* */
/* IBM_PROLOG_END_TAG */
#include "iota_ppe42.h"
+#include "iota_panic_codes.h"
.section .vectors, "ax", @progbits
@@ -31,7 +32,7 @@ __vectors:
.global __machine_check
__machine_check:
- trap
+ _pk_panic IOTA_MACHINE_CHECK_PANIC
.global __set_msr
.org __vectors + 0x0028
@@ -47,12 +48,12 @@ __system_reset:
.global __data_storage
.org __vectors + 0x0060
__data_storage:
- trap
+ _pk_panic IOTA_DATA_STORAGE_PANIC
.global __instruction_storage
.org __vectors + 0x0080
__instruction_storage:
- trap
+ _pk_panic IOTA_INSTRUCTION_STORAGE_PANIC
.global ppe42_64bit_timebase
.global __external_interrupt
@@ -63,12 +64,12 @@ __external_interrupt:
.global __alignment_exception
.org __vectors + 0x00c0
__alignment_exception:
- trap
+ _pk_panic IOTA_DATA_ALIGNMENT_PANIC
.global __program_exception
.org __vectors + 0x00e0
__program_exception:
- trap
+ _pk_panic IOTA_ILLEGAL_INSTRUCTION
.global __dec_interrupt
.org __vectors + 0x0100
OpenPOWER on IntegriCloud