aboutsummaryrefslogtreecommitdiff
path: root/dev/interrupt
diff options
context:
space:
mode:
authorZhong,Fangjian <fangjian.zhong@intel.com>2018-12-12 15:07:44 +0800
committerZhong,Fangjian <fangjian.zhong@intel.com>2018-12-20 11:48:11 +0800
commit73bdd1c6f79a00db754c584a6195665c06a2eed6 (patch)
tree96cac1c7852bffd350bf38168fbd6c611d526ec6 /dev/interrupt
parenta531850f621f2a9be8114c0b8a8361f32aa64147 (diff)
downloadcommon-73bdd1c6f79a00db754c584a6195665c06a2eed6.tar.gz
[dev][interrupt] Add x86 interrupt call stub
Bug: 119111590 Change-Id: I376ef65663b308864f627e3276705dcb060f2aa8
Diffstat (limited to 'dev/interrupt')
-rw-r--r--dev/interrupt/x86_lapic/include/dev/interrupt/x86_interrupts.h26
-rw-r--r--dev/interrupt/x86_lapic/interrupts.c30
-rw-r--r--dev/interrupt/x86_lapic/rules.mk8
3 files changed, 64 insertions, 0 deletions
diff --git a/dev/interrupt/x86_lapic/include/dev/interrupt/x86_interrupts.h b/dev/interrupt/x86_lapic/include/dev/interrupt/x86_interrupts.h
new file mode 100644
index 00000000..d2fe18d2
--- /dev/null
+++ b/dev/interrupt/x86_lapic/include/dev/interrupt/x86_interrupts.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2012-2018 LK Trusty Authors. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+void x86_init_interrupts(void);
diff --git a/dev/interrupt/x86_lapic/interrupts.c b/dev/interrupt/x86_lapic/interrupts.c
new file mode 100644
index 00000000..83b63814
--- /dev/null
+++ b/dev/interrupt/x86_lapic/interrupts.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012-2018 LK Trusty Authors. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <arch/x86.h>
+#include <dev/interrupt/x86_interrupts.h>
+
+void x86_init_interrupts(void) { }
+
+enum handler_return platform_irq(x86_iframe_t* frame) {
+ return INT_NO_RESCHEDULE;
+}
diff --git a/dev/interrupt/x86_lapic/rules.mk b/dev/interrupt/x86_lapic/rules.mk
new file mode 100644
index 00000000..a88dcb20
--- /dev/null
+++ b/dev/interrupt/x86_lapic/rules.mk
@@ -0,0 +1,8 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+MODULE := $(LOCAL_DIR)
+
+MODULE_SRCS += \
+ $(LOCAL_DIR)/interrupts.c \
+
+include make/module.mk