]> Zhao Yanbai Git Server - kernel.git/commitdiff
更改发送EOI的代码
authoracevest <zhaoyanbai@126.com>
Tue, 17 Sep 2024 02:54:05 +0000 (10:54 +0800)
committeracevest <zhaoyanbai@126.com>
Tue, 17 Sep 2024 02:54:05 +0000 (10:54 +0800)
include/system.h
kernel/clock.c
kernel/i8259.c

index 93604598a117d3600624a4107b7b855b1ffd2135..d0fd0a0a2335dcc8fd32d8347eca45784da920aa 100644 (file)
@@ -267,7 +267,7 @@ void user_task_entry();
 
 extern volatile int reenter;
 
-#define DEFAULT_BOOT_DELAY_TICKS 30
+#define DEFAULT_BOOT_DELAY_TICKS 300
 void boot_delay(int ticks);
 
 #endif
index 97a16a55db740245b303e5eece05edd9b46251b6..37397fb04f0fd2807453b00917c4f3cb3285e9e6 100644 (file)
@@ -75,6 +75,7 @@ void clk_handler(unsigned int irq, pt_regs_t *regs, void *dev_id) {
 // 后续放到一个内核任务中去做,需要先把禁止内核抢占做了
 const char *task_state(unsigned int state);
 void clk_bh_handler(void *arg) {
+
     task_t *p = 0;
     list_head_t *t = 0;
     list_head_t *pos = 0;
index 73078dc9a56d3073ee3cf30e7db3559584fa6dff..7bd29ebe93515f1feb93f1bce06b466af2a357b9 100644 (file)
@@ -87,9 +87,9 @@ void mask_ack_i8259_irq(unsigned int irq) {
         // ...
 #else
         // Specific EOI to slave
-        outb(0x60 + (irq & 0x07), PIC_SLAVE_CMD);
+        outb(0x20 + (irq & 0x07), PIC_SLAVE_CMD);
         // Specific EOI to master
-        outb(0x60 + (PIC_CASCADE_IR & 0x07), PIC_MASTER_CMD);
+        outb(0x20 + (PIC_CASCADE_IR & 0x07), PIC_MASTER_CMD);
 #endif
     } else  // Master
     {
@@ -101,7 +101,7 @@ void mask_ack_i8259_irq(unsigned int irq) {
         // ...
 #else
         // Specific EOI to master
-        outb(0x60 + irq, PIC_MASTER_CMD);
+        outb(0x20 + irq, PIC_MASTER_CMD);
 #endif
     }
 }
@@ -115,9 +115,9 @@ void ack_i8259_irq(unsigned int irq) {
         // ...
 #else
         // Specific EOI to slave
-        outb(0x60 + (irq & 0x07), PIC_SLAVE_CMD);
+        outb(0x20 + (irq & 0x07), PIC_SLAVE_CMD);
         // Specific EOI to master
-        outb(0x60 + (PIC_CASCADE_IR & 0x07), PIC_MASTER_CMD);
+        outb(0x20 + (PIC_CASCADE_IR & 0x07), PIC_MASTER_CMD);
 #endif
     } else  // Master
     {
@@ -125,7 +125,7 @@ void ack_i8259_irq(unsigned int irq) {
         // ...
 #else
         // Specific EOI to master
-        outb(0x60 + irq, PIC_MASTER_CMD);
+        outb(0x20 + irq, PIC_MASTER_CMD);
 #endif
     }
 }