summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe1
diff options
context:
space:
mode:
authorWilliam Bryan <wilbryan@us.ibm.com>2017-02-10 10:33:57 -0600
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-02-14 12:44:41 -0500
commitcae65cfeafd39ade2e6556974edf43313f92cdff (patch)
treefaa7522af4f3d84dd5bdd9efda654cdfdd2b58f9 /src/occ_gpe1
parent3efbd9ee6aa3547e856c72f37f7e734000c89b56 (diff)
downloadtalos-occ-cae65cfeafd39ade2e6556974edf43313f92cdff.tar.gz
talos-occ-cae65cfeafd39ade2e6556974edf43313f92cdff.zip
GPE Nest Frequency & Amester Name Changes
Change-Id: I46ee2502dcfd532b6ff30a32b0a645aecc285f21 RTC:168527 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36293 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe1')
-rw-r--r--src/occ_gpe1/gpe1_main.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/occ_gpe1/gpe1_main.c b/src/occ_gpe1/gpe1_main.c
index a7a3ff5..e35720d 100644
--- a/src/occ_gpe1/gpe1_main.c
+++ b/src/occ_gpe1/gpe1_main.c
@@ -31,25 +31,38 @@
#include "pk.h"
#include "ipc_api.h"
+#include "gpe_export.h"
#define KERNEL_STACK_SIZE 256
uint8_t G_kernel_stack[KERNEL_STACK_SIZE];
+//Point to the GPE shared structure
+#define GPE_SHARED_DATA_ADDR 0xFFFB3C00
+#define GPE_SHARED_DATA_SIZE 256
+
+gpe_shared_data_t * G_gpe_shared_data = (gpe_shared_data_t*) GPE_SHARED_DATA_ADDR;
// The main function is called by the boot code (after initializing some
// registers)
int main(int argc, char **argv)
{
int rc;
+ uint32_t l_timebase = G_gpe_shared_data->nest_freq_div;
+
+ // Don't initialize with a 0
+ if (!l_timebase)
+ {
+ l_timebase = PPE_TIMEBASE_HZ;
+ }
// initializes kernel data (stack, threads, timebase, timers, etc.)
pk_initialize((PkAddress)G_kernel_stack,
KERNEL_STACK_SIZE,
PK_TIMEBASE_CONTINUES,
- PPE_TIMEBASE_HZ);
+ l_timebase);
- PK_TRACE("Kernel init completed");
+ PK_TRACE("Kernel init completed, timebase is %d Hz", l_timebase);
// Disable IPC's and register the IPC interrupt handler
rc = ipc_init();
OpenPOWER on IntegriCloud