gem5
v22.1.0.0
|
Translation range generators. More...
#include <amdgpu_vm.hh>
Public Member Functions | |
AGPTranslationGen (AMDGPUVM *_vm, Addr vaddr, Addr size) | |
Public Member Functions inherited from gem5::TranslationGen | |
TranslationGen (Addr new_start, Addr new_size) | |
The starting virtual address and the size of the entire region being translated. More... | |
virtual | ~TranslationGen () |
Addr | start () const |
Addr | size () const |
const_iterator | begin () const |
const_iterator | end () const |
Private Member Functions | |
void | translate (Range &range) const override |
Subclasses implement this function to complete TranslationGen. More... | |
Private Attributes | |
AMDGPUVM * | vm |
Additional Inherited Members | |
Public Types inherited from gem5::TranslationGen | |
using | const_iterator = TranslationGenConstIterator |
Protected Attributes inherited from gem5::TranslationGen | |
Addr | _start |
Addr | _size |
Translation range generators.
AGP - Legacy interface to device memory. Addr range is set via MMIO GART - Legacy privledged translation table. Table in device memory MMHUB - Shadow range of VRAM
Definition at line 302 of file amdgpu_vm.hh.
|
inline |
Definition at line 310 of file amdgpu_vm.hh.
|
overrideprivatevirtual |
Subclasses implement this function to complete TranslationGen.
It should accept a Range reference which will have its "vaddr" field set to the virtual address to translate, and the "size" field set to the remaining size of the entire region being translated.
If there is a fault performing the translation of "vaddr", then this function should set the "fault" field of range and return.
If the translation was successful, this method should set "paddr" to the corresponding physical address, and set "size" to the number of bytes corresponding to the translation. Or more precisely, size should be set to the maximum "N" where vaddr + n maps to paddr + n for all 0 <= n <= N.
Implements gem5::TranslationGen.
Definition at line 258 of file amdgpu_vm.cc.
References AMDGPU_AGP_PAGE_SIZE, DPRINTF, gem5::AMDGPUVM::getAGPBase(), gem5::AMDGPUVM::getAGPBot(), gem5::AMDGPUVM::inAGP(), gem5::TranslationGen::Range::paddr, gem5::roundUp(), gem5::TranslationGen::Range::size, gem5::TranslationGen::Range::vaddr, and vm.
|
private |
Definition at line 305 of file amdgpu_vm.hh.
Referenced by translate().