X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=misc%2Ftest_vm%2Fsrc%2Fgeekos%2Fmain.c;fp=misc%2Ftest_vm%2Fsrc%2Fgeekos%2Fmain.c;h=0000000000000000000000000000000000000000;hp=177771abef05c80d2ae21b23f3b65c949c5b28fa;hb=a70930549d1b741704dd7af4e6bb0e89f6f8a519;hpb=afb634a80f946634454a5d067a92aa600227bd93 diff --git a/misc/test_vm/src/geekos/main.c b/misc/test_vm/src/geekos/main.c deleted file mode 100644 index 177771a..0000000 --- a/misc/test_vm/src/geekos/main.c +++ /dev/null @@ -1,323 +0,0 @@ -/* - * GeekOS C code entry point - * Copyright (c) 2001,2003,2004 David H. Hovemeyer - * Copyright (c) 2003, Jeffrey K. Hollingsworth - * Copyright (c) 2004, Iulian Neamtiu - * $Revision: 1.2 $ - * - * This is free software. You are permitted to use, - * redistribute, and modify it as specified in the file "COPYING". - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -#define TEST_PAGING 0 -#define TEST_PCI 1 - -/* - static inline unsigned int cpuid_ecx(unsigned int op) - { - unsigned int eax, ecx; - - __asm__("cpuid" - : "=a" (eax), "=c" (ecx) - : "0" (op) - : "bx", "dx" ); - - return ecx; - } -*/ - - - -extern void Get_MSR(ulong_t msr, unsigned int *val1, unsigned int *val2); -extern void Set_MSR(ulong_t msr, ulong_t val1, ulong_t val2); -extern uint_t Get_EIP(); -extern uint_t Get_ESP(); -extern uint_t Get_EBP(); - - - -extern void Invalidate_PG(void * addr); - - -int foo=42; - -#define SPEAKER_PORT 0x61 - - -void Buzz(unsigned delay, unsigned num) -{ - volatile int x; - int i,j; - unsigned char init; - - init=In_Byte(SPEAKER_PORT); - - for (i=0;i"); - - - - - - - PrintBoth("Launching Noisemaker and keyboard listener threads\n"); - - key_thread = Start_Kernel_Thread(Keyboard_Listener, (ulong_t)&doIBuzz, PRIORITY_NORMAL, false); - spkr_thread = Start_Kernel_Thread(Buzzer, (ulong_t)&doIBuzz, PRIORITY_NORMAL, false); - - - - - - PrintBoth("Next: setup GDT\n"); - - - if (TEST_PAGING) { - int i = 0; - for (i = 0; i < 1024; i++) { - uint_t * addr = (uint_t *)0xa00000; - uint_t foo = *addr; - - PrintBoth("Read From 0x%x=%d\n", (uint_t)addr, foo); - } - - - // Invalidate_PG((void *)0x2000); - - // VM_Test(bootInfo, 32); - //VM_Test(bootInfo, 1536); - } - - - if (TEST_PCI) { - Init_PCI(); - - - } - - while(1); - - /* Now this thread is done. */ - Exit(0); -}