diff options
author | Shakeeb <shakeebbk@in.ibm.com> | 2016-08-26 00:28:41 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2016-08-26 12:03:22 -0400 |
commit | 64e062776e5df2fecfae5516fc699485679f349b (patch) | |
tree | c665322b2cb08e102c001ba43b7229af50dac97b /sbe/image/base_main.C | |
parent | 301e127c5c436dbdd1fc405d5f97ede495c2bf07 (diff) | |
download | talos-sbe-64e062776e5df2fecfae5516fc699485679f349b.tar.gz talos-sbe-64e062776e5df2fecfae5516fc699485679f349b.zip |
Introducing boot folder in SBE repo
Change-Id: I94cc46c5deccf9376d7919e589d1334e1f0cce22
RTC:159709
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28826
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'sbe/image/base_main.C')
-rw-r--r-- | sbe/image/base_main.C | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/sbe/image/base_main.C b/sbe/image/base_main.C deleted file mode 100644 index 97a9633b..00000000 --- a/sbe/image/base_main.C +++ /dev/null @@ -1,66 +0,0 @@ -//----------------------------------------------------------------------------- -// *! (C) Copyright International Business Machines Corp. 2014 -// *! All Rights Reserved -- Property of IBM -// *! *** IBM Confidential *** -//----------------------------------------------------------------------------- - -/// \file base_main.c -/// \brief base program that creates and starts a thread -/// -/// This file is a placeholder code in order to compile. I will be replaced in future by the code placed into the .text section. - -extern "C" { -#include "pk.h" -#include "pk_trace.h" -#include "base_ppe_main.h" -} -#define KERNEL_STACK_SIZE 256 -#define MAIN_THREAD_STACK_SIZE 256 - -uint8_t G_kernel_stack[KERNEL_STACK_SIZE]; -uint8_t G_main_thread_stack[MAIN_THREAD_STACK_SIZE]; -PkThread G_main_thread; - -// A simple thread that just increments a local variable and sleeps -void main_thread(void* arg) -{ - - while(1) - { - - pk_sleep(PK_SECONDS(1)); - - } -} - - -// The main function is called by the boot code (after initializing some -// registers) -int main(int argc, char **argv) -{ - // initializes kernel data (stack, threads, timebase, timers, etc.) - pk_initialize((PkAddress)G_kernel_stack, - KERNEL_STACK_SIZE, - 0, - 500000000); - - - //Initialize the thread control block for G_main_thread - pk_thread_create(&G_main_thread, - (PkThreadRoutine)main_thread, - (void*)NULL, - (PkAddress)G_main_thread_stack, - (size_t)MAIN_THREAD_STACK_SIZE, - (PkThreadPriority)1); - - - - //Make G_main_thread runnable - pk_thread_resume(&G_main_thread); - - // Start running the highest priority thread. - // This function never returns - pk_start_threads(); - - return 0; -} |