[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] vmxassist-cleanup.patch
Some minor fixups and improved debug output. Signed-Off-By: Leendert van Doorn <leendert@xxxxxxxxxxxxxx> diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N xeno-unstable.orig/tools/firmware/vmxassist/Makefile xeno-unstable.mine/tools/firmware/vmxassist/Makefile --- xeno-unstable.orig/tools/firmware/vmxassist/Makefile 2005-06-13 20:41:59.000000000 -0400 +++ xeno-unstable.mine/tools/firmware/vmxassist/Makefile 2005-06-14 21:44:53.000000000 -0400 @@ -23,9 +23,9 @@ # The emulator code lives in ROM space TEXTADDR=0x000D0000 + DEFINES=-DDEBUG -DTEXTADDR=${TEXTADDR} -XENINC=-I../../../xen/include -#TEXTADDR=0x000E0000 +XENINC=-I$(XEN_ROOT)/xen/include #DEFINES=-DDEBUG -DTEST -DTEXTADDR=${TEXTADDR} #XENINC=-I/home/leendert/xen/xeno-unstable.bk/xen/include diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N xeno-unstable.orig/tools/firmware/vmxassist/setup.c xeno-unstable.mine/tools/firmware/vmxassist/setup.c --- xeno-unstable.orig/tools/firmware/vmxassist/setup.c 2005-06-08 08:46:32.000000000 -0400 +++ xeno-unstable.mine/tools/firmware/vmxassist/setup.c 2005-06-08 22:51:58.000000000 -0400 @@ -21,11 +21,9 @@ #include "util.h" #include "machine.h" -#ifndef TEST #if (VMXASSIST_BASE != TEXTADDR) #error VMXAssist base mismatch #endif -#endif #define NR_PGD (PGSIZE / sizeof(unsigned)) @@ -118,8 +116,8 @@ "movl %%eax,%%fs;" "movl %%eax,%%gs;" "movl %%eax,%%ss" : : "a" (DATA_SELECTOR)); -/* XXX 0x10 == CODE_SELECTOR (figure out gnuas) */ - __asm__ __volatile__ ("ljmp $0x10,$1f; 1:"); + + __asm__ __volatile__ ("ljmp %0,$1f; 1:" : : "i" (CODE_SELECTOR)); __asm__ __volatile__ ("ltr %%ax" : : "a" (TSS_SELECTOR)); } diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N xeno-unstable.orig/tools/firmware/vmxassist/vm86.c xeno-unstable.mine/tools/firmware/vmxassist/vm86.c --- xeno-unstable.orig/tools/firmware/vmxassist/vm86.c 2005-06-08 08:46:32.000000000 -0400 +++ xeno-unstable.mine/tools/firmware/vmxassist/vm86.c 2005-06-11 00:57:30.000000000 -0400 @@ -39,6 +39,13 @@ #ifdef DEBUG int traceset = 0; + +char *states[] = { + "<VM86_REAL>", + "<VM86_REAL_TO_PROTECTED>", + "<VM86_PROTECTED_TO_REAL>", + "<VM86_PROTECTED>" +}; #endif /* DEBUG */ @@ -596,7 +603,6 @@ { switch (newmode) { case VM86_REAL: - TRACE((regs, 0, "<VM86_REAL>")); if (mode == VM86_PROTECTED_TO_REAL) { real_mode(regs); break; @@ -607,7 +613,6 @@ break; case VM86_REAL_TO_PROTECTED: - TRACE((regs, 0, "<VM86_REAL_TO_PROTECTED>")); if (mode == VM86_REAL) { regs->eflags |= EFLAGS_TF; break; @@ -624,7 +629,6 @@ panic("unexpected protected-to-real mode transition"); case VM86_PROTECTED: - TRACE((regs, 0, "<VM86_PROTECTED>")); if (mode == VM86_REAL_TO_PROTECTED) { protected_mode(regs); break; @@ -634,6 +638,7 @@ } mode = newmode; + TRACE((regs, 0, states[mode])); } void _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |