@@ -125,13 +125,13 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initEngineMMIO(EngineInstanceT engin
125125
126126template <typename GfxFamily>
127127void AUBCommandStreamReceiverHw<GfxFamily>::openFile(const std::string &fileName) {
128- auto streamLocked = stream ->lockStream ();
128+ auto streamLocked = getAubStream () ->lockStream ();
129129 initFile (fileName);
130130}
131131
132132template <typename GfxFamily>
133133bool AUBCommandStreamReceiverHw<GfxFamily>::reopenFile(const std::string &fileName) {
134- auto streamLocked = stream ->lockStream ();
134+ auto streamLocked = getAubStream () ->lockStream ();
135135 if (isFileOpen ()) {
136136 if (fileName != getFileName ()) {
137137 closeFile ();
@@ -147,11 +147,11 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::reopenFile(const std::string &fileNa
147147
148148template <typename GfxFamily>
149149void AUBCommandStreamReceiverHw<GfxFamily>::initFile(const std::string &fileName) {
150- if (!stream ->isOpen ()) {
150+ if (!getAubStream () ->isOpen ()) {
151151 // Open our file
152152 stream->open (fileName.c_str ());
153153
154- if (!stream ->isOpen ()) {
154+ if (!getAubStream () ->isOpen ()) {
155155 // This DEBUG_BREAK_IF most probably means you are not executing aub tests with correct current directory (containing aub_out folder)
156156 // try adding <familycodename>_aub
157157 DEBUG_BREAK_IF (true );
@@ -168,12 +168,12 @@ void AUBCommandStreamReceiverHw<GfxFamily>::closeFile() {
168168
169169template <typename GfxFamily>
170170bool AUBCommandStreamReceiverHw<GfxFamily>::isFileOpen() const {
171- return stream ->isOpen ();
171+ return getAubStream () ->isOpen ();
172172}
173173
174174template <typename GfxFamily>
175175const std::string &AUBCommandStreamReceiverHw<GfxFamily>::getFileName() {
176- return stream ->getFileName ();
176+ return getAubStream () ->getFileName ();
177177}
178178
179179template <typename GfxFamily>
@@ -184,6 +184,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine(size_t engineIndex)
184184
185185 initGlobalMMIO ();
186186 initEngineMMIO (engineInstance);
187+ this ->initAdditionalMMIO ();
187188
188189 // Global HW Status Page
189190 {
@@ -198,7 +199,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine(size_t engineIndex)
198199 {
199200 std::ostringstream str;
200201 str << " ggtt: " << std::hex << std::showbase << engineInfo.ggttHWSP ;
201- stream ->addComment (str.str ().c_str ());
202+ getAubStream () ->addComment (str.str ().c_str ());
202203 }
203204
204205 AubGTTData data = {0 };
@@ -228,7 +229,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine(size_t engineIndex)
228229 {
229230 std::ostringstream str;
230231 str << " ggtt: " << std::hex << std::showbase << engineInfo.ggttRingBuffer ;
231- stream ->addComment (str.str ().c_str ());
232+ getAubStream () ->addComment (str.str ().c_str ());
232233 }
233234
234235 AubGTTData data = {0 };
@@ -256,7 +257,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine(size_t engineIndex)
256257 {
257258 std::ostringstream str;
258259 str << " ggtt: " << std::hex << std::showbase << engineInfo.ggttLRCA ;
259- stream ->addComment (str.str ().c_str ());
260+ getAubStream () ->addComment (str.str ().c_str ());
260261 }
261262
262263 AubGTTData data = {0 };
@@ -315,7 +316,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
315316 }
316317 }
317318
318- auto streamLocked = stream ->lockStream ();
319+ auto streamLocked = getAubStream () ->lockStream ();
319320 auto engineIndex = getEngineIndex (engineType);
320321 auto engineInstance = allEngineInstances[engineIndex];
321322 engineType = engineInstance.type ;
@@ -349,7 +350,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
349350 {
350351 std::ostringstream str;
351352 str << " ppgtt: " << std::hex << std::showbase << pBatchBuffer;
352- stream ->addComment (str.str ().c_str ());
353+ getAubStream () ->addComment (str.str ().c_str ());
353354 }
354355
355356 auto physBatchBuffer = ppgtt->map (static_cast <uintptr_t >(batchBufferGpuAddress), sizeBatchBuffer,
@@ -455,7 +456,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
455456 {
456457 std::ostringstream str;
457458 str << " ggtt: " << std::hex << std::showbase << ggttDumpStart;
458- stream ->addComment (str.str ().c_str ());
459+ getAubStream () ->addComment (str.str ().c_str ());
459460 }
460461
461462 auto physDumpStart = ggtt->map (ggttDumpStart, dumpLength, this ->getGTTBits (), getMemoryBankForGtt ());
@@ -471,7 +472,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
471472 {
472473 std::ostringstream str;
473474 str << " ggtt: " << std::hex << std::showbase << engineInfo.ggttLRCA + 0x101c ;
474- stream ->addComment (str.str ().c_str ());
475+ getAubStream () ->addComment (str.str ().c_str ());
475476 }
476477
477478 auto physLRCA = ggtt->map (engineInfo.ggttLRCA , sizeof (engineInfo.tailRingBuffer ), this ->getGTTBits (), getMemoryBankForGtt ());
@@ -513,7 +514,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
513514 subCaptureManager->disableSubCapture ();
514515 }
515516
516- stream ->flush ();
517+ getAubStream () ->flush ();
517518 return 0 ;
518519}
519520
@@ -542,7 +543,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::addPatchInfoComments() {
542543 ppgtt->map (static_cast <uintptr_t >(patchInfoData.targetAllocation ), 1 , 0 , MemoryBanks::MainBank)));
543544 }
544545 }
545- bool result = stream ->addComment (str.str ().c_str ());
546+ bool result = getAubStream () ->addComment (str.str ().c_str ());
546547 this ->flatBatchBufferHelper ->getPatchInfoCollection ().clear ();
547548 if (!result) {
548549 return false ;
@@ -553,7 +554,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::addPatchInfoComments() {
553554 for (auto &element : allocationsMap) {
554555 allocationStr << std::hex << element.first << " ;" << element.second << std::endl;
555556 }
556- result = stream ->addComment (allocationStr.str ().c_str ());
557+ result = getAubStream () ->addComment (allocationStr.str ().c_str ());
557558 if (!result) {
558559 return false ;
559560 }
@@ -575,7 +576,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion(EngineInstanceT en
575576
576577 auto mmioBase = getCsTraits (engineInstance).mmioBase ;
577578 bool pollNotEqual = false ;
578- this -> stream ->registerPoll (
579+ stream->registerPoll (
579580 mmioBase + 0x2234 , // EXECLIST_STATUS
580581 0x100 ,
581582 0x100 ,
@@ -613,7 +614,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
613614 {
614615 std::ostringstream str;
615616 str << " ppgtt: " << std::hex << std::showbase << gpuAddress << " end address: " << gpuAddress + size << " cpu address: " << cpuAddress << " device mask: " << gfxAllocation.devicesBitfield << " size: " << std::dec << size;
616- stream ->addComment (str.str ().c_str ());
617+ getAubStream () ->addComment (str.str ().c_str ());
617618 }
618619
619620 if (cpuAddress == nullptr ) {
@@ -664,18 +665,18 @@ void AUBCommandStreamReceiverHw<GfxFamily>::expectMMIO(uint32_t mmioRegister, ui
664665 header.readMaskHigh = 0xffffffff ;
665666 header.dwordCount = (sizeof (header) / sizeof (uint32_t )) - 1 ;
666667
667- this ->stream ->fileHandle .write (reinterpret_cast <char *>(&header), sizeof (header));
668+ this ->getAubStream () ->fileHandle .write (reinterpret_cast <char *>(&header), sizeof (header));
668669}
669670
670671template <typename GfxFamily>
671672void AUBCommandStreamReceiverHw<GfxFamily>::expectMemory(void *gfxAddress, const void *srcAddress, size_t length) {
672673 PageWalker walker = [&](uint64_t physAddress, size_t size, size_t offset, uint64_t entryBits) {
673674 UNRECOVERABLE_IF (offset > length);
674675
675- this ->stream ->expectMemory (physAddress,
676- reinterpret_cast <void *>(reinterpret_cast <uintptr_t >(srcAddress) + offset),
677- size,
678- this ->getAddressSpaceFromPTEBits (entryBits));
676+ this ->getAubStream () ->expectMemory (physAddress,
677+ reinterpret_cast <void *>(reinterpret_cast <uintptr_t >(srcAddress) + offset),
678+ size,
679+ this ->getAddressSpaceFromPTEBits (entryBits));
679680 };
680681
681682 this ->ppgtt ->pageWalk (reinterpret_cast <uintptr_t >(gfxAddress), length, 0 , PageTableEntry::nonValidBits, walker, MemoryBanks::BankNotSpecified);
0 commit comments