Changeset a773b8b in mainline
- Timestamp:
- 2019-03-30T16:20:53Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bbb99f82
- Parents:
- d1cbad5
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
rd1cbad5 ra773b8b 121 121 /* PIC */ 122 122 i8259_init((i8259_t *) I8259_PIC0_BASE, 123 (i8259_t *) I8259_PIC1_BASE); 123 (i8259_t *) I8259_PIC1_BASE, IRQ_PIC1, IVT_IRQBASE, 124 IVT_IRQBASE + 8); 124 125 } 125 126 } -
kernel/arch/ia32/src/ia32.c
rd1cbad5 ra773b8b 110 110 /* PIC */ 111 111 i8259_init((i8259_t *) I8259_PIC0_BASE, 112 (i8259_t *) I8259_PIC1_BASE); 112 (i8259_t *) I8259_PIC1_BASE, IRQ_PIC1, IVT_IRQBASE, 113 IVT_IRQBASE + 8); 113 114 } 114 115 } -
kernel/genarch/include/genarch/drivers/i8259/i8259.h
rd1cbad5 ra773b8b 52 52 } __attribute__((packed)) i8259_t; 53 53 54 extern void i8259_init(i8259_t *, i8259_t * );54 extern void i8259_init(i8259_t *, i8259_t *, inr_t, unsigned int, unsigned int); 55 55 extern void pic_enable_irqs(uint16_t); 56 56 extern void pic_disable_irqs(uint16_t); -
kernel/genarch/src/drivers/i8259/i8259.c
rd1cbad5 ra773b8b 38 38 39 39 #include <genarch/drivers/i8259/i8259.h> 40 #include < cpu.h>40 #include <typedefs.h> 41 41 #include <stdint.h> 42 #include <arch/asm.h>43 #include <arch.h>44 42 #include <log.h> 45 43 #include <interrupt.h> … … 51 49 static i8259_t *saved_pic1; 52 50 53 void i8259_init(i8259_t *pic0, i8259_t *pic1) 51 void i8259_init(i8259_t *pic0, i8259_t *pic1, inr_t pic1_irq, 52 unsigned int irq0_int, unsigned int irq8_int) 54 53 { 55 54 saved_pic0 = pic0; … … 59 58 pio_write_8(&pic0->port1, PIC_ICW1 | PIC_ICW1_NEEDICW4); 60 59 61 /* ICW2: IRQ 0 maps to INT IRQBASE*/62 pio_write_8(&pic0->port2, IVT_IRQBASE);60 /* ICW2: IRQ 0 maps to INT irq0_int */ 61 pio_write_8(&pic0->port2, irq0_int); 63 62 64 63 /* ICW3: pic1 using IRQ IRQ_PIC1 */ 65 pio_write_8(&pic0->port2, 1 << IRQ_PIC1);64 pio_write_8(&pic0->port2, 1 << pic1_irq); 66 65 67 66 /* ICW4: i8086 mode */ … … 71 70 pio_write_8(&pic1->port1, PIC_ICW1 | PIC_ICW1_NEEDICW4); 72 71 73 /* ICW2: IRQ 8 maps to INT (IVT_IRQBASE + 8)*/74 pio_write_8(&pic1->port2, IVT_IRQBASE + 8);72 /* ICW2: IRQ 8 maps to INT irq8_int */ 73 pio_write_8(&pic1->port2, irq8_int); 75 74 76 75 /* ICW3: pic1 is known as IRQ_PIC1 */ 77 pio_write_8(&pic1->port2, IRQ_PIC1);76 pio_write_8(&pic1->port2, pic1_irq); 78 77 79 78 /* ICW4: i8086 mode */ … … 96 95 97 96 pic_disable_irqs(0xffff); /* disable all irq's */ 98 pic_enable_irqs(1 << IRQ_PIC1); /* but enable pic1*/97 pic_enable_irqs(1 << pic1_irq); /* but enable pic1_irq */ 99 98 } 100 99
Note:
See TracChangeset
for help on using the changeset viewer.