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.


updated assembly to build in 64 bit mode
[palacios.git] / palacios / include / palacios / vmm_lowlevel.h
index 4719cce..ea32b23 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifdef __V3_32BIT__
 
-void __inline__ v3_cpuid(uint_t target, uint_t * eax, uint_t * ebx, uint_t * ecx, uint_t * edx) {
+void __inline__ v3_cpuid(uint_t target, addr_t * eax, addr_t * ebx, addr_t * ecx, addr_t * edx) {
   __asm__ __volatile__ (
                        "pushl %%ebx\n\t"
                        "cpuid\n\t"
@@ -34,7 +34,21 @@ void __inline__ v3_cpuid(uint_t target, uint_t * eax, uint_t * ebx, uint_t * ecx
   return;
 }
 
+#elif __V3_64BIT__
 
+void __inline__ v3_cpuid(uint_t target, addr_t * eax, addr_t * ebx, addr_t * ecx, addr_t * edx) {
+  __asm__ __volatile__ (
+                       "pushq %%rbx\n\t"
+                       "cpuid\n\t"
+                       "movq %%rbx, %%rsi\n\t"
+                       "popq %%rbx\n\t"
+                       : "=a" (*eax), "=S" (*ebx), "=c" (*ecx), "=d" (*edx)
+                       : "a" (target)
+                       );
+  return;
+}
+
+#endif
 
 
 void __inline__ v3_set_msr(uint_t msr, uint_t high_byte, uint_t low_byte) {
@@ -67,4 +81,3 @@ void __inline__ v3_disable_ints() {
   __asm__ __volatile__ ("cli");
 }
 
-#endif