summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/qemuppc/include
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/powerpc/qemuppc/include')
-rw-r--r--bsps/powerpc/qemuppc/include/bsp.h47
-rw-r--r--bsps/powerpc/qemuppc/include/bsp/irq.h76
-rw-r--r--bsps/powerpc/qemuppc/include/tm27.h1
3 files changed, 124 insertions, 0 deletions
diff --git a/bsps/powerpc/qemuppc/include/bsp.h b/bsps/powerpc/qemuppc/include/bsp.h
new file mode 100644
index 0000000000..240cfd3bea
--- /dev/null
+++ b/bsps/powerpc/qemuppc/include/bsp.h
@@ -0,0 +1,47 @@
+/*
+ * This include file contains some definitions specific to the
+ * qemu powerpc Prep simulator
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef LIBBSP_POWERPC_QEMUPPC_BSP_H
+#define LIBBSP_POWERPC_QEMUPPC_BSP_H
+
+#ifndef ASM
+
+#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Convert decrementer value to tenths of microseconds (used by shared timer
+ * driver).
+ */
+#define BSP_Convert_decrementer( _value ) \
+ ((int) (((_value) * 10) / bsp_clicks_per_usec))
+
+/*
+ * Prototypes for methods that are referenced from .S
+ */
+void cmain(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !ASM */
+
+#endif
diff --git a/bsps/powerpc/qemuppc/include/bsp/irq.h b/bsps/powerpc/qemuppc/include/bsp/irq.h
new file mode 100644
index 0000000000..7124dbcaf8
--- /dev/null
+++ b/bsps/powerpc/qemuppc/include/bsp/irq.h
@@ -0,0 +1,76 @@
+/* irq.h
+ *
+ * This include file describe the data structure and the functions implemented
+ * by rtems to write interrupt handlers.
+ *
+ * CopyRight (C) 1999 valette@crf.canon.fr
+ *
+ * This code is heavilly inspired by the public specification of STREAM V2
+ * that can be found at :
+ *
+ * <http://www.chorus.com/Documentation/index.html> by following
+ * the STREAM API Specification Document link.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef LIBBSP_POWERPC_IRQ_H
+#define LIBBSP_POWERPC_IRQ_H
+
+#define BSP_SHARED_HANDLER_SUPPORT 1
+
+#ifndef ASM
+
+#include <rtems/irq.h>
+
+
+/*
+ * Symblolic IRQ names and related definitions.
+ */
+
+/*
+ * PCI IRQ handlers related definitions
+ * CAUTION : BSP_PCI_IRQ_LOWEST_OFFSET should be equal to OPENPIC_VEC_SOURCE
+ */
+/* FIXME: do we need PCI interrrupts here ? */
+#define BSP_PCI_IRQ_NUMBER (16)
+#define BSP_PCI_IRQ_LOWEST_OFFSET (0)
+#define BSP_PCI_IRQ_MAX_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER - 1)
+
+#define BSP_PROCESSOR_IRQ_NUMBER (1)
+#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_PCI_IRQ_MAX_OFFSET)
+#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET+BSP_PROCESSOR_IRQ_NUMBER-1)
+
+
+ /*
+ * Summary
+ */
+#define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
+#define BSP_LOWEST_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET)
+#define BSP_MAX_OFFSET (BSP_IRQ_NUMBER - 1)
+
+ /*
+ * Some Processor execption handled as rtems IRQ symbolic name definition
+ */
+#define BSP_DECREMENTER (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
+
+#define BSP_INTERRUPT_VECTOR_MIN BSP_LOWEST_OFFSET
+
+#define BSP_INTERRUPT_VECTOR_MAX BSP_MAX_OFFSET
+
+/* #include <bsp/irq_supp.h> */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void BSP_rtems_irq_mng_init(unsigned cpuId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/bsps/powerpc/qemuppc/include/tm27.h b/bsps/powerpc/qemuppc/include/tm27.h
new file mode 100644
index 0000000000..0dfa7bf628
--- /dev/null
+++ b/bsps/powerpc/qemuppc/include/tm27.h
@@ -0,0 +1 @@
+#include <rtems/tm27-default.h>