From 52de92c269793d5b334120f9700a4a019d725f9f Mon Sep 17 00:00:00 2001 From: acevest Date: Tue, 17 Sep 2024 10:54:05 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=94=B9=E5=8F=91=E9=80=81EOI=E7=9A=84?= =?utf8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- include/system.h | 2 +- kernel/clock.c | 1 + kernel/i8259.c | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) 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 } } -- 2.44.0