[QUESTION] gfvhub_v2_1 updates CNTL regs before initialize related page table address
Zibin Liu
ghostfly23333 at gmail.com
Sat May 20 05:34:13 UTC 2023
Hi,
I'm looking at the initialization sequences in gfxhub_v2_1.c. I'm
confused on whether the GCVM_CONTEXT1_CNTL CNTL reg can be written
before the corresponding GCVM_CONTEXT1_PAGE_TABLE_START_ADDR and
GCVM_CONTEXT1_PAGE_TABLE_END_ADDR reg is written.
Here is the background:
* gfxhub_v2_1_setup_vmid_config() enables GPU clients to use GPUVM
VMIDs to access memory.
The code related to this questions is below:
324 WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT1_CNTL,
325 i * hub->ctx_distance, tmp);
326 WREG32_SOC15_OFFSET(GC, 0,
mmGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32,
327 i * hub->ctx_addr_distance, 0);
328 WREG32_SOC15_OFFSET(GC, 0,
mmGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32,
329 i * hub->ctx_addr_distance, 0);
330 WREG32_SOC15_OFFSET(GC, 0,
mmGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_LO32,
331 i * hub->ctx_addr_distance,
332
lower_32_bits(adev->vm_manager.max_pfn - 1));
333 WREG32_SOC15_OFFSET(GC, 0,
mmGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_HI32,
334 i * hub->ctx_addr_distance,
335
upper_32_bits(adev->vm_manager.max_pfn - 1));
Just wondering, is the behavior expected or is it a bug?
Thanks,
Zibin Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230520/7d7ebe3a/attachment.htm>
More information about the amd-gfx
mailing list