X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Flowlevel.asm;h=c530a5c0cca3cc4db7cfec77f83c3efa98b708e8;hb=190b2ef9470c23c275754b74745933d973f8c439;hp=63f93c262b049595d5bd2893c38cfd316513bd5f;hpb=626595465a2c6987606a6bc697df65130ad8c2d3;p=palacios-OLD.git diff --git a/palacios/src/geekos/lowlevel.asm b/palacios/src/geekos/lowlevel.asm index 63f93c2..c530a5c 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.1 $ +; $Revision: 1.3 $ ; This is free software. You are permitted to use, ; redistribute, and modify it as specified in the file "COPYING". @@ -165,6 +165,7 @@ EXPORT Flush_TLB ; CPUID functions EXPORT cpuid_ecx EXPORT cpuid_eax +EXPORT cpuid_edx ; Utility Functions EXPORT Set_MSR @@ -269,6 +270,29 @@ Flush_TLB: ret + +; +; cpuid_edx - return the edx register from cpuid +; +align 8 +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 + + ; ; cpuid_ecx - return the ecx register from cpuid ; @@ -276,11 +300,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 @@ -289,8 +319,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 ;