diff options
author | Missy Connell <missyc@us.ibm.com> | 2012-10-22 16:25:14 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-10-24 15:43:41 -0500 |
commit | ad829721422d652ea89123c6e4c8aecdee0144af (patch) | |
tree | bcf03c419c8aa87e8c235355cd5c2440a3c7266f /src/kernel | |
parent | 799ce7095b6a019d4103685ae85558418b9368c7 (diff) | |
download | talos-hostboot-ad829721422d652ea89123c6e4c8aecdee0144af.tar.gz talos-hostboot-ad829721422d652ea89123c6e4c8aecdee0144af.zip |
Terminate Immediate Structure defintion
- Add include files into the fsp.tar
Change-Id: I12a50f7e09f70b1bc6acf436d896b6f3747a7507
RTC:50578
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2115
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/forceattn_p8.S | 41 | ||||
-rw-r--r-- | src/kernel/makefile | 30 | ||||
-rw-r--r-- | src/kernel/start.S | 10 | ||||
-rw-r--r-- | src/kernel/terminate.C | 56 | ||||
-rw-r--r-- | src/kernel/terminate.S | 40 |
5 files changed, 122 insertions, 55 deletions
diff --git a/src/kernel/forceattn_p8.S b/src/kernel/forceattn_p8.S new file mode 100644 index 000000000..6e60ca43a --- /dev/null +++ b/src/kernel/forceattn_p8.S @@ -0,0 +1,41 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/forceattn_p8.S $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +.include "kernel/ppcconsts.S" + + +.global p8_force_attn +p8_force_attn: + li r0, 1 + mfspr r9, HID0 + insrdi r9,r0,1,31 /* Turn on bit 31. */ + sync + mtspr HID0,r9 /* Enable attentions */ + mfspr r9, HID0 + mfspr r9, HID0 + mfspr r9, HID0 + mfspr r9, HID0 + mfspr r9, HID0 + mfspr r9, HID0 + isync + attn + b 0 diff --git a/src/kernel/makefile b/src/kernel/makefile index b448e9d68..67766b2b8 100644 --- a/src/kernel/makefile +++ b/src/kernel/makefile @@ -1,25 +1,25 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/kernel/makefile $ +# $Source: src/kernel/makefile $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2010-2012 +# COPYRIGHT International Business Machines Corp. 2010,2012 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END_TAG +# IBM_PROLOG_END_TAG ROOTPATH = ../.. OBJS = start.o kernel.o console.o pagemgr.o heapmgr.o taskmgr.o cpumgr.o @@ -27,7 +27,7 @@ OBJS += syscall.o scheduler.o spinlock.o exception.o vmmmgr.o timemgr.o OBJS += futexmgr.o ptmgr.o segmentmgr.o devicesegment.o basesegment.o OBJS += block.o cpuid.o misc.o msghandler.o blockmsghdlr.o stacksegment.o OBJS += softpatch_p7.o barrier.o idebug.o intmsghandler.o deferred.o -OBJS += shutdown.o +OBJS += shutdown.o forceattn_p8.o terminate.o include ${ROOTPATH}/config.mk diff --git a/src/kernel/start.S b/src/kernel/start.S index 41a35735c..2cd97d816 100644 --- a/src/kernel/start.S +++ b/src/kernel/start.S @@ -243,6 +243,16 @@ softpatch_stub: STD_INTERRUPT_NOADDR(softpatch) .section .text.kernelasm + +;// Hostboot descriptor pointer. +;// +;// This must be the first entry in the .text.kernelasm section so that it +;// ends up at 0x2000 in our kernel image. +kernel_descriptor: + .byte 'H', 'O', 'S', 'T', 'B', 'O', 'O', 'T' + .quad kernel_hbDescriptor + + ;// _main: ;// Set up stack and TOC and call kernel's main. _main: diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C new file mode 100644 index 000000000..b5834a7b3 --- /dev/null +++ b/src/kernel/terminate.C @@ -0,0 +1,56 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/terminate.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ + +#include <kernel/hbdescriptor.H> +#include <kernel/hbterminatetypes.H> +#include <kernel/terminate.H> +#include <stdint.h> +#include <kernel/console.H> + +#include <builtins.h> + +extern "C" void p8_force_attn() NO_RETURN; + + +/* Instance of the TI Data Area */ +HB_TI_DataArea kernel_TIDataArea; + +/* Instance of the HB desriptor struct */ +HB_Descriptor kernel_hbDescriptor = {&kernel_TIDataArea}; + +void terminateAndUpdateSaveArea(uint16_t i_type, uint16_t i_source, uint64_t *i_src, uint64_t + plid) +{ + +printk("Inside terminateandupdateSaveArea!!!!!!!!!!!!!!! \n"); + kernel_TIDataArea.type = i_type; + kernel_TIDataArea.source = i_source; + memcpy(i_src, kernel_TIDataArea.src, sizeof (kernel_TIDataArea.src)); + kernel_TIDataArea.plid = plid; + + +printk("Calling p8_force_attn!!! dying.... \n"); + // After the data is set up .. call the function that actually executes the TI. + p8_force_attn(); + +} diff --git a/src/kernel/terminate.S b/src/kernel/terminate.S deleted file mode 100644 index 29d7bc9ce..000000000 --- a/src/kernel/terminate.S +++ /dev/null @@ -1,40 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/kernel/terminate.S $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END -.include "kernel/ppcconsts.S" - -.global hal_p7_terminate_immediate -hal_p7_terminate_immediate: - li r0, 1 - mfspr r9, HID0 - insrdi r9,r0,1,31 /* Turn on bit 31. */ - sync - mtspr HID0,r9 /* Enable attentions */ - mfspr r9, HID0 - mfspr r9, HID0 - mfspr r9, HID0 - mfspr r9, HID0 - mfspr r9, HID0 - mfspr r9, HID0 - isync - attn - b 0 |