aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAruna Balakrishnaiah <aruna@linux.vnet.ibm.com>2014-08-13 14:01:28 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-13 18:42:25 +1000
commit09e10d2d029fd30442f5b057bae3c80494d150d5 (patch)
tree3a8dd29bb274d502b34b0d34df4af5a520236337 /hw
parent5b23b0c698e475042abb0b617521b22004b1461d (diff)
downloadskiboot-09e10d2d029fd30442f5b057bae3c80494d150d5.zip
skiboot-09e10d2d029fd30442f5b057bae3c80494d150d5.tar.gz
skiboot-09e10d2d029fd30442f5b057bae3c80494d150d5.tar.bz2
attn: Add default attn src in the src section
Generating src dynamically results in: 1. Difficulty in documenting and for field people to understand. 2. It might also conflict with existing srcs. Hence add default SRC in SRC section. Assert function call address in hex word 2. errl -d <elog-entry-id>: .. | Reference Code : BB821410 | | Hex Words 2 - 5 : 30017610 00000000 00000000 00000000 | .. Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-attn.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/fsp/fsp-attn.c b/hw/fsp/fsp-attn.c
index 32e3f02..07c99c0 100644
--- a/hw/fsp/fsp-attn.c
+++ b/hw/fsp/fsp-attn.c
@@ -47,11 +47,10 @@
*/
#define TI_SRC_LEN 0x48
-/* Generate src from assert function's address
- * First byte in the SRC used for source opal src_type
- * Next 3 bytes used for assert function call address
+/* Generate hex word from assert function's address
+ * 4 bytes used for assert function call address
*/
-#define generate_attn_src(addr) (OPAL_SRC_TYPE_ERROR << 24 | (addr & 0xffffff))
+#define generate_hex_word(addr) (addr & 0xffffffff)
static struct ti_attn *ti_attn;
@@ -83,6 +82,7 @@ static void init_sp_attn_area(void)
/* #HEX words */
ti_attn->hex_cnt = TI_HEX_WORDS;
ti_attn->src_len = CPU_TO_BE16(TI_SRC_LEN);
+ sprintf(ti_attn->src, "%X", generate_src_from_comp(OPAL_RC_ATTN));
}
/* Updates src in sp attention area
@@ -92,8 +92,8 @@ void update_sp_attn_area(const char *msg)
if (!fsp_present())
return;
- sprintf(ti_attn->src, "%X",
- (uint32_t)generate_attn_src((uint64_t)__builtin_return_address(0)));
+ ti_attn->src_word[0] =
+ (uint32_t)generate_hex_word((uint64_t)__builtin_return_address(0));
ti_attn->msg_len = strlen(msg);
sprintf(ti_attn->msg, "%s", msg);