X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fvmm_util.h;h=25994c3dc1dfd6f70d4af90f993e00db07f07833;hb=3f025fd4e0e535801836faa4259b94b18b94f231;hp=5fb0aea3b0200f7c612e0492051d476d1628c3c3;hpb=ff58148c2cfbbc82405dc9ec25056cc93c773083;p=palacios.git diff --git a/palacios/include/geekos/vmm_util.h b/palacios/include/geekos/vmm_util.h index 5fb0aea..25994c3 100644 --- a/palacios/include/geekos/vmm_util.h +++ b/palacios/include/geekos/vmm_util.h @@ -1,11 +1,13 @@ #ifndef __VMM_UTIL_H #define __VMM_UTIL_H -#include +#include +#ifndef PAGE_SIZE +#define PAGE_SIZE 4096 +#endif -//#define PAGE_SIZE 4096 typedef union reg_ex { ullong_t r_reg; @@ -18,10 +20,26 @@ typedef union reg_ex { +// These are the GPRs layed out according to 'pusha' +struct VMM_GPRs { + uint_t edi; + uint_t esi; + uint_t ebp; + uint_t esp; + uint_t ebx; + uint_t edx; + uint_t ecx; + uint_t eax; +}; + + +#define GET_LOW_32(x) (*((uint_t*)(&(x)))) +#define GET_HIGH_32(x) (*((uint_t*)(((char*)(&(x)))+4))) + + void PrintTraceHex(unsigned char x); void PrintTraceMemDump(unsigned char * start, int n); - #endif