summaryrefslogtreecommitdiffstats
path: root/purgatory
diff options
context:
space:
mode:
authorFrancesco Chiechi <francesco.chiechi@colibre.it>2007-06-02 00:21:38 +0200
committerSimon Horman <horms@verge.net.au>2008-03-06 18:50:46 +0900
commitb5e636231886469fcd47fa4d236fa316c4e15251 (patch)
treef2ec49396f81f661e1bef150dd4c74de0a55bc83 /purgatory
parenteebc0569dc49693a77821ba716832e8bf833076e (diff)
downloadkexec-tools-b5e636231886469fcd47fa4d236fa316c4e15251.tar.gz
kexec-tools: mipsel: mipsel port
Hello, We developed a patch to port kexec-tools to mips arch and included support for command line passing through elf boot notes. We did it for a customer of ours on a specific platform derived from toshiba tx4938 (so we think it should work at least for tx4938 evaluation board also). We would like to contribute it in case somebody else needs it or wants to improve it. This patch works for us but the assembler part in particular, should be considered as a starting point because my assembly knowledge is not too deep. As this is the first time I submit a patch I tried to guess reading tpp.txt if this is the right way to submit. Please let me know about any mistakes I may have made. Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r--purgatory/arch/mipsel/Makefile7
-rw-r--r--purgatory/arch/mipsel/console-mipsel.c5
-rw-r--r--purgatory/arch/mipsel/include/limits.h58
-rw-r--r--purgatory/arch/mipsel/include/stdint.h16
-rw-r--r--purgatory/arch/mipsel/purgatory-mipsel.c7
-rw-r--r--purgatory/arch/mipsel/purgatory-mipsel.h6
6 files changed, 99 insertions, 0 deletions
diff --git a/purgatory/arch/mipsel/Makefile b/purgatory/arch/mipsel/Makefile
new file mode 100644
index 00000000..7ff1702c
--- /dev/null
+++ b/purgatory/arch/mipsel/Makefile
@@ -0,0 +1,7 @@
+#
+# Purgatory mipsel
+#
+
+PURGATORY_C_SRCS+= purgatory/arch/mipsel/purgatory-mipsel.c
+PURGATORY_C_SRCS+= purgatory/arch/mipsel/console-mipsel.c
+
diff --git a/purgatory/arch/mipsel/console-mipsel.c b/purgatory/arch/mipsel/console-mipsel.c
new file mode 100644
index 00000000..389b7be0
--- /dev/null
+++ b/purgatory/arch/mipsel/console-mipsel.c
@@ -0,0 +1,5 @@
+#include <purgatory.h>
+void putchar(int ch)
+{
+ /* Nothing for now */
+}
diff --git a/purgatory/arch/mipsel/include/limits.h b/purgatory/arch/mipsel/include/limits.h
new file mode 100644
index 00000000..9a021ca8
--- /dev/null
+++ b/purgatory/arch/mipsel/include/limits.h
@@ -0,0 +1,58 @@
+#ifndef LIMITS_H
+#define LIMITS_H 1
+
+
+/* Number of bits in a `char' */
+#define CHAR_BIT 8
+
+/* Minimum and maximum values a `signed char' can hold */
+#define SCHAR_MIN (-128)
+#define SCHAR_MAX 127
+
+/* Maximum value an `unsigned char' can hold. (Minimum is 0.) */
+#define UCHAR_MAX 255
+
+/* Minimum and maximum values a `char' can hold */
+#define CHAR_MIN SCHAR_MIN
+#define CHAR_MAX SCHAR_MAX
+
+/* Minimum and maximum values a `signed short int' can hold */
+#define SHRT_MIN (-32768)
+#define SHRT_MAX 32767
+
+/* Maximum value an `unsigned short' can hold. (Minimum is 0.) */
+#define USHRT_MAX 65535
+
+
+/* Minimum and maximum values a `signed int' can hold */
+#define INT_MIN (-INT_MAX - 1)
+#define INT_MAX 2147483647
+
+/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
+#define UINT_MAX 4294967295U
+
+
+/* Minimum and maximum values a `signed int' can hold */
+#define INT_MIN (-INT_MAX - 1)
+#define INT_MAX 2147483647
+
+/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
+#define UINT_MAX 4294967295U
+
+/* Minimum and maximum values a `signed long' can hold */
+#define LONG_MAX 2147483647L
+#define LONG_MIN (-LONG_MAX - 1L)
+
+/* Maximum value an `unsigned long' can hold. (Minimum is 0.) */
+#define ULONG_MAX 4294967295UL
+
+/* Minimum and maximum values a `signed long long' can hold */
+#define LLONG_MAX 9223372036854775807LL
+#define LLONG_MIN (-LONG_MAX - 1LL)
+
+
+/* Maximum value an `unsigned long long' can hold. (Minimum is 0.) */
+#define ULLONG_MAX 18446744073709551615ULL
+
+
+#endif /* LIMITS_H */
diff --git a/purgatory/arch/mipsel/include/stdint.h b/purgatory/arch/mipsel/include/stdint.h
new file mode 100644
index 00000000..79262c20
--- /dev/null
+++ b/purgatory/arch/mipsel/include/stdint.h
@@ -0,0 +1,16 @@
+#ifndef STDINT_H
+#define STDINT_H
+
+typedef unsigned long size_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+
+#endif /* STDINT_H */
diff --git a/purgatory/arch/mipsel/purgatory-mipsel.c b/purgatory/arch/mipsel/purgatory-mipsel.c
new file mode 100644
index 00000000..f8780def
--- /dev/null
+++ b/purgatory/arch/mipsel/purgatory-mipsel.c
@@ -0,0 +1,7 @@
+#include <purgatory.h>
+#include "purgatory-mipsel.h"
+
+void setup_arch(void)
+{
+ /* Nothing for now */
+}
diff --git a/purgatory/arch/mipsel/purgatory-mipsel.h b/purgatory/arch/mipsel/purgatory-mipsel.h
new file mode 100644
index 00000000..c57b4029
--- /dev/null
+++ b/purgatory/arch/mipsel/purgatory-mipsel.h
@@ -0,0 +1,6 @@
+#ifndef PURGATORY_MIPSEL_H
+#define PURGATORY_MIPSEL_H
+
+/* nothing yet */
+
+#endif /* PURGATORY_MIPSEL_H */