aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-08-09 17:27:08 +0200
committerMarvin Borner2020-08-09 17:27:08 +0200
commit544acef0986977ef9d3a05d87bb9f55163b1280a (patch)
tree764d28f454b818c3ac19d59df17ecd914f9d7ecf /kernel/inc
parent162d024a53e1e31e00ff0b6f47dd4590edebc551 (diff)
Temporary cpu and serial drivers in libc
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/cpu.h29
-rw-r--r--kernel/inc/serial.h9
2 files changed, 0 insertions, 38 deletions
diff --git a/kernel/inc/cpu.h b/kernel/inc/cpu.h
deleted file mode 100644
index eb09291..0000000
--- a/kernel/inc/cpu.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// MIT License, Copyright (c) 2020 Marvin Borner
-
-#ifndef CPU_H
-#define CPU_H
-
-#include <def.h>
-
-u8 inb(u16 port);
-u16 inw(u16 port);
-u32 inl(u16 port);
-void insl(u16 port, void *addr, int n);
-
-void outb(u16 port, u8 data);
-void outw(u16 port, u16 data);
-void outl(u16 port, u32 data);
-void cli();
-void sti();
-void hlt();
-void idle();
-
-static inline void spinlock(int *ptr)
-{
- int prev;
- do
- __asm__ volatile("lock xchgl %0,%1" : "=a"(prev) : "m"(*ptr), "a"(1));
- while (prev);
-}
-
-#endif
diff --git a/kernel/inc/serial.h b/kernel/inc/serial.h
deleted file mode 100644
index 6511952..0000000
--- a/kernel/inc/serial.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// MIT License, Copyright (c) 2020 Marvin Borner
-
-#ifndef SERIAL_H
-#define SERIAL_H
-
-void serial_install();
-void serial_print(const char *data);
-
-#endif