X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=misc%2Ftest_vm%2Fsrc%2Fgeekos%2Flowlevel.asm;h=cae49a882d774a931fab9042608b370e70aafd9a;hb=afb634a80f946634454a5d067a92aa600227bd93;hp=63f93c262b049595d5bd2893c38cfd316513bd5f;hpb=0893919c04fa1186a70039b739a6dcec0a2189ba;p=palacios.git diff --git a/misc/test_vm/src/geekos/lowlevel.asm b/misc/test_vm/src/geekos/lowlevel.asm index 63f93c2..cae49a8 100644 --- a/misc/test_vm/src/geekos/lowlevel.asm +++ b/misc/test_vm/src/geekos/lowlevel.asm @@ -2,7 +2,7 @@ ; Low level interrupt/thread handling code for GeekOS. ; Copyright (c) 2001,2003,2004 David H. Hovemeyer ; Copyright (c) 2003, Jeffrey K. Hollingsworth -; $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