summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/int.h1
-rw-r--r--src/include/paging.h2
-rw-r--r--src/include/smp.h22
-rw-r--r--src/include/smp_sync.h6
4 files changed, 30 insertions, 1 deletions
diff --git a/src/include/int.h b/src/include/int.h
index 32313bd..6f1857b 100644
--- a/src/include/int.h
+++ b/src/include/int.h
@@ -79,6 +79,7 @@ void clear_int();
unsigned int alloc_idt(struct idt_entry *entry);
void free_idt(unsigned int entry);
void modify_idt(struct idt_entry *entry, unsigned int vector);
+void smp_load_idt();
#endif
diff --git a/src/include/paging.h b/src/include/paging.h
index 302e567..5d33ca5 100644
--- a/src/include/paging.h
+++ b/src/include/paging.h
@@ -9,7 +9,7 @@
void unmap_lowmem();
size_t map_complete_physical();
-void debug_print_memory();
+void debug_pzone();
struct phys_map *init_pmap(size_t pagetable_size);
diff --git a/src/include/smp.h b/src/include/smp.h
index c4a675a..f4e3aa8 100644
--- a/src/include/smp.h
+++ b/src/include/smp.h
@@ -1,4 +1,26 @@
#ifndef SMP_INCLUDED
#define SMP_INCLUDED
+#include <stdint.h>
void smp_boot();
+extern uint8_t corecount;
+
+static inline void lock(uint8_t *lock) {
+ asm("mov al, 1\n"
+ "spinlock:\n"
+ "lock xchgb [%0], al\n"
+ "test al, al\n"
+ "pause\n"
+ "jnz spinlock\n"
+ ::"r"(lock):"al");
+}
+
+static inline void unlock(uint8_t *lock) {
+ asm("lock andb [%0], 0"::"r"(lock));
+}
+
+static inline void waitup(uint8_t *loto) {
+}
+
+#define CREATE_LOTO(name)
+
#endif
diff --git a/src/include/smp_sync.h b/src/include/smp_sync.h
index 92784b8..93aac35 100644
--- a/src/include/smp_sync.h
+++ b/src/include/smp_sync.h
@@ -6,6 +6,7 @@ static inline void lock(uint8_t *lock) {
"spinlock:\n"
"lock xchgb [%0], al\n"
"test al, al\n"
+ "pause\n"
"jnz spinlock\n"
::"r"(lock):"al");
}
@@ -14,4 +15,9 @@ static inline void unlock(uint8_t *lock) {
asm("lock andb [%0], 0"::"r"(lock));
}
+static inline void waitup(uint8_t *loto) {
+}
+
+#define CREATE_LOTO(name)
+
#endif