diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-08-05 14:33:51 +0200 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-08-05 14:33:51 +0200 |
| commit | bd7d4366b6643b5c6cd04f40dd32f5d9c9575fd6 (patch) | |
| tree | 92429e897be007d46c8f063a39a986df2124111a /kernel/include/pic.h | |
| parent | be3274c49d0ca5e31daa855c4c109d830fdead67 (diff) | |
organised files; switched to recursive make
Diffstat (limited to 'kernel/include/pic.h')
| -rw-r--r-- | kernel/include/pic.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/include/pic.h b/kernel/include/pic.h new file mode 100644 index 0000000..f1f4e44 --- /dev/null +++ b/kernel/include/pic.h @@ -0,0 +1,30 @@ +#ifndef PIC_H +#define PIC_H + +#define PIC1 0x20 /* IO base address for master PIC */ +#define PIC2 0xA0 /* IO base address for slave PIC */ +#define PIC1_COMMAND PIC1 +#define PIC1_DATA (PIC1+1) +#define PIC2_COMMAND PIC2 +#define PIC2_DATA (PIC2+1) + +#define PIC_EOI 0x20 /* End-of-interrupt command code */ + +/* reinitialize the PIC controllers, giving them specified vector offsets + rather than 8h and 70h, as configured by default */ + +#define ICW1_ICW4 0x01 /* ICW4 (not) needed */ +#define ICW1_SINGLE 0x02 /* Single (cascade) mode */ +#define ICW1_INTERVAL4 0x04 /* Call address interval 4 (8) */ +#define ICW1_LEVEL 0x08 /* Level triggered (edge) mode */ +#define ICW1_INIT 0x10 /* Initialization - required! */ + +#define ICW4_8086 0x01 /* 8086/88 (MCS-80/85) mode */ +#define ICW4_AUTO 0x02 /* Auto (normal) EOI */ +#define ICW4_BUF_SLAVE 0x08 /* Buffered mode/slave */ +#define ICW4_BUF_MASTER 0x0C /* Buffered mode/master */ +#define ICW4_SFNM 0x10 /* Special fully nested (not) */ + +void remap_pic(void); + +#endif |
