X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=test%2Fgeekos_test_vm%2Fsrc%2Fgeekos%2Fmain.c;h=8dd05ab169833b36770b385d3d01c50600e40497;hb=83942e281e4e17d6eb296d343094578dc50b3b0b;hp=177771abef05c80d2ae21b23f3b65c949c5b28fa;hpb=a70930549d1b741704dd7af4e6bb0e89f6f8a519;p=palacios.git diff --git a/test/geekos_test_vm/src/geekos/main.c b/test/geekos_test_vm/src/geekos/main.c index 177771a..8dd05ab 100644 --- a/test/geekos_test_vm/src/geekos/main.c +++ b/test/geekos_test_vm/src/geekos/main.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -241,17 +241,15 @@ void Main(struct Boot_Info* bootInfo) { struct Kernel_Thread * key_thread; struct Kernel_Thread * spkr_thread; - - - ulong_t doIBuzz = 0; Init_BSS(); + Init_VMCons(); Init_Screen(); InitSerial(); - - Init_VMCons(); + Print("Initializing Memory\n"); Init_Mem(bootInfo); + Print("Memory Done\n"); Init_CRC32(); Init_TSS(); Init_Interrupts(); @@ -267,10 +265,6 @@ void Main(struct Boot_Info* bootInfo) - - - - PrintBoth("\n\nHello, Welcome to this horrid output-only serial interface\n"); PrintBoth("Eventually, this will let us control the VMM\n\n"); @@ -291,8 +285,39 @@ void Main(struct Boot_Info* bootInfo) PrintBoth("Next: setup GDT\n"); + { + uint_t addr = 0xe0000; + uint_t hi = 0; + + // wrmsr(SYMBIOTIC_MSR, hi, addr); + { + uint_t msr_num = 0x0000001B; + __asm__ __volatile__ ("rdmsr" : : "c"(msr_num) : "%eax","%edx","memory"); + } + { + uint_t msr_num = 0x0000001c; + __asm__ __volatile__ ("rdmsr" : : "c"(msr_num) : "%eax","%edx","memory"); + } + + + { + uint_t msr_num = 0x0000001B; + __asm__ __volatile__ ("wrmsr" : : "c"(msr_num), "a"(hi), "d"(addr) : "memory"); + } + + + + { + uint_t msr_num = 0x535; + __asm__ __volatile__ ("wrmsr" : : "c"(msr_num), "a"(hi), "d"(addr) : "memory"); + } + + + while (1) {} + + } if (TEST_PAGING) { int i = 0; for (i = 0; i < 1024; i++) { @@ -304,7 +329,7 @@ void Main(struct Boot_Info* bootInfo) // Invalidate_PG((void *)0x2000); - + // VM_Test(bootInfo, 32); //VM_Test(bootInfo, 1536); }