/* $Id$ */
/** @file
* Micro Testcase, profiling special CPU operations - GC Code (hacks).
*/
/*
* Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "tstMicro.h"
#include <iprt/asm-amd64-x86.h>
/*******************************************************************************
* Internal Functions *
*******************************************************************************/
/**
* Save and load our IDT.
*
* @param pTst Pointer to the instance data.
* @param iIDT The index of the IDT entry which should be hooked.
*/
{
ASMGetIDTR(&Idtr);
return;
/*
* Copy the IDT.
*/
/* Hook up IDT entry. */
if (iIDT >= 0)
{
if ( iIDT == 8
|| iIDT == 0xa
|| iIDT == 0xb
|| iIDT == 0xc
|| iIDT == 0xd
|| iIDT == 0xe
|| iIDT == 0x11)
}
/* Install int 42h, R3 gate */
/*
* Load our IDT.
*/
ASMSetIDTR(&Idtr);
ASMGetIDTR(&Idtr2);
}
/**
* Removes all trap overrides except for gate 42.
*/
{
}
{
/*
* Validate input.
*/
if (uTestcase >= TSTMICROTEST_MAX)
return VERR_INVALID_PARAMETER;
/*
* Clear the results.
*/
pTst->u64TSCR0Start = 0;
pTst->u64TSCRxStart = 0;
pTst->u64TSCR0Enter = 0;
pTst->u64TSCR0Exit = 0;
pTst->u64TSCRxEnd = 0;
pTst->u64TSCR0End = 0;
/*
* Do the testcase.
*/
switch (uTestcase)
{
case TSTMICROTEST_OVERHEAD:
{
break;
}
case TSTMICROTEST_INVLPG_0:
{
break;
}
case TSTMICROTEST_INVLPG_EIP:
{
break;
}
case TSTMICROTEST_INVLPG_ESP:
{
break;
}
case TSTMICROTEST_CR3_RELOAD:
{
break;
}
case TSTMICROTEST_WP_DISABLE:
{
break;
}
case TSTMICROTEST_WP_ENABLE:
{
break;
}
case TSTMICROTEST_PF_R0:
{
break;
}
case TSTMICROTEST_PF_R1:
{
break;
}
case TSTMICROTEST_PF_R2:
{
break;
}
case TSTMICROTEST_PF_R3:
{
break;
}
}
/*
* Compute the results.
*/
return rc;
}