diff options
author | Liav A <liavalb@gmail.com> | 2020-02-22 20:21:25 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-24 11:27:03 +0100 |
commit | 71371d39b381f4853fcea14cc8edc232b7e15adc (patch) | |
tree | 04ed005b26323d9f6392c73f496110f2a415f10e | |
parent | c51a57fb320ee3c28bea9ee223decfdd601e7e60 (diff) | |
download | serenity-71371d39b381f4853fcea14cc8edc232b7e15adc.zip |
CPU: Add 2 files with ISR stub macros
-rw-r--r-- | Kernel/Arch/i386/ISRStubs.h | 260 | ||||
-rw-r--r-- | Kernel/Arch/i386/Interrupts.h | 36 |
2 files changed, 296 insertions, 0 deletions
diff --git a/Kernel/Arch/i386/ISRStubs.h b/Kernel/Arch/i386/ISRStubs.h new file mode 100644 index 0000000000..9b5eca78f5 --- /dev/null +++ b/Kernel/Arch/i386/ISRStubs.h @@ -0,0 +1,260 @@ +#pragma once +#include <Kernel/Arch/i386/Interrupts.h> + +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(0, 0x50) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(1, 0x51) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(2, 0x52) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(3, 0x53) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(4, 0x54) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(5, 0x55) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(6, 0x56) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(7, 0x57) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(8, 0x58) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(9, 0x59) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(10, 0x5a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(11, 0x5b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(12, 0x5c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(13, 0x5d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(14, 0x5e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(15, 0x5f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(16, 0x60) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(17, 0x61) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(18, 0x62) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(19, 0x63) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(20, 0x64) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(21, 0x65) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(22, 0x66) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(23, 0x67) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(24, 0x68) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(25, 0x69) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(26, 0x6a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(27, 0x6b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(28, 0x6c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(29, 0x6d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(30, 0x6e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(31, 0x6f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(32, 0x70) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(33, 0x71) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(34, 0x72) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(35, 0x73) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(36, 0x74) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(37, 0x75) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(38, 0x76) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(39, 0x77) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(40, 0x78) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(41, 0x79) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(42, 0x7a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(43, 0x7b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(44, 0x7c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(45, 0x7d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(46, 0x7e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(47, 0x7f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(48, 0x80) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(49, 0x81) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(50, 0x82) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(51, 0x83) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(52, 0x84) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(53, 0x85) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(54, 0x86) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(55, 0x87) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(56, 0x88) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(57, 0x89) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(58, 0x8a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(59, 0x8b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(60, 0x8c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(61, 0x8d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(62, 0x8e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(63, 0x8f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(64, 0x90) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(65, 0x91) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(66, 0x92) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(67, 0x93) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(68, 0x94) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(69, 0x95) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(70, 0x96) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(71, 0x97) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(72, 0x98) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(73, 0x99) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(74, 0x9a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(75, 0x9b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(76, 0x9c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(77, 0x9d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(78, 0x9e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(79, 0x9f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(80, 0xa0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(81, 0xa1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(82, 0xa2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(83, 0xa3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(84, 0xa4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(85, 0xa5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(86, 0xa6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(87, 0xa7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(88, 0xa8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(89, 0xa9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(90, 0xaa) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(91, 0xab) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(92, 0xac) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(93, 0xad) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(94, 0xae) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(95, 0xaf) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(96, 0xb0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(97, 0xb1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(98, 0xb2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(99, 0xb3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(100, 0xb4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(101, 0xb5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(102, 0xb6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(103, 0xb7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(104, 0xb8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(105, 0xb9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(106, 0xba) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(107, 0xbb) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(108, 0xbc) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(109, 0xbd) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(110, 0xbe) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(111, 0xbf) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(112, 0xc0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(113, 0xc1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(114, 0xc2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(115, 0xc3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(116, 0xc4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(117, 0xc5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(118, 0xc6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(119, 0xc7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(120, 0xc8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(121, 0xc9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(122, 0xca) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(123, 0xcb) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(124, 0xcc) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(125, 0xcd) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(126, 0xce) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(127, 0xcf) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(128, 0xd0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(129, 0xd1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(130, 0xd2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(131, 0xd3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(132, 0xd4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(133, 0xd5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(134, 0xd6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(135, 0xd7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(136, 0xd8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(137, 0xd9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(138, 0xda) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(139, 0xdb) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(140, 0xdc) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(141, 0xdd) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(142, 0xde) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(143, 0xdf) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(144, 0xe0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(145, 0xe1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(146, 0xe2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(147, 0xe3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(148, 0xe4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(149, 0xe5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(150, 0xe6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(151, 0xe7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(152, 0xe8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(153, 0xe9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(154, 0xea) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(155, 0xeb) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(156, 0xec) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(157, 0xed) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(158, 0xee) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(159, 0xef) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(160, 0xf0) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(161, 0xf1) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(162, 0xf2) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(163, 0xf3) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(164, 0xf4) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(165, 0xf5) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(166, 0xf6) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(167, 0xf7) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(168, 0xf8) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(169, 0xf9) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(170, 0xfa) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(171, 0xfb) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(172, 0xfc) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(173, 0xfd) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(174, 0xfe) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(175, 0xff) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(176, 0x100) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(177, 0x101) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(178, 0x102) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(179, 0x103) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(180, 0x104) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(181, 0x105) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(182, 0x106) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(183, 0x107) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(184, 0x108) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(185, 0x109) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(186, 0x10a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(187, 0x10b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(188, 0x10c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(189, 0x10d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(190, 0x10e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(191, 0x10f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(192, 0x110) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(193, 0x111) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(194, 0x112) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(195, 0x113) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(196, 0x114) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(197, 0x115) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(198, 0x116) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(199, 0x117) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(200, 0x118) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(201, 0x119) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(202, 0x11a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(203, 0x11b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(204, 0x11c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(205, 0x11d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(206, 0x11e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(207, 0x11f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(208, 0x120) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(209, 0x121) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(210, 0x122) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(211, 0x123) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(212, 0x124) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(213, 0x125) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(214, 0x126) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(215, 0x127) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(216, 0x128) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(217, 0x129) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(218, 0x12a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(219, 0x12b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(220, 0x12c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(221, 0x12d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(222, 0x12e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(223, 0x12f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(224, 0x130) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(225, 0x131) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(226, 0x132) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(227, 0x133) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(228, 0x134) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(229, 0x135) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(230, 0x136) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(231, 0x137) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(232, 0x138) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(233, 0x139) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(234, 0x13a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(235, 0x13b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(236, 0x13c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(237, 0x13d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(238, 0x13e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(239, 0x13f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(240, 0x140) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(241, 0x141) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(242, 0x142) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(243, 0x143) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(244, 0x144) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(245, 0x145) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(246, 0x146) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(247, 0x147) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(248, 0x148) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(249, 0x149) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(250, 0x14a) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(251, 0x14b) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(252, 0x14c) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(253, 0x14d) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(254, 0x14e) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(255, 0x14f) +GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(256, 0x150) diff --git a/Kernel/Arch/i386/Interrupts.h b/Kernel/Arch/i386/Interrupts.h new file mode 100644 index 0000000000..b45483b1b3 --- /dev/null +++ b/Kernel/Arch/i386/Interrupts.h @@ -0,0 +1,36 @@ +#pragma once + +#include <AK/Types.h> + +extern "C" void interrupt_common_asm_entry(); + +#define GENERATE_GENERIC_INTERRUPT_HANDLER_ASM_ENTRY(interrupt_vector, isr_number) \ + extern "C" void interrupt_##interrupt_vector##_asm_entry(); \ + asm(".globl interrupt_" #interrupt_vector "_asm_entry\n" \ + "interrupt_" #interrupt_vector "_asm_entry:\n" \ + " pushw $" #isr_number "\n" \ + " pushw $0\n" \ + " jmp interrupt_common_asm_entry\n"); + +asm( + ".globl interrupt_common_asm_entry\n" + "interrupt_common_asm_entry: \n" + " pusha\n" + " pushl %ds\n" + " pushl %es\n" + " pushl %fs\n" + " pushl %gs\n" + " pushl %ss\n" + " mov $0x10, %ax\n" + " mov %ax, %ds\n" + " mov %ax, %es\n" + " cld\n" + " call handle_interrupt\n" + " add $0x4, %esp\n" // "popl %ss" + " popl %gs\n" + " popl %fs\n" + " popl %es\n" + " popl %ds\n" + " popa\n" + " add $0x4, %esp\n" + " iret\n"); |