€•ÞFŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ(/translations/zh_CN/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/zh_TW/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/it_IT/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ja_JP/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ko_KR/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/pt_BR/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/sp_SP/gpu/nova/core/pramin”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒB/var/lib/git/docbuild/linux/Documentation/gpu/nova/core/pramin.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒPRAMIN aperture mechanism”h]”hŒPRAMIN aperture mechanism”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒnote”“”)�”}”(hŒ®The following description is approximate and current as of the Ampere family. It may change for future generations and is intended to assist in understanding the driver code.”h]”hŒ paragraph”“”)�”}”(hŒ®The following description is approximate and current as of the Ampere family. It may change for future generations and is intended to assist in understanding the driver code.”h]”hŒ®The following description is approximate and current as of the Ampere family. It may change for future generations and is intended to assist in understanding the driver code.”…”�”}”(hhåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´Khhßubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÊh²hh³hÇh´NubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hhüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhùh²hh³hÇh´K ubhä)�”}”(hXZPRAMIN is a hardware aperture mechanism that provides CPU access to GPU Video RAM (VRAM) before the GPU's Memory Management Unit (MMU) and page tables are initialized. This 1 MiB sliding window, located at a fixed offset within BAR0, is essential for setting up page tables and other critical GPU data structures without relying on the GPU's MMU.”h]”hX^PRAMIN is a hardware aperture mechanism that provides CPU access to GPU Video RAM (VRAM) before the GPU’s Memory Management Unit (MMU) and page tables are initialized. This 1 MiB sliding window, located at a fixed offset within BAR0, is essential for setting up page tables and other critical GPU data structures without relying on the GPU’s MMU.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´Khhùh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒArchitecture Overview”h]”hŒArchitecture Overview”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´Kubhä)�”}”(hŒ¯The PRAMIN aperture mechanism is logically implemented by the GPU's PBUS (PCIe Bus Controller Unit) and provides a CPU-accessible window into VRAM through the PCIe interface::”h]”hŒ°The PRAMIN aperture mechanism is logically implemented by the GPU’s PBUS (PCIe Bus Controller Unit) and provides a CPU-accessible window into VRAM through the PCIe interface:”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´Khj h²hubhŒ literal_block”“”)�”}”(hXÇ+-----------------+ PCIe +------------------------------+ | CPU |<----------->| GPU | +-----------------+ | | | +----------------------+ | | | PBUS | | | | (Bus Controller) | | | | | | | | +--------------+ <------------ [1] | | | PRAMIN | | | | | | Window | | | | | | (1 MiB) | | | | | +--------------+ | | | | | | | | +---------|------------+ | | | | | v | | +----------------------+ <------- [2] | | VRAM | | | | (Several GiB) | | | | | | | | FB[0x0000000000] | | | | ... | | | | FB[0xFFFFFFFFFF] | | | +----------------------+ | +------------------------------+ [1] Window starts at BAR0 + 0x700000. [2] Program PRAMIN to any 64 KiB-aligned VRAM boundary.”h]”hXÇ+-----------------+ PCIe +------------------------------+ | CPU |<----------->| GPU | +-----------------+ | | | +----------------------+ | | | PBUS | | | | (Bus Controller) | | | | | | | | +--------------+ <------------ [1] | | | PRAMIN | | | | | | Window | | | | | | (1 MiB) | | | | | +--------------+ | | | | | | | | +---------|------------+ | | | | | v | | +----------------------+ <------- [2] | | VRAM | | | | (Several GiB) | | | | | | | | FB[0x0000000000] | | | | ... | | | | FB[0xFFFFFFFFFF] | | | +----------------------+ | +------------------------------+ [1] Window starts at BAR0 + 0x700000. [2] Program PRAMIN to any 64 KiB-aligned VRAM boundary.”…”�”}”hjAsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j?h³hÇh´Khj h²hubhä)�”}”(hŒYPBUS is responsible for, among other things, handling MMIO accesses to the BAR registers.”h]”hŒYPBUS is responsible for, among other things, handling MMIO accesses to the BAR registers.”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K9hj h²hubeh}”(h]”Œarchitecture-overview”ah ]”h"]”Œarchitecture overview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒPRAMIN Window Operation”h]”hŒPRAMIN Window Operation”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjeh²hh³hÇh´K=ubhä)�”}”(hŒ›The PRAMIN window provides a 1 MiB sliding aperture that can be repositioned over the entire VRAM address space using the ``NV_PBUS_BAR0_WINDOW`` register.”h]”(hŒzThe PRAMIN window provides a 1 MiB sliding aperture that can be repositioned over the entire VRAM address space using the ”…”�”}”(hjvh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``NV_PBUS_BAR0_WINDOW``”h]”hŒNV_PBUS_BAR0_WINDOW”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j~hjvubhŒ register.”…”�”}”(hjvh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K?hjeh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒWindow Control Mechanism”h]”hŒWindow Control Mechanism”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜h²hh³hÇh´KCubj@)�”}”(hX‹NV_PBUS_BAR0_WINDOW Register (0x1700): +-------+--------+--------------------------------------+ | 31:26 | 25:24 | 23:0 | | RSVD | TARGET | BASE_ADDR | | | | (bits 39:16 of VRAM address) | +-------+--------+--------------------------------------+ The 24-bit BASE_ADDR field encodes bits [39:16] of the target VRAM address, providing 40-bit (1 TiB) address space coverage with 64 KiB alignment. TARGET field (bits 25:24): - 0x0: VRAM (Video Memory) - 0x1: Reserved (unused) - 0x2: SYS_MEM_COH (Coherent System Memory) - 0x3: SYS_MEM_NONCOH (Non-coherent System Memory)”h]”hX‹NV_PBUS_BAR0_WINDOW Register (0x1700): +-------+--------+--------------------------------------+ | 31:26 | 25:24 | 23:0 | | RSVD | TARGET | BASE_ADDR | | | | (bits 39:16 of VRAM address) | +-------+--------+--------------------------------------+ The 24-bit BASE_ADDR field encodes bits [39:16] of the target VRAM address, providing 40-bit (1 TiB) address space coverage with 64 KiB alignment. TARGET field (bits 25:24): - 0x0: VRAM (Video Memory) - 0x1: Reserved (unused) - 0x2: SYS_MEM_COH (Coherent System Memory) - 0x3: SYS_MEM_NONCOH (Non-coherent System Memory)”…”�”}”hj©sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j?h³hÇh´KGhj˜h²hubhÞ)�”}”(hŒ¡Nova only uses TARGET=VRAM (0x0) for video memory access. The SYS_MEM target values are documented here for hardware completeness but are not used by the driver.”h]”hä)�”}”(hŒ¡Nova only uses TARGET=VRAM (0x0) for video memory access. The SYS_MEM target values are documented here for hardware completeness but are not used by the driver.”h]”hŒ¡Nova only uses TARGET=VRAM (0x0) for video memory access. The SYS_MEM target values are documented here for hardware completeness but are not used by the driver.”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´KXhj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhj˜h²hh³hÇh´Nubeh}”(h]”Œwindow-control-mechanism”ah ]”h"]”Œwindow control mechanism”ah$]”h&]”uh1hÈhjeh²hh³hÇh´KCubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ64 KiB Alignment Requirement”h]”hŒ64 KiB Alignment Requirement”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj×h²hh³hÇh´K]ubhä)�”}”(hŒ�The PRAMIN window must be aligned to 64 KiB boundaries in VRAM. This is enforced by the ``BASE_ADDR`` field representing bits [39:16] of the target address::”h]”(hŒXThe PRAMIN window must be aligned to 64 KiB boundaries in VRAM. This is enforced by the ”…”�”}”(hjèh²hh³Nh´Nubj)�”}”(hŒ ``BASE_ADDR``”h]”hŒ BASE_ADDR”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j~hjèubhŒ7 field representing bits [39:16] of the target address:”…”�”}”(hjèh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K_hj×h²hubj@)�”}”(hX•VRAM Address Calculation: actual_vram_addr = (BASE_ADDR << 16) + pramin_offset Where: - BASE_ADDR: 24-bit value from NV_PBUS_BAR0_WINDOW[23:0] - pramin_offset: 20-bit offset within the PRAMIN window [0x00000-0xFFFFF] Example Window Positioning: +---------------------------------------------------------+ | VRAM Space | | | | 0x0000000000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0x00000FFFFF +-----------------+ | | | | | ^ | | | | Window can slide | | v | to any 64 KiB-aligned boundary | | | | 0x0123400000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0x01234FFFFF +-----------------+ | | | | ... | | | | 0xFFFFF00000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0xFFFFFFFFFF +-----------------+ | +---------------------------------------------------------+”h]”hX•VRAM Address Calculation: actual_vram_addr = (BASE_ADDR << 16) + pramin_offset Where: - BASE_ADDR: 24-bit value from NV_PBUS_BAR0_WINDOW[23:0] - pramin_offset: 20-bit offset within the PRAMIN window [0x00000-0xFFFFF] Example Window Positioning: +---------------------------------------------------------+ | VRAM Space | | | | 0x0000000000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0x00000FFFFF +-----------------+ | | | | | ^ | | | | Window can slide | | v | to any 64 KiB-aligned boundary | | | | 0x0123400000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0x01234FFFFF +-----------------+ | | | | ... | | | | 0xFFFFF00000 +-----------------+ <-- 64 KiB aligned | | | PRAMIN Window | | | | (1 MiB) | | | 0xFFFFFFFFFF +-----------------+ | +---------------------------------------------------------+”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j?h³hÇh´Kbhj×h²hubeh}”(h]”Œkib-alignment-requirement”ah ]”h"]”Œ64 kib alignment requirement”ah$]”h&]”uh1hÈhjeh²hh³hÇh´K]ubeh}”(h]”Œpramin-window-operation”ah ]”h"]”Œpramin window operation”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K=ubeh}”(h]”Œpramin-aperture-mechanism”ah ]”h"]”Œpramin aperture mechanism”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jQŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j+j(jjjbj_j#j jÔjÑjjuŒ nametypes”}”(j+‰j‰jb‰j#‰jÔ‰j‰uh}”(j(hÊjhùj_j j jejÑj˜jj×uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.