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
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git]
/
lunaix-os
/
arch
/
i386
/
includes
/
sys
/
cpu.h
diff --git
a/lunaix-os/arch/i386/includes/sys/cpu.h
b/lunaix-os/arch/i386/includes/sys/cpu.h
index 3289522af918840f3172ca4fe275049c86bb5483..a4be798b698a777d89ed69b97b7875b36e095606 100644
(file)
--- a/
lunaix-os/arch/i386/includes/sys/cpu.h
+++ b/
lunaix-os/arch/i386/includes/sys/cpu.h
@@
-17,13
+17,6
@@
cpu_trap_sched();
void
cpu_trap_panic(char* message);
void
cpu_trap_panic(char* message);
-static inline ptr_t
-cpu_get_fp()
-{
- ptr_t val;
- asm("movl %%ebp, %0" : "=r"(val)::);
- return val;
-}
/**
* @brief Load current processor state
/**
* @brief Load current processor state
@@
-89,7
+82,7
@@
cpu_chvmspace(u32_t val)
}
/**
}
/**
- * @brief Flush
TLB
+ * @brief Flush
a certain TLB record
*
* @return u32_t
*/
*
* @return u32_t
*/
@@
-99,6
+92,10
@@
cpu_flush_page(ptr_t va)
asm volatile("invlpg (%0)" ::"r"(va) : "memory");
}
asm volatile("invlpg (%0)" ::"r"(va) : "memory");
}
+/**
+ * @brief Flush entire TLB
+ *
+ */
static inline void
cpu_flush_vmspace()
{
static inline void
cpu_flush_vmspace()
{
@@
-125,6
+122,11
@@
cpu_wait()
asm("hlt");
}
asm("hlt");
}
+/**
+ * @brief Read exeception address
+ *
+ * @return ptr_t
+ */
static inline ptr_t
cpu_ldeaddr()
{
static inline ptr_t
cpu_ldeaddr()
{