feat(pit): add pit isr, empty handler and unmasked pit irq

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2021-07-26 11:17:52 +02:00
1 parent cf020eae84
commit 5064efa101
10 files changed
+42 -5

No files matched your search

+2 -1
View File
@@ -31,7 +31,8 @@ static void send_icw4(void)
static void mask_irqs(void)
{
outb(MASTER_PIC_B, 0xff ^ 0x2);
outb(MASTER_PIC_B, IRQ2_PIN | IRQ3_PIN | IRQ4_PIN | IRQ5_PIN | IRQ6_PIN
| IRQ7_PIN);
outb(SLAVE_PIC_B, 0xff);
}
+9
View File
@@ -8,6 +8,15 @@
#define ICW1 0x11
#define IRQ0_PIN 0x1
#define IRQ1_PIN 0x2
#define IRQ2_PIN 0x4
#define IRQ3_PIN 0x8
#define IRQ4_PIN 0x10
#define IRQ5_PIN 0x20
#define IRQ6_PIN 0x40
#define IRQ7_PIN 0x80
void init_pic(void);
void acknowledge(uint32_t int_vector);
+9
View File
@@ -0,0 +1,9 @@
#include "pit.h"
void pit_handler(void)
{
}
unsigned long gettick(void)
{
}
+12
View File
@@ -0,0 +1,12 @@
#ifndef PIT_H
#define PIT_H
#define PIT_COUNTER_0 0x40
#define PIT_COUNTER_1 0x41
#define PIT_COUNTER_2 0x42
#define PIT_CONTROL_REGISTER 0x43
void pit_handler(void);
unsigned long gettick(void);
#endif /* !PIT_H */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.