summaryrefslogtreecommitdiffstats
path: root/src/occ_405
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-12-19 14:22:12 -0600
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-01-06 17:16:30 -0500
commit4141b5f5fef2ba4b444aabbda1677e7f583cd4e8 (patch)
tree67dafd53acb7ca08095bf7fc589290067bb40918 /src/occ_405
parent0574ccc28414c9b71d4be3843c8b1f4f4f822e4f (diff)
downloadtalos-occ-4141b5f5fef2ba4b444aabbda1677e7f583cd4e8.tar.gz
talos-occ-4141b5f5fef2ba4b444aabbda1677e7f583cd4e8.zip
Initial Wof commit
Contains initial WOF directory structure Change-Id: I24ec77ca11dc711ff44c0b378f64d96696838ee1 RTC:130216 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34298 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405')
-rwxr-xr-xsrc/occ_405/Makefile3
-rwxr-xr-xsrc/occ_405/amec/amec_slave_smh.c37
-rw-r--r--src/occ_405/img_defs.mk1
-rwxr-xr-xsrc/occ_405/incl/comp_ids.h6
-rw-r--r--src/occ_405/occLinkInputFile3
-rw-r--r--src/occ_405/topfiles.mk3
-rw-r--r--src/occ_405/wof/wof.c31
-rw-r--r--src/occ_405/wof/wof.h40
8 files changed, 119 insertions, 5 deletions
diff --git a/src/occ_405/Makefile b/src/occ_405/Makefile
index ccd0c8b..3fb1250 100755
--- a/src/occ_405/Makefile
+++ b/src/occ_405/Makefile
@@ -68,7 +68,8 @@ LIB_DIRS = -L$(OBJDIR) \
-L$(OBJDIR)/proc \
-L$(OBJDIR)/firdata \
-L$(OBJDIR)/cent \
- -L$(OBJDIR)/mem
+ -L$(OBJDIR)/mem \
+ -L$(OBJDIR)/wof
#default target is to make a binary application image
.PHONY : all
diff --git a/src/occ_405/amec/amec_slave_smh.c b/src/occ_405/amec/amec_slave_smh.c
index dd35652..1385e8b 100755
--- a/src/occ_405/amec/amec_slave_smh.c
+++ b/src/occ_405/amec/amec_slave_smh.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2016 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -55,6 +55,7 @@
#include <amec_health.h>
#include <amec_analytics.h>
#include <common.h>
+#include <wof.h>
//*************************************************************************
// Externs
@@ -517,6 +518,40 @@ void amec_slv_state_4(void)
//-------------------------------------------------------
amec_update_centaur_sensors(CENTAUR_4);
*/
+
+ //-------------------------------------------------------
+ // Run WOF Algorithm
+ //-------------------------------------------------------
+ if( IS_OCC_STATE_ACTIVE() )
+ {
+ /* TODO: RTC: 166301 - Logic to determine if WOF algorithm should run.
+ static bool run_wof_algoritm = true;
+
+ if( !run_wof_algorithm )
+ {
+ // When false, the last invocation decided we need to wait 2 ms
+ // run wof algo next time.
+ run_wof_algorithm = true;
+ }
+ else
+ {
+ //if IPC command is idle and ready to go
+ //{
+ //wof_main();
+ run_wof_algorithm = false;
+ //}
+ //else if IPC command is still waiting
+ //make thread wait another 2 ms
+ //{
+ // run_wof_algorithm = true;
+ //}
+ //else if IPC command is returning an error
+ //{
+ // flag the error, request a reset
+ //}
+ }
+ */
+ }
}
diff --git a/src/occ_405/img_defs.mk b/src/occ_405/img_defs.mk
index 529bdf2..abdef45 100644
--- a/src/occ_405/img_defs.mk
+++ b/src/occ_405/img_defs.mk
@@ -238,6 +238,7 @@ APP_INCLUDES = -I$(IMAGE_SRCDIR)/rtls \
-I$(IMAGE_SRCDIR)/dimm \
-I$(IMAGE_SRCDIR)/mem \
-I$(IMAGE_SRCDIR)/lock \
+ -I$(IMAGE_SRCDIR)/wof \
-I$(IMAGE_SRCDIR)/../common \
INCLUDES += $(IMG_INCLUDES) $(GLOBAL_INCLUDES) $(APP_INCLUDES) \
diff --git a/src/occ_405/incl/comp_ids.h b/src/occ_405/incl/comp_ids.h
index 0845754..893b9f9 100755
--- a/src/occ_405/incl/comp_ids.h
+++ b/src/occ_405/incl/comp_ids.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -87,5 +87,9 @@
// MEMORY Control
#define MEM_COMP_ID 0x1000
#define MEM_COMP_NAME "MEM"
+
+// Workload Optimize Frequency
+#define WOF_COMP_ID 0x1100
+#define WOF_COMP_NAME "WOF"
#endif
diff --git a/src/occ_405/occLinkInputFile b/src/occ_405/occLinkInputFile
index acca23c..16dbd5f 100644
--- a/src/occ_405/occLinkInputFile
+++ b/src/occ_405/occLinkInputFile
@@ -94,4 +94,5 @@ INPUT ( amec_amester.o
state.o
threadSch.o
timer.o
- trac_interface.o)
+ trac_interface.o
+ wof.o)
diff --git a/src/occ_405/topfiles.mk b/src/occ_405/topfiles.mk
index 575b9b3..c5c16a0 100644
--- a/src/occ_405/topfiles.mk
+++ b/src/occ_405/topfiles.mk
@@ -89,7 +89,8 @@ TOP-C-SOURCES = amec/amec_analytics.c \
thread/chom.c \
thread/threadSch.c \
timer/timer.c \
- trac/trac_interface.c
+ trac/trac_interface.c \
+ wof/wof.c
TOP-S-SOURCES = cmdh/ll_ffdc.S \
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
new file mode 100644
index 0000000..2adde1f
--- /dev/null
+++ b/src/occ_405/wof/wof.c
@@ -0,0 +1,31 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/occ_405/wof/wof.c $ */
+/* */
+/* OpenPOWER OnChipController Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* [+] 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 <errl.h>
+#include <trac.h>
+#include "wof.h"
+
+
+
+
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
new file mode 100644
index 0000000..ba19383
--- /dev/null
+++ b/src/occ_405/wof/wof.h
@@ -0,0 +1,40 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/occ_405/wof/wof.h $ */
+/* */
+/* OpenPOWER OnChipController Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* [+] 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 */
+#ifndef _WOF_H
+#define _WOF_H
+
+
+
+
+
+//******************************************************************************
+// Globals
+//******************************************************************************
+
+//******************************************************************************
+// Function Prototypes
+//******************************************************************************
+
+#endif
OpenPOWER on IntegriCloud