summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2011-07-18 13:01:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-07-19 13:43:56 -0500
commit103f2e58b35ac7218d9960ceb6568ff7ceb332d2 (patch)
treeef4c3bf1e3b8fe380e03d2fc256bdd46d10214fc /src/lib
parentbe301c4ea87c944bd1c51ca2c73ac719cec6b495 (diff)
downloadtalos-hostboot-103f2e58b35ac7218d9960ceb6568ff7ceb332d2.tar.gz
talos-hostboot-103f2e58b35ac7218d9960ceb6568ff7ceb332d2.zip
Shutdown and post status on HostBoot completion
Change-Id: If2ab46af85065b29695a1186ed331fd835944eb4 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/204 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cxxtest_stub.C11
-rw-r--r--src/lib/makefile3
-rw-r--r--src/lib/syscall_misc.C10
3 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/cxxtest_stub.C b/src/lib/cxxtest_stub.C
new file mode 100644
index 000000000..cbc98baee
--- /dev/null
+++ b/src/lib/cxxtest_stub.C
@@ -0,0 +1,11 @@
+#include <stdint.h>
+
+namespace CxxTest
+{
+
+// This variable is to allow a code in a binary image not containing the
+// testcase modules to query the number of failed tests
+uint64_t g_FailedTests = 0;
+
+}
+
diff --git a/src/lib/makefile b/src/lib/makefile
index 86735cf22..d4c4f70cb 100644
--- a/src/lib/makefile
+++ b/src/lib/makefile
@@ -2,6 +2,7 @@ ROOTPATH = ../..
OBJS = string.o stdlib.o assert.o stdio.o
OBJS += syscall_stub.o syscall_task.o syscall_msg.o
-OBJS += syscall_mmio.o syscall_time.o sync.o
+OBJS += syscall_mmio.o syscall_time.o sync.o syscall_misc.o
+OBJS += cxxtest_stub.o
include ${ROOTPATH}/config.mk
diff --git a/src/lib/syscall_misc.C b/src/lib/syscall_misc.C
new file mode 100644
index 000000000..6a4ad1845
--- /dev/null
+++ b/src/lib/syscall_misc.C
@@ -0,0 +1,10 @@
+#include <sys/misc.h>
+#include <sys/syscall.h>
+
+using namespace Systemcalls;
+
+void shutdown(uint64_t i_status)
+{
+ _syscall1(MISC_SHUTDOWN, reinterpret_cast<void*>(i_status));
+}
+
OpenPOWER on IntegriCloud