Added generic backtrace functions to allow backtrace output on buffers
[akaros.git] / kern / arch / x86 / trap.h
index 066d488..2411ff0 100644 (file)
@@ -1,7 +1,8 @@
-#ifndef ROS_KERN_ARCH_TRAP_H
+#pragma once
+
 #define ROS_KERN_ARCH_TRAP_H
 
-#include "msr-index.h"
+#include <ros/arch/msr-index.h>
 
 #define NUM_IRQS                                       256
 
 
 /* 224-239 are OS IPI vectors (0xe0-0xef) */
 /* smp_call_function IPIs, keep in sync with NUM_HANDLER_WRAPPERS.
- * SMP_CALL0 needs to be 16-aligned (we mask in x86/trap.c) */
+ * SMP_CALL0 needs to be 16-aligned (we mask in x86/trap.c).  If you move these,
+ * also change INIT_HANDLER_WRAPPER */
 #define I_SMP_CALL0                            224
 #define I_SMP_CALL1                            (I_SMP_CALL0 + 1)
 #define I_SMP_CALL2                            (I_SMP_CALL0 + 2)
 #define I_SMP_CALL3                            (I_SMP_CALL0 + 3)
 #define I_SMP_CALL4                            (I_SMP_CALL0 + 4)
 #define I_SMP_CALL_LAST                        I_SMP_CALL4
+#define I_VMMCP_POSTED                         (I_SMP_CALL_LAST + 1)
 #define I_TESTING                              237     /* Testing IPI (used in testing.c) */
 #define I_POKE_CORE                            238
 #define I_KERNEL_MSG                   239
 #include <ros/trapframe.h>
 #include <arch/pci.h>
 #include <arch/pic.h>
-#include <arch/coreid.h>
+#include <arch/topology.h>
 #include <arch/io.h>
 
 struct irq_handler {
@@ -195,12 +198,6 @@ set_frame_pointer(uintptr_t fp)
 
 extern segdesc_t *gdt;
 
-#ifdef CONFIG_X86_64
 #include <arch/trap64.h>
-#else
-#include <arch/trap32.h>
-#endif
 
 #endif /* !__ASSEMBLER__ */
-
-#endif /* !ROS_INC_ARCH_TRAP_H */