summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe1
diff options
context:
space:
mode:
authorWael El-Essawy <welessa@us.ibm.com>2016-09-16 10:18:30 -0500
committerWael El-Essawy <welessa@us.ibm.com>2016-09-23 16:04:11 -0400
commitd137bd848a05d5afd8a9ee5c9803f421ebd0a922 (patch)
tree75fa87939a9f7028921504e9b6a27cbd138af930 /src/occ_gpe1
parenta1788a7353ef2072534b77f79396c04ade749314 (diff)
downloadtalos-occ-d137bd848a05d5afd8a9ee5c9803f421ebd0a922.tar.gz
talos-occ-d137bd848a05d5afd8a9ee5c9803f421ebd0a922.zip
Enable FW Timing Sensors
Enable scheduling of the GPE NOP task to do GPE timings and verify all sensors being updated in amec_update_fw_sensors() are being populated correctly. Change-Id: I623dd7518be9a8736e601c7d2fa748097a4d773a RTC: 141299 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29849 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Wael El-Essawy <welessa@us.ibm.com>
Diffstat (limited to 'src/occ_gpe1')
-rw-r--r--src/occ_gpe1/gpe1_main.c1
-rw-r--r--src/occ_gpe1/ipc_func_tables.c3
-rw-r--r--src/occ_gpe1/nop.c61
-rw-r--r--src/occ_gpe1/topfiles.mk2
4 files changed, 65 insertions, 2 deletions
diff --git a/src/occ_gpe1/gpe1_main.c b/src/occ_gpe1/gpe1_main.c
index 88f3be8..a7a3ff5 100644
--- a/src/occ_gpe1/gpe1_main.c
+++ b/src/occ_gpe1/gpe1_main.c
@@ -69,3 +69,4 @@ int main(int argc, char **argv)
return 0;
}
+
diff --git a/src/occ_gpe1/ipc_func_tables.c b/src/occ_gpe1/ipc_func_tables.c
index ab352c6..d575ae3 100644
--- a/src/occ_gpe1/ipc_func_tables.c
+++ b/src/occ_gpe1/ipc_func_tables.c
@@ -26,6 +26,7 @@
#include "gpe1_dimm.h"
void gpe_dimm_control(ipc_msg_t* cmd, void* arg);
+void gpe1_nop(ipc_msg_t* cmd, void* arg);
// Function table for multi target (common) functions
IPC_MT_FUNC_TABLE_START
@@ -43,7 +44,7 @@ IPC_MT_FUNC_TABLE_END
IPC_ST_FUNC_TABLE_START
IPC_HANDLER(gpe_dimm_sm, 0) // 0 - IPC_ST_DIMM_SM_FUNCID
IPC_HANDLER(gpe_dimm_control, 0) // 1 - IPC_ST_DIMM_CONTROL_FUNCID
-IPC_HANDLER_DEFAULT // 2
+IPC_HANDLER(gpe1_nop, 0) // 2 - IPC_ST_GPE1_NOP
IPC_HANDLER_DEFAULT // 3
IPC_HANDLER_DEFAULT // 4
IPC_HANDLER_DEFAULT // 5
diff --git a/src/occ_gpe1/nop.c b/src/occ_gpe1/nop.c
new file mode 100644
index 0000000..5a99c64
--- /dev/null
+++ b/src/occ_gpe1/nop.c
@@ -0,0 +1,61 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/occ_gpe1/nop.c $ */
+/* */
+/* OpenPOWER OnChipController Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#include "pk.h"
+#include "ppe42_scom.h"
+#include "gpe_export.h"
+#include "ipc_api.h"
+#include "ipc_async_cmd.h"
+#include "gpe_util.h"
+
+/*
+ * Function Specification:
+ *
+ * Name: gpe1_nop
+ *
+ * Description: a function that does nothing. Called to measure IPC timing
+ *
+ * Inputs: none
+ *
+ * return: none
+ *
+ * End Function Specification
+ */
+
+void gpe1_nop(ipc_msg_t* cmd, void* arg)
+{
+ int rc;
+ ipc_async_cmd_t *async_cmd = (ipc_async_cmd_t*)cmd;
+ nop_t *args = (nop_t*)async_cmd->cmd_data;
+
+ // send back a response, IPC success even if ffdc/rc are non zeros
+ rc = ipc_send_rsp(cmd, IPC_RC_SUCCESS);
+ if(rc)
+ {
+ PK_TRACE("gpe1_nop: Failed to send response back. Halting GPE1", rc);
+ gpe_set_ffdc(&(args->error), 0x00, GPE_RC_IPC_SEND_FAILED, rc);
+ pk_halt();
+ }
+}
diff --git a/src/occ_gpe1/topfiles.mk b/src/occ_gpe1/topfiles.mk
index 4499c81..75a8fbc 100644
--- a/src/occ_gpe1/topfiles.mk
+++ b/src/occ_gpe1/topfiles.mk
@@ -23,7 +23,7 @@
#
# IBM_PROLOG_END_TAG
-TOP-C-SOURCES = gpe1_main.c gpe1_dimm_read.c gpe1_dimm_reset.c \
+TOP-C-SOURCES = gpe1_main.c gpe1_dimm_read.c gpe1_dimm_reset.c nop.c \
pk_app_irq_table.c ipc_func_tables.c gpe1_dimm_control.c
TOP-S-SOURCES =
OpenPOWER on IntegriCloud