aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp/fsp-elog-write.c
diff options
context:
space:
mode:
authorDeepthi Dharwar <deepthi@linux.vnet.ibm.com>2014-07-24 12:01:43 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-25 14:10:51 +1000
commit7c498050b5404a77023e0cea35cba2f74150e48b (patch)
tree37ab4008f91f50df81d91654671c9beca85334e8 /hw/fsp/fsp-elog-write.c
parent6e993f3fffcbe96d3760c5ebb5815245358fd367 (diff)
downloadskiboot-7c498050b5404a77023e0cea35cba2f74150e48b.zip
skiboot-7c498050b5404a77023e0cea35cba2f74150e48b.tar.gz
skiboot-7c498050b5404a77023e0cea35cba2f74150e48b.tar.bz2
elog: Reserve TCE buffer for pushing logs to the host
Allocate 16K buffer to push PEL logs to the host in case of unresponsive FSP. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/fsp/fsp-elog-write.c')
-rw-r--r--hw/fsp/fsp-elog-write.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index c886b50..3802676 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -50,12 +50,15 @@ static uint32_t sapphire_elog_id = 0xB0000000;
static uint32_t powernv_elog_id = 0xB1000000;
/* log buffer to copy FSP log for READ */
-#define ELOG_WRITE_TO_FSP_BUFFER_SIZE 0x00050000
+#define ELOG_WRITE_TO_FSP_BUFFER_SIZE 0x00040000
static void *elog_write_to_fsp_buffer;
#define ELOG_PANIC_WRITE_BUFFER_SIZE 0x0010000
static void *elog_panic_write_buffer;
+#define ELOG_WRITE_TO_HOST_BUFFER_SIZE 0x0010000
+static void *elog_write_to_host_buffer;
+
struct opal_errorlog *panic_write_buffer;
static int panic_write_buffer_valid;
static uint32_t elog_write_retries;
@@ -656,6 +659,13 @@ void fsp_elog_write_init(void)
return;
}
+ elog_write_to_host_buffer = memalign(TCE_PSIZE,
+ ELOG_WRITE_TO_HOST_BUFFER_SIZE);
+ if (!elog_write_to_host_buffer) {
+ prerror("FSP: could not allocate ELOG_WRITE_TO_HOST_BUFFER!\n");
+ return;
+ }
+
/* Map TCEs */
fsp_tce_map(PSI_DMA_ELOG_PANIC_WRITE_BUF, elog_panic_write_buffer,
PSI_DMA_ELOG_PANIC_WRITE_BUF_SZ);
@@ -663,6 +673,9 @@ void fsp_elog_write_init(void)
fsp_tce_map(PSI_DMA_ERRLOG_WRITE_BUF, elog_write_to_fsp_buffer,
PSI_DMA_ERRLOG_WRITE_BUF_SZ);
+ fsp_tce_map(PSI_DMA_ELOG_WR_TO_HOST_BUF, elog_write_to_host_buffer,
+ PSI_DMA_ELOG_WR_TO_HOST_BUF_SZ);
+
/* pre-allocate memory for 64 records */
if (init_elog_write_free_list(ELOG_WRITE_MAX_RECORD)) {
prerror("ELOG: Cannot allocate WRITE buffers to log errors!\n");