File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -800,7 +800,6 @@ class ProgramDmaBench : public Program
800800 bool checkTimeFrameAlignment (uintptr_t pageAddress, bool atStartOfSuperpage)
801801 {
802802 static bool overflowGuard = false ;
803- static uint32_t mNextTFOrbit = 0x0 ;
804803 static uint32_t prevOrbit = 0x0 ;
805804
806805 // check that the TimeFrame starts at the beginning of the superpage
@@ -822,9 +821,11 @@ class ProgramDmaBench : public Program
822821 if (!atStartOfSuperpage) {
823822 return false ;
824823 }
825- // Update next TF orbit expected
826- overflowGuard = (mNextTFOrbit + mTimeFrameLength ) & 0x100000000 ; // next TF orbit overflown, need to wait for orbit to overflow as well
827- mNextTFOrbit = mNextTFOrbit + mTimeFrameLength ;
824+ while (mNextTFOrbit <= mOrbit ) { // If we end up on an orbit that is more than a TF length away
825+ // Update next TF orbit expected
826+ overflowGuard = (mNextTFOrbit + mTimeFrameLength ) & 0x100000000 ; // next TF orbit overflown, need to wait for orbit to overflow as well
827+ mNextTFOrbit = mNextTFOrbit + mTimeFrameLength ;
828+ }
828829 }
829830
830831 return true ;
You can’t perform that action at this time.
0 commit comments