From: acevest Date: Tue, 17 Sep 2024 02:54:05 +0000 (+0800) Subject: 更改发送EOI的代码 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/datamaps.china.min.js?a=commitdiff_plain;h=52de92c269793d5b334120f9700a4a019d725f9f;p=kernel.git 更改发送EOI的代码 --- diff --git a/include/system.h b/include/system.h index 9360459..d0fd0a0 100644 --- a/include/system.h +++ b/include/system.h @@ -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 diff --git a/kernel/clock.c b/kernel/clock.c index 97a16a5..37397fb 100644 --- a/kernel/clock.c +++ b/kernel/clock.c @@ -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; diff --git a/kernel/i8259.c b/kernel/i8259.c index 73078dc..7bd29eb 100644 --- a/kernel/i8259.c +++ b/kernel/i8259.c @@ -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 } }