aboutsummaryrefslogtreecommitdiffstats
path: root/mmu.c
Commit message (Collapse)AuthorAge
* Style and documentation cleanupJoshua Bakita2024-04-23
| | | | | | | - Document topology registers (PTOP) on Ampere+ - Document graphics copy engine configuration registers - Move resubmit_runlist range checks into runlist.c - Miscellaneous spacing, typo, and minor documentation fixes
* Fix page-table traversal for version 1 page tablesJoshua Bakita2024-04-22
| | | | | | | | | - Correct V1 page table defines using information from kern_gmmu_fmt_gm10x.c in NVIDIA's open-gpu-kernel-modules repo. - Verify page table format in search_v1_page_directory() - Better, more controllable logging in mmu.c Tested on GM204 (GTX 970).
* Match aperture when doing page table searchesJoshua Bakita2024-04-21
| | | | | | Previously, addresses of any aperture would match. This can result in very confusing results when attempting to verify that a mapping correctly exists.
* Always dereference the post-I/O-MMU-translated address in mmu.cJoshua Bakita2024-04-21
| | | | | | | Previously attempted to dereference non-I/O-MMU translated addresses, which resulted in accessing effectively arbitrary physical addresses, causing errononus results from search_page_directory() in particular.
* Support page directories outside PRAMIN or in SYS_MEMJoshua Bakita2024-04-11
| | | | | | | | | | | | | | | | | | | | | - Re-read PRAMIN configuration after update to verify change applies - Return a page_dir_config_t rather than just an address and page. table version from `get_bar2_pdb()`. - Less verbose logging for MMU-related functions by default. - Perform all conversion from SYS_MEM/VID_MEM addresses to kernel addresses inside the translation functions, via the new function 'pd_deref()`. - Support use of an I/O MMU, page tables/directories outside the current PRAMIN window, and page tables/directories arbitrarially located in SYS_MEM or VID_MEM on different levels of the same tree. - Heavily improve documentation and add references for Version 1 and Version 0 page tables. - Improve logging in `runlist.c` to include runlist and chip IDs. - Update all users of search_page_directory* to use the new API. - Remove now-unused supporting functions from `mmu.c`. Tested on GTX 970, GTX 1060 3GB, Jetson TX2, Titan V, Jetson Xavier, and RTX 2080 Ti.
* Correctly check return code from vram2PRAMIN()Joshua Bakita2024-04-09
| | | | | | Blindly using an invalid return address was resulting in undefined behavior due to traversal of non-page-table addresses as though they were part of the page table.
* Improve debugging messages for reverse page translationJoshua Bakita2024-04-09
|
* Fix an off-by-one error in V2 reverse page table lookupsJoshua Bakita2024-04-09
| | | | | | | | This would occationally manifest as an inability to find the runlist page in BAR2, as only part of the page table was being traversed. Also includes non-functional changes to documentation, scoping, and structure layout.
* Improve copy engine register documentation in nvdebug.h + cleanupJoshua Bakita2023-07-20
|
* Quick dump of current state for Ben to review.Joshua Bakita2023-06-22