tstOhciRegisterAccess.cpp revision 22b865436ba33d477830d608663dbe9c57107a72
0N/A * available from http://www.virtualbox.org. This file is free software;
0N/Astatic const char * const g_apszRegNms[] =
unsigned iReg;
} const s_aRegs[] =
bool fSuccess = true;
LogRel(("TestOhciWrites: %p iReg=%2d %20s = %08RX32\n", uPtrReg.pv, iReg, g_apszRegNms[iReg], uInitialValue));
bool fDone = true;
uint32_t const uChangedValue = s_aRegs[i].uVal1 != uInitialValue ? s_aRegs[i].uVal1 : s_aRegs[i].uVal2;
ASMNopPause();
if (!fDone)
LogRel(("TestOhciWrites: Warning! Register %s was never stable enough for testing! %08RX32 %08RX32 %08RX32\n",
else if (pszError)
LogRel(("TestOhciWrites: Error! Register %s failed: %s; uInitialValue=%08RX32 uChangedValue=%08RX32 u32A=%08RX32\n",
fSuccess = false;
return fSuccess;
unsigned iReg;
} const s_aRegs[] =
bool fSuccess = true;
LogRel(("TestOhciReadOnly: %p iReg=%2d %20s = %08RX32\n", uPtrReg.pv, iReg, g_apszRegNms[iReg], uInitialValue));
bool fTryAgain = true;
fTryAgain = false;
u32A = 0;
uChangedValue = 0;
ASMNopPause();
if (fTryAgain)
LogRel(("TestOhciReadOnly: Warning! Register %s was never stable enough for testing! %08RX32 %08RX32 %08RX32\n",
else if (pszError)
LogRel(("TestOhciReadOnly: Error! Register %s failed: %s; uInitialValue=%08RX32 uChangedValue=%08RX32 u32A=%08RX32\n",
fSuccess = false;
return fSuccess;
bool fSuccess = true;
bool fDone = false;
LogRel(("TestOhciReads: %p iReg=%2d %20s = %08RX32\n", uPtr.pv, iReg, g_apszRegNms[iReg], uInitialValue));
fDone = true;
fDone = false;
if (fDone)
fDone = false;
if (fDone)
fDone = false;
switch (iWord)
static const char * const s_apsz[] = { "unaligned word 0", "unaligned word 1", "unaligned word 2" };
if (fDone)
fDone = false;
switch (iByte)
static const char * const s_apsz[] =
ASMNopPause();
if (!fDone)
LogRel(("TestOhciReads: Warning! Register %s was never stable enough for testing! %08RX32 %08RX32 %08RX32\n",
else if (pszError)
fSuccess = false;
return fSuccess;
return rc;
rc = RTR0MemObjMapKernel(&hMapObj, hMemObj, (void *)-1, 0 /*uAlignment*/, RTMEM_PROT_READ | RTMEM_PROT_WRITE);
if (fSuccess)
if (fSuccess)
if (fSuccess)
return rc;