X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Flowlevel.asm;h=fe3b61ba659a648fc4d7a6ea80f72e17215b17c2;hb=3f025fd4e0e535801836faa4259b94b18b94f231;hp=f90212c96b72314100ccbe4830c09b9a51ed69d4;hpb=8126d0d154dfd37ed7997f4fa78a1c179c4d2c81;p=palacios-OLD.git diff --git a/palacios/src/geekos/lowlevel.asm b/palacios/src/geekos/lowlevel.asm index f90212c..fe3b61b 100644 --- a/palacios/src/geekos/lowlevel.asm +++ b/palacios/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.2 $ +; $Revision: 1.5 $ ; This is free software. You are permitted to use, ; redistribute, and modify it as specified in the file "COPYING". @@ -171,7 +171,9 @@ EXPORT cpuid_edx EXPORT Set_MSR EXPORT Get_MSR + EXPORT Get_CR2 +EXPORT Get_CR3 EXPORT Proc_test @@ -279,9 +281,15 @@ cpuid_edx: push ebp mov ebp, esp push edx + push ecx + push ebx + mov eax, [ebp + 8] cpuid mov eax, edx + + pop ebx + pop ecx pop edx pop ebp ret @@ -294,11 +302,17 @@ align 8 cpuid_ecx: push ebp mov ebp, esp + push edx push ecx + push ebx + mov eax, [ebp + 8] cpuid mov eax, ecx + + pop ebx pop ecx + pop edx pop ebp ret @@ -307,8 +321,19 @@ cpuid_ecx: ; align 8 cpuid_eax: + push ebp + mov ebp, esp + push edx + push ecx + push ebx + mov eax, [esp+4] cpuid + + pop ebx + pop ecx + pop edx + pop ebp ret ; @@ -350,6 +375,7 @@ Get_MSR: + align 8 Get_CR2: mov eax, cr2 @@ -357,6 +383,11 @@ Get_CR2: align 8 +Get_CR3: + mov eax, cr3 + ret + +align 8 Proc_test: push ebp mov ebp, esp