Skip to content

Commit

Permalink
Initial Wof commit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aalugore authored and wilbryan committed Jan 6, 2017
1 parent 0574ccc commit 4141b5f
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/occ_405/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 36 additions & 1 deletion src/occ_405/amec/amec_slave_smh.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2016 */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -55,6 +55,7 @@
#include <amec_health.h>
#include <amec_analytics.h>
#include <common.h>
#include <wof.h>

//*************************************************************************
// Externs
Expand Down Expand Up @@ -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
//}
}
*/
}
}


Expand Down
1 change: 1 addition & 0 deletions src/occ_405/img_defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
6 changes: 5 additions & 1 deletion src/occ_405/incl/comp_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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

3 changes: 2 additions & 1 deletion src/occ_405/occLinkInputFile
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ INPUT ( amec_amester.o
state.o
threadSch.o
timer.o
trac_interface.o)
trac_interface.o
wof.o)
3 changes: 2 additions & 1 deletion src/occ_405/topfiles.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \

Expand Down
31 changes: 31 additions & 0 deletions src/occ_405/wof/wof.c
Original file line number Diff line number Diff line change
@@ -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"




40 changes: 40 additions & 0 deletions src/occ_405/wof/wof.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4141b5f

Please sign in to comment.