Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added testing
[palacios.git] / misc / test_vm / src / geekos / lowlevel.asm
index 63f93c2..cae49a8 100644 (file)
@@ -2,7 +2,7 @@
 ; Low level interrupt/thread handling code for GeekOS.
 ; Copyright (c) 2001,2003,2004 David H. Hovemeyer <daveho@cs.umd.edu>
 ; Copyright (c) 2003, Jeffrey K. Hollingsworth <hollings@cs.umd.edu>
-; $Revision: 1.1 $
+; $Revision: 1.2 $
 
 ; This is free software.  You are permitted to use,
 ; redistribute, and modify it as specified in the file "COPYING".
@@ -143,6 +143,9 @@ EXPORT Load_LDTR
 EXPORT g_entryPointTableStart
 EXPORT g_entryPointTableEnd
 
+
+EXPORT InByteLL
+
 ; Thread context switch function.
 EXPORT Switch_To_Thread
 
@@ -161,6 +164,7 @@ EXPORT Enable_Paging
 EXPORT Set_PDBR
 EXPORT Get_PDBR
 EXPORT Flush_TLB
+EXPORT Invalidate_PG
 
 ; CPUID functions
 EXPORT cpuid_ecx
@@ -270,6 +274,15 @@ Flush_TLB:
 
 
 ;
+; Invalidate Page - removes a page from the TLB
+;
+align 8
+Invalidate_PG:
+       mov     eax, [esp+4]
+       invlpg  [eax]
+       ret
+
+;
 ; cpuid_ecx - return the ecx register from cpuid
 ;
 align 8
@@ -352,6 +365,28 @@ Proc_test:
        ret
 
 
+
+align 8
+InByteLL:
+       push    ebp
+       mov     ebp, esp
+       push    ecx
+       push    ebx
+       push    edx
+
+       rdtsc
+       mov     ebx, eax
+       mov     ecx, edx
+       mov     dx, [ebp + 8]
+
+       in      al, dx
+
+       pop     edx
+       pop     ebx
+       pop     ecx
+       pop     ebp
+       ret
+
 ; Common interrupt handling code.
 ; Save registers, call C handler function,
 ; possibly choose a new thread to run, restore
@@ -518,6 +553,7 @@ Get_EBP:
 
 
 
+
 ; ----------------------------------------------------------------------
 ; Generate interrupt-specific entry points for all interrupts.
 ; We also define symbols to indicate the extend of the table