A Total Overhaul on the Lunaix's Virtual Memory Model (#26)
[lunaix-os.git] / lunaix-os / arch / i386 / includes / sys / cpu.h
index 3289522af918840f3172ca4fe275049c86bb5483..a4be798b698a777d89ed69b97b7875b36e095606 100644 (file)
@@ -17,13 +17,6 @@ cpu_trap_sched();
 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
@@ -89,7 +82,7 @@ cpu_chvmspace(u32_t val)
 }
 
 /**
- * @brief Flush TLB
+ * @brief Flush a certain TLB record
  *
  * @return u32_t
  */
@@ -99,6 +92,10 @@ cpu_flush_page(ptr_t va)
     asm volatile("invlpg (%0)" ::"r"(va) : "memory");
 }
 
+/**
+ * @brief Flush entire TLB
+ *
+ */
 static inline void
 cpu_flush_vmspace()
 {
@@ -125,6 +122,11 @@ cpu_wait()
     asm("hlt");
 }
 
+/**
+ * @brief Read exeception address
+ *
+ * @return ptr_t
+ */
 static inline ptr_t
 cpu_ldeaddr()
 {