* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#define __ASSEMBLY_SOURCE
#include <config.h>
+#include <arch.h>
#include "defs.h"
#include "apic.h"
cmp $INT(2), %al
jnz 2f
orl $0x00010000, %eax
-2:
+2:
/* *** Previous comment block is required for this to work properly ***
movl %eax, 16(%esp)
movl %edx, 12(%esp)
#endif /* CONFIG_APIC */
-#define EXC_VECTOR0 0x00
-#define INT_VECTOR0 0x40
-#define SYS_VECTOR0 SYS_VECTOR_CORAX
-
-#define SYS_VECTOR_CORAX 0xCC
-#define SYS_VECTOR_CXNET 0xCD
-#define SYS_VECTOR_CXIPC 0xCE
-
-#if FEATURE(POSIX)
-#define SYS_VECTOR_POSIX 0x80
-#endif /* FEATURE(POSIX) */
-
-#define NUM_EXC_VECTORS 21
-#if CONFIG_APIC == 1
-#define NUM_INT_VECTORS 24
-#else
-#define NUM_INT_VECTORS 16
-#endif /* CONFIG_APIC */
-#define NUM_SYS_VECTORS 1
-
/* i8259 definitions */
#define PIC1_BASE 0x20
#define PIC1_COMM PIC1_BASE
#define EXC_VIRTUALIZATION EXC(20)
#define EXC_MAX EXC(21)
-/* Interrupt vectors */
-
-#define INT(n) (INT_VECTOR0 + (n))
-#define INT_TIMER INT(0)
-#define INT_KEYBOARD INT(1)
-
-#if CONFIG_APIC == 1
-
-#define INT_APICERR INT(-2)
-#define INT_SPURIOUS INT(-1)
-/* what do we use INT 2 on APIC systems for? */
-#else
-/* on non-APIC systems, INT 2 is the cascaded i8259 PIC */
-#define INT_I8259 INT(2)
-#endif /* CONFIG_APIC */
-
-#define INT_FLOPPY INT(3)
-#define INT_HARDDRIVE INT(4)
-#define INT_RTC INT(5)
-#define INT_HPET INT(6) /* is it really? */
-#define INT_NETWORK INT(7)
-#define INT_MAX INT(8)
+/* Interrupt vectors have been moved to kernel/include/arch.h */
/* definitions for tasks and task switching */
#define __ASSEMBLY_SOURCE
#include <config.h>
+#include <arch.h>
#include "defs.h"
.section .text
* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <corax/errno.h>
#include <debug.h>
#include <string.h>
* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#define __ASSEMBLY_SOURCE
+#include <config.h>
+#include <arch.h>
#include "defs.h"
#define I8259_EOI 0x20
* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#define __ASSEMBLY_SOURCE
+
#include <config.h>
+#include <arch.h>
#include "defs.h"
.global arch_init
* along with Corax. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <corax/types.h>
#include <corax/errno.h>
#include <corax/heap.h>
#define TASK_STATE_EXIT 5
#define TASK_STATE_FORKED 6
+#define EXC_VECTOR0 0x00
+#define INT_VECTOR0 0x40
+#define SYS_VECTOR0 SYS_VECTOR_CORAX
+
+#define SYS_VECTOR_CORAX 0xCC
+#define SYS_VECTOR_CXNET 0xCD
+#define SYS_VECTOR_CXIPC 0xCE
+
+#if FEATURE(POSIX)
+#define SYS_VECTOR_POSIX 0x80
+#endif /* FEATURE(POSIX) */
+
+#define NUM_EXC_VECTORS 21
+#if CONFIG_APIC == 1
+#define NUM_INT_VECTORS 24
+#else
+#define NUM_INT_VECTORS 16
+#endif /* CONFIG_APIC */
+#define NUM_SYS_VECTORS 1
+
+#define INT(n) (INT_VECTOR0 + (n))
+#define INT_TIMER INT(0)
+#define INT_KEYBOARD INT(1)
+
+#if CONFIG_APIC == 1
+
+#define INT_APICERR INT(-2)
+#define INT_SPURIOUS INT(-1)
+/* what do we use INT 2 on APIC systems for? */
+#else
+/* on non-APIC systems, INT 2 is the cascaded i8259 PIC */
+#define INT_I8259 INT(2)
+#endif /* CONFIG_APIC */
+
+#define INT_FLOPPY INT(3)
+#define INT_HARDDRIVE INT(4)
+#define INT_RTC INT(5)
+#define INT_HPET INT(6) /* is it really? */
+#define INT_NETWORK INT(7)
+#define INT_MAX INT(8)
+
#ifndef __ASSEMBLY_SOURCE
#include <corax/types.h>