git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: block device support (mount device and partitions)
[lunaix-os.git]
/
lunaix-os
/
includes
/
hal
/
pic.h
diff --git
a/lunaix-os/includes/hal/pic.h
b/lunaix-os/includes/hal/pic.h
index 20ee67bb69abf9838ad77e0fd42bb14a74778183..b13aae5bf1da819b51c3fbda55e94098f696eec1 100644
(file)
--- a/
lunaix-os/includes/hal/pic.h
+++ b/
lunaix-os/includes/hal/pic.h
@@
-1,5
+1,14
@@
#ifndef __LUNAIX_PIC_H
#define __LUNAIX_PIC_H
#ifndef __LUNAIX_PIC_H
#define __LUNAIX_PIC_H
-// TODO: PIC
+// FUTURE: Full PIC implementation for fall back when no APIC is detected.
+
+static inline void
+pic_disable()
+{
+ // ref: https://wiki.osdev.org/8259_PIC
+ asm volatile("movb $0xff, %al\n"
+ "outb %al, $0xa1\n"
+ "outb %al, $0x21\n");
+}
#endif /* __LUNAIX_PIC_H */
#endif /* __LUNAIX_PIC_H */