InitializeRingBuffer - Clear buffer space to prevent random data readout
This commit is contained in:
@@ -265,6 +265,9 @@ void CommandProcessor::InitializeRingBuffer(uint32_t ptr, uint32_t size_log2) {
|
|||||||
read_ptr_index_ = 0;
|
read_ptr_index_ = 0;
|
||||||
primary_buffer_ptr_ = ptr;
|
primary_buffer_ptr_ = ptr;
|
||||||
primary_buffer_size_ = uint32_t(1) << (size_log2 + 3);
|
primary_buffer_size_ = uint32_t(1) << (size_log2 + 3);
|
||||||
|
|
||||||
|
std::memset(kernel_state_->memory()->TranslatePhysical(primary_buffer_ptr_),
|
||||||
|
0, primary_buffer_size_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandProcessor::EnableReadPointerWriteBack(uint32_t ptr,
|
void CommandProcessor::EnableReadPointerWriteBack(uint32_t ptr,
|
||||||
|
|||||||
Reference in New Issue
Block a user