#!/usr/bin/env python3 """Run chosen engine callbacks as original code inside the original stage passes over a constructed GV100, and write an oracle of what each one does. This extends tools/check_gpu_engine_dispatch_binary.py (imported unchanged; the RM API emulator behind it is imported unchanged too). The GPU object and every engine object are the ones the original's core init, probe and gpumgrAttachGpu build. The original passes _nv031220rm (PreInit), _nv031215rm (Init) and _nv031217rm (Load with PostLoad) then run from their entries. As in the dispatch oracle every non-default stage slot is a recorder that returns 0, except the callbacks listed in `LIVE`: those run as original instructions, in their place in the walk, with the lock state the original dispatcher gives them. Two things are written per case: 0. The header lines of the dispatch oracle for this GPU (`defaults`, `list`, `absent`, `missing`, `default-present`, `class`), and at the end its `observe` and `callback` lines. 1. `construct` lines: the construction-time value of every field the Rust engine states (`gpu/engine_bodies.rs::States`, `gpu/engine_bodies_more.rs`) and their arguments hold, read from the constructed objects before any pass runs. `construct-pointer` lines give a pointer field the Rust constructor states (`gpu/timer/construct.rs`) as `null`, an offset into its own object, or `outside`. 2. Per live callback, a `live` block: live r register read at body level w register write at body level call = a callee the body reaches that is not part of the body registry = _nv049786rm; the fixture has no key out a value the callee left behind (see LEFT_BEHIND) in r/w ... register access inside that callee (not the body's) mem body|call + bytes of the GPU object and of every engine object that changed outside / inside callees, as hex strings transcript - ... comparison with the physical transcript window status The boundary between a body and its callees is `TRANSPARENT`: the functions the Rust body reproduces itself (named in the Rust module of each body). Every other function entered from the body or from a transparent function is a callee: it runs as original code (or as the fixture the emulator has for it), and is recorded with its result. Register values. A read is answered from the physical transcript of 0000:b3:00.0 (target/trace/b3-bar0.txt). When the callback has a transcript window (`WINDOWS`, from reports/original-trace-b3-segment-map.json and the lines themselves), the n-th read of a register inside the callback gets the n-th read of that register inside the window (source `t`); a register the window does not read, or a callback without a window, gets the last read before the window or the pass (source `p`), else the first read in the transcript (source `f`). A register the transcript never read stops the harness. Writes are recorded and not applied. What this proves: on the GPU the original constructs in emulation, with the earlier callbacks that have no Rust body replaced by recorders, what these original bodies read, write, call and store, and their status. What it does not prove: that a recorded callee has a Rust producer (the Rust comparison answers each callee with the recorded result); that the state these bodies see equals a physical first open's, where the earlier callbacks and the pre-stage steps of _nv000790rm ran (the `transcript` lines show where the two differ); anything about hardware. """ import difflib import hashlib import json import sys from pathlib import Path if str(Path(__file__).resolve().parent) not in sys.path: sys.path.insert(0, str(Path(__file__).resolve().parent)) from _gpu_bar1_engine_oracle_check import require, write_or_check_json, write_or_check_text # noqa: E402 sys.path.insert(0, str(Path(__file__).resolve().parent)) import check_gpu_engine_dispatch_binary as D # noqa: E402 from unicorn import UC_HOOK_BLOCK, UC_HOOK_CODE, UC_HOOK_MEM_WRITE # noqa: E402 from unicorn.x86_const import UC_X86_REG_RIP, UC_X86_REG_RSI, UC_X86_REG_RSP # noqa: E402 from rmapi_binary_emulator import ARGS, BASES, CONTINUE, EXT, STACK # noqa: E402 E, R, world = D.E, D.R, D.world ROOT = D.ROOT OUT = ROOT / "target/gpu-stage" SPINE = json.loads((ROOT / "analysis/closed-driver-580/first-open-spine.json").read_text()) CHILDREN = {child["class_id"]: child for child in SPINE["children"]} LIVE_STUBS = 0x09200000 BAR0_PHYS, BAR0_SIZE = 0xa9000000, 0x1000000 BAR2_PHYS, BAR2_SIZE = 0x387400000000, 0x2000000 BAR2_VA = 0x50000000 E.cpu.mem_map(LIVE_STUBS, 0x100000) E.cpu.mem_map(R.BAR0 + 0x1000, BAR0_SIZE - 0x1000) E.cpu.mem_map(BAR2_VA, BAR2_SIZE) BAR2_VRAM = {} BAR0_WIN = [0x7fff0 << 16] def _bar2_mem_write(uc, access, addr, size, val, user): off = addr - BAR2_VA if 0xfa9000 <= off < 0xfaa000: BAR2_VRAM[0x7fff0e000 + (off - 0xfa9000)] = val & 0xffffffff elif 0 <= off < 0x1000: BAR2_VRAM[0x7fff0e000 + off] = val & 0xffffffff E.cpu.hook_add(UC_HOOK_MEM_WRITE, _bar2_mem_write, begin=BAR2_VA, end=BAR2_VA + BAR2_SIZE - 1) OBJMC, KERNEL_MC, INTR, OBJTMR, OBJBUS = 0x9aad0e, 0x3827ff, 0xc06e44, 0x9ddede, 0xcc4c31 KERNEL_FIFO, OBJDPAUX = 0xf3e155, 0xfd2ab9 HSHUB_MANAGER, VIRT_MEM_ALLOCATOR, OBJSEC2 = 0xbb32b9, 0x899e48, 0x28c408 # Functions that only carry a register access, a fill or a copy: the access macros with # their bookkeeping (_nv030477rm, _nv031156rm, _nv013539rm, _nv031155rm around a read; # _nv031157rm, _nv030927rm; _nv031395rm, _nv031426rm, _nv031390rm, _nv031478rm, _nv053913rm, # _nv031338rm, _nv031391rm, _nv031447rm, _nv013540rm around a write), the port-layer fill # and copy, the bit-vector helpers _nv017883rm.._nv017898rm, and _nv059479rm, which only # returns a global word (REA listing: `mov eax, [global]; ret`). PLUMBING = {"_nv053907rm", "_nv015884rm", "_nv053912rm", "_nv015885rm", "_nv049612rm", "_nv049615rm", "_nv030477rm", "_nv031156rm", "_nv013539rm", "_nv031155rm", "_nv031395rm", "_nv031426rm", "_nv031390rm", "_nv031478rm", "_nv053913rm", "_nv031157rm", "_nv030927rm", "_nv031338rm", "_nv031391rm", "_nv031447rm", "_nv013540rm", "_nv052705rm", "_nv052695rm", "os_mem_set", "os_mem_copy", "_nv017883rm", "_nv017885rm", "_nv017887rm", "_nv017890rm", "_nv017897rm", "_nv017898rm", "_nv059479rm"} # The access macros count in the GPU object (GPU+4120..+413f); those bytes are left out of # the `mem` lines. IO_BOOKKEEPING = ("GPU", 0x4120, 0x4140) # Per body (symbol number): the functions the Rust body reproduces itself. TRANSPARENT = { 43631: (), # _nv049734rm returns its second argument (gpu/mc_init.rs). 43629: ("_nv049734rm",), # _nv043627rm is the tail of InitLocked (gpu/mc_init.rs::init_locked). 43628: ("_nv043627rm",), # HAL body _nv043573rm and the engine-2 reset leaf (gpu/mc_load.rs). 43630: ("_nv043573rm", "_nv043634rm", "_nv043619rm", "_nv041568rm", "_nv043639rm"), 41564: (), 41565: (), # _nv037667rm with the entry count _nv037608rm and the vector length _nv060224rm # (gpu/intr_init.rs::init_interrupt_table); _nv052705rm is the table fill. 37777: ("_nv037667rm", "_nv037608rm", "_nv060224rm", "_nv052705rm"), 37773: (), # Bit-vector helpers over 0xb3 bits (gpu/intr_init.rs::init_locked). 37772: (), 37775: (), # HAL +190 _nv059661rm (gpu/timer/init.rs::program_time). 59663: ("_nv059661rm",), 59665: (), # HAL +300 _nv018541rm (gpu/bus_stage.rs::pre_init_locked). 18656: ("_nv018541rm",), 18653: (), # HAL +188 _nv018574rm, +1a8 _nv018683rm, +220 _nv018640rm with +210 _nv018450rm, # +370 _nv018468rm, +230 _nv018641rm, +228 _nv018636rm, +458 _nv018539rm # (gpu/bus_stage.rs::load). 18654: ("_nv018574rm", "_nv018683rm", "_nv018640rm", "_nv018450rm", "_nv018468rm", "_nv018641rm", "_nv018636rm", "_nv018539rm"), # _nv045390rm returns 0 and HAL +308 _nv018459rm is empty (gpu/bus_stage.rs::post_load). 18655: ("_nv045390rm", "_nv018459rm"), 40425: (), 26431: (), 59666: (), 59664: (), 35792: (), 42134: (), 26119: (), 55934: (), 41689: (), 34705: (), 26118: ("_nv026109rm", "_nv039138rm"), 43154: (), 42120: (), 42121: (), 29564: (), 17796: (), 51784: (), 44121: (), 46909: (), 47700: (), 60193: (), 41692: (), 52516: (), 43151: (), 60810: (), 27312: (), 26428: (), 39254: (), 46207: (), 39252: (), 27165: (), 39600: (), 41881: (), 41067: (), 39835: (), 19107: (), 19420: (), 35860: (), 45883: (), 27308: (), 46438: (), 55926: (), 29252: (), 35861: (), 39596: (), 46443: (), 45894: (), 44122: (), 29251: (), 34083: (), 47702: (), 27306: (), 18407: (), 19113: (), 34708: (), 43238: (), 51861: (), 39599: (), 43239: (), 16955: (), 40424: (), 29563: (), 18410: (), 36574: (), 43152: (), 33667: (), 21153: (), 21152: (), 51782: (), 59396: (), 45897: (), 45895: (), 19109: (), 34082: (), 27162: (), 37346: (), 43155: (), 50988: (), 41066: (), 46437: (), 18405: (), 41551: (), 59806: (), 39837: (), 44123: (), 45882: (), 36573: (), 21154: (), 51783: (), 47699: (), 40959: (), 37348: (), 28310: (), 16961: (), 17792: (), 41688: (), 44120: (), 29562: (), 40957: (), 43236: (), 39251: (), 41690: (), 50986: (), 28307: (), 39595: (), 51858: (), 17793: (), 59397: (), 40958: (), 27311: (), 50987: (), 17795: (), 39597: (), 40427: (), 33663: (), 33665: (), 55933: (), 28309: (), } CLOCK_MANAGER = 0xbcadd3 FAN = 0xadd018 GCX = 0x4507c4 GRAPHICS = 0xd334df GRAPHICS_MANAGER = 0x2f465a HSHUB = 0x5b3331 KERNEL_BIF = 0xdbe523 KERNEL_BUS = 0xd2ac57 KERNEL_CE = 0x242aca KERNEL_GMMU = 0x29362f KERNEL_GRAPHICS = 0xea3fa9 KERNEL_HWPM = 0xc8c00f KERNEL_MEMORY_SYSTEM = 0x7faff1 KERNEL_MIG_MANAGER = 0x1c1bf KERNEL_NVLINK = 0xce6818 KERNEL_PERF = 0xc53a57 KERNEL_PMU = 0xab9d7d LPWR = 0x112230 MEMORY_MANAGER = 0x22ad47 MEMORY_SYSTEM = 0x174e21 MIG_MANAGER = 0xfd75d0 NV_DEBUG_DUMP = 0x7e80a2 NVLINK = 0x790a3c OBJACR = 0xdb32a1 OBJBIF = 0xd1c956 OBJBSP = 0x8f99e1 OBJCE = 0x793ceb OBJCIPHER = 0x8dd911 OBJFBFLCN = 0x8a20bf OBJFIFO = 0xb02365 OBJGMMU = 0xd7a41d OBJHDACODEC = 0xa576e2 OBJHWPM = 0x97e43b OBJINFOROM = 0xe1639 OBJLSFM = 0x9a25e4 OBJMSENC = 0xe97b6c OBJUVM = 0xf9a17d OBJVBIOS = 0x5dc772 OBJVOLT = 0xa68120 PERF = 0xed0b65 PMGR = 0x894574 PMU = 0xf3d722 THERM = 0x6c1e56 # The callbacks that run as original code: (class id, slot) -> body symbol number. LIVE = { (OBJMC, "PreInitUnlocked"): 43631, (OBJMC, "InitUnlocked"): 43629, (OBJMC, "InitLocked"): 43628, (OBJMC, "Load"): 43630, (KERNEL_MC, "InitLocked"): 41564, (KERNEL_MC, "Load"): 41565, (INTR, "PreInitLocked"): 37777, (INTR, "InitUnlocked"): 37773, (INTR, "InitLocked"): 37772, (INTR, "Load"): 37775, (OBJTMR, "InitLocked"): 59663, (OBJTMR, "Load"): 59665, (OBJBUS, "PreInitLocked"): 18656, (OBJBUS, "InitLocked"): 18653, (OBJBUS, "Load"): 18654, (OBJBUS, "PostLoad"): 18655, (KERNEL_FIFO, "Load"): 40425, (KERNEL_MEMORY_SYSTEM, "Load"): 41689, (OBJDPAUX, "Load"): 26431, (OBJTMR, "PreInitLocked"): 59666, (OBJTMR, "InitUnlocked"): 59664, (LPWR, "PreInitLocked"): 43154, (OBJHDACODEC, "InitLocked"): 34705, (HSHUB_MANAGER, "InitLocked"): 35792, (KERNEL_PMU, "InitLocked"): 42134, (KERNEL_PERF, "InitLocked"): 42120, (KERNEL_PERF, "Load"): 42121, (OBJGMMU, "PostLoad"): 29564, (OBJBIF, "PreInitLocked"): 17796, (PMGR, "PreInitLocked"): 51784, (MEMORY_MANAGER, "Load"): 44121, (NV_DEBUG_DUMP, "InitLocked"): 46909, (NVLINK, "PostLoad"): 47700, (OBJVBIOS, "PreInitLocked"): 60193, (KERNEL_MEMORY_SYSTEM, "PreLoad"): 41692, (PMU, "PreInitLocked"): 52516, (LPWR, "Load"): 43151, (OBJVOLT, "Load"): 60810, (OBJFBFLCN, "PostLoad"): 27312, (OBJDPAUX, "InitLocked"): 26428, (KERNEL_BIF, "PostLoad"): 39254, (MIG_MANAGER, "InitLocked"): 46207, (KERNEL_BIF, "Load"): 39252, (FAN, "Load"): 27165, (KERNEL_BUS, "PreLoad"): 39600, (KERNEL_MIG_MANAGER, "InitLocked"): 41881, (KERNEL_GRAPHICS, "Load"): 41067, (KERNEL_CE, "InitLocked"): 39835, (OBJCE, "InitUnlocked"): 19107, (OBJCIPHER, "PreInitUnlocked"): 19420, (HSHUB, "InitLocked"): 35860, (HSHUB, "Load"): 35861, (MEMORY_SYSTEM, "InitUnlocked"): 45883, (MEMORY_SYSTEM, "PostLoad"): 45894, (OBJFBFLCN, "InitUnlocked"): 27308, (OBJMSENC, "InitUnlocked"): 46438, (OBJMSENC, "Load"): 46443, (OBJSEC2, "InitUnlocked"): 55926, (GCX, "PreLoad"): 29252, (GCX, "PostLoad"): 29251, (KERNEL_BUS, "Load"): 39596, (MEMORY_MANAGER, "PostLoad"): 44122, (GRAPHICS_MANAGER, "PostLoad"): 34083, (NVLINK, "PreInitLocked"): 47702, (OBJFBFLCN, "InitLocked"): 27306, (OBJBSP, "InitUnlocked"): 18407, (OBJCE, "PreLoad"): 19113, (OBJHDACODEC, "Load"): 34708, (OBJLSFM, "Load"): 43238, (PMU, "PostLoad"): 51861, (KERNEL_BUS, "PreInitLocked"): 39599, (OBJLSFM, "PreInitLocked"): 43239, (OBJACR, "InitLocked"): 16955, (KERNEL_FIFO, "InitLocked"): 40424, (OBJGMMU, "Load"): 29563, (OBJBSP, "Load"): 18410, (OBJHWPM, "Load"): 36574, (LPWR, "PostLoad"): 43152, (GRAPHICS, "PreInitLocked"): 33667, (CLOCK_MANAGER, "InitUnlocked"): 21153, (CLOCK_MANAGER, "InitLocked"): 21152, (PMGR, "InitLocked"): 51782, (THERM, "InitLocked"): 59396, (MEMORY_SYSTEM, "PreInitUnlocked"): 45897, (MEMORY_SYSTEM, "PreInitLocked"): 45895, (OBJCE, "PreInitLocked"): 19109, (GRAPHICS_MANAGER, "InitLocked"): 34082, (FAN, "InitLocked"): 27162, (OBJINFOROM, "Load"): 37346, (LPWR, "PreLoad"): 43155, (KERNEL_GRAPHICS, "InitLocked"): 41066, (OBJMSENC, "InitLocked"): 46437, (OBJBSP, "InitLocked"): 18405, (KERNEL_HWPM, "InitUnlocked"): 41551, (OBJUVM, "InitUnlocked"): 59806, (KERNEL_CE, "Load"): 39837, (PERF, "PostLoad"): 50988, (VIRT_MEM_ALLOCATOR, "InitLocked"): 26118, (VIRT_MEM_ALLOCATOR, "PostLoad"): 26119, (OBJSEC2, "PostLoad"): 55934, (KERNEL_MEMORY_SYSTEM, "PreInitLocked"): 41691, (MEMORY_MANAGER, "PreInitLocked"): 44123, (MEMORY_SYSTEM, "InitLocked"): 45882, (OBJHWPM, "InitUnlocked"): 36573, (CLOCK_MANAGER, "Load"): 21154, (PMGR, "Load"): 51783, (NVLINK, "Load"): 47699, (KERNEL_GMMU, "PostLoad"): 40959, (OBJINFOROM, "PostLoad"): 37348, (OBJFIFO, "PostLoad"): 28310, (OBJACR, "PreInitLocked"): 16961, (OBJBIF, "InitLocked"): 17792, (KERNEL_MEMORY_SYSTEM, "InitLocked"): 41688, (MEMORY_MANAGER, "InitLocked"): 44120, (OBJGMMU, "InitLocked"): 29562, (KERNEL_GMMU, "InitLocked"): 40957, (OBJLSFM, "InitLocked"): 43236, (KERNEL_BIF, "InitLocked"): 39251, (KERNEL_MEMORY_SYSTEM, "PostLoad"): 41690, (PERF, "InitLocked"): 50986, (OBJFIFO, "InitLocked"): 28307, (KERNEL_BUS, "InitLocked"): 39595, (PMU, "InitLocked"): 51858, (OBJBIF, "Load"): 17793, (THERM, "Load"): 59397, (KERNEL_GMMU, "Load"): 40958, (OBJFBFLCN, "Load"): 27311, (PERF, "Load"): 50987, (OBJBIF, "PostLoad"): 17795, (KERNEL_BUS, "PostLoad"): 39597, (KERNEL_FIFO, "PostLoad"): 40427, (GRAPHICS, "InitLocked"): 33663, (GRAPHICS, "Load"): 33665, (OBJSEC2, "Load"): 55933, (OBJFIFO, "Load"): 28309, } # Transcript windows (first line, last line) of the callbacks, 1-based lines of # target/trace/b3-bar0.txt. Basis: reports/original-trace-b3-segment-map.json segments # 12-13 (KernelGmmu fault-buffer registers reached from OBJBUS PreInitLocked through # KernelBus+168, then the OBJBUS reads), 22 (I2C port reset: the callee of OBJMC InitLocked # at slot 1b0 of the GPU+20e8 object; the map attributes it to Pmgr), 23, 34 (the fuse words # read by GPU+598 from OBJBUS InitLocked; the map attributes them to KernelGmmu), 48, 49, # 50 and 56. WINDOWS = { (OBJBUS, "PreInitLocked"): (37591, 37603), (OBJACR, "PreInitLocked"): (37713, 37722), (OBJMC, "InitLocked"): (48161, 48181), (OBJTMR, "InitLocked"): (48182, 48184), (OBJBUS, "InitLocked"): (107714, 107727), (OBJMC, "Load"): (139243, 139246), (KERNEL_MC, "Load"): (139247, 139248), (OBJTMR, "Load"): (139250, 139259), (OBJBUS, "Load"): (140573, 140587), } # Transcript ranges of the passes (stage_boundaries of the segment map). PASS_START = {"_nv031220rm": 37296, "_nv031215rm": 47967, "_nv031217rm": 138803} # Callees whose result is also a value they leave behind: name -> (argument index, bytes). LEFT_BEHIND = {"_nv030645rm": (1, 4), "_nv049684rm": ((0, 4), (1, 4)), "_nv031094rm": (2, 4), "_nv019282rm": (3, 1), "_nv019141rm": (3, 1)} # Construction-time fields: (object, offset, bytes). Objects are "GPU", a class name, or # "@" for a field of another engine a body reads or writes. FIELDS = ( # gpu/mc_init.rs::State ("OBJMC", 0x1b8, 1), ("OBJMC", 0x1b9, 1), ("OBJMC", 0x1bb, 1), ("OBJMC", 0x1c4, 1), ("OBJMC", 0x1c5, 1), ("OBJMC", 0x1c6, 1), ("OBJMC", 0x1c7, 1), ("GPU", 0x98d, 1), ("GPU", 0x99c, 1), ("GPU", 0x99e, 1), # gpu/kernel_mc.rs::State (InitLocked stores both) ("KernelMc", 0x108, 1), ("KernelMc", 0x10c, 4), # gpu/intr_init.rs::State and the service table ("Intr", 0x3f0, 1), ("Intr", 0x3f5, 1), ("Intr", 0x3f6, 1), ("Intr", 0x3f7, 1), ("Intr", 0x448, 4), ("Intr", 0x1518, 40), ("Intr", 0x1540, 40), ("Intr", 0x1608, 56), ("Intr", 0x1640, 1), ("Intr", 0x1668, 8), ("Intr", 0x1670, 8), ("Intr", 0x1678, 4), ("Intr", 0x1684, 4), ("Intr", 0x1688, 24), ("Intr", 0x16b8, 4), ("Intr", 0x16c8, 4), ("Intr", 0x16cc, 1), ("GPU", 0xdec, 4), ("Intr", 0x450, 0x10c8), # gpu/timer/init.rs::{InitState, Selection}; the two list heads and the callback kind # gpu/timer/load.rs reads ("OBJTMR", 0x2518, 4), ("OBJTMR", 0x24e, 1), ("OBJTMR", 0x248, 4), ("OBJTMR", 0x250, 8), ("OBJTMR", 0x258, 8), ("GPU", 0x90b, 1), ("GPU", 0x998, 1), ("GPU", 0x69e4, 4), ("GPU", 0xe01, 1), # gpu/bus_stage.rs::State ("OBJBUS", 0x460, 1), ("OBJBUS", 0x461, 1), ("OBJBUS", 0x467, 1), ("OBJBUS", 0x469, 1), ("OBJBUS", 0x5e4, 4), ("OBJBUS", 0x5e8, 1), ("OBJBUS", 0x5f0, 1), ("OBJBUS", 0x664, 4), ("OBJBUS", 0x668, 4), ("GPU", 0x4dd8, 4), # gpu/engine_bodies.rs::Arguments ("GPU", 0x90f, 1), ("GPU", 0xe00, 1), ("GPU", 0x52fc, 1), ("GPU", 0x6d29, 1), # OBJHDACODEC InitLocked (_nv034705rm) & VirtMemAllocator InitLocked (_nv026118rm) ("OBJHDACODEC", 0x218, 4), ("VirtMemAllocator", 0x120, 4), # GCX PreLoad (_nv029252rm) ("GCX", 0x1f8, 1), ("GCX", 0x1fb, 1), # OBJCE PreLoad (_nv019113rm) *[pair for i in range(9) for pair in ((f"OBJCE[{i}]", 0x485, 1), (f"OBJCE[{i}]", 0x489, 1))], # OBJBSP Load (_nv018410rm) & OBJHWPM Load (_nv036574rm) ("OBJBSP[0]", 0x448, 4), ("OBJHWPM", 0x82c, 4), # Graphics PreInitLocked (_nv033667rm) & Therm InitLocked (_nv059396rm) ("GraphicsManager", 0x650, 1), ("Therm", 0x708e, 1), # MemorySystem PreInitUnlocked (_nv045897rm) & PreInitLocked (_nv045895rm) ("MemorySystem", 0x8cb5, 1), ("MemorySystem", 0x8bfc, 4), ("MemorySystem", 0x8c11, 1), ("MemorySystem", 0x8c15, 1), ("MemorySystem", 0x13e8, 8), ("MemorySystem", 0x3f58, 8), ("MemorySystem", 0x8cf1, 1), ("MemorySystem", 0x8c48, 1), # Fan InitLocked (_nv027162rm), Lpwr PreLoad (_nv043155rm), OBJINFOROM Load (_nv037346rm) ("Fan", 0x14c, 4), ("Fan", 0x154, 4), ("Fan", 0x178, 24), ("Lpwr", 0x1208, 8), ("OBJINFOROM", 0x1f80, 1), ) # OBJTMR ConstructEngine _nv059547rm with _nv049710rm (gpu/timer/construct.rs): the # property byte it tests, the words it stores, and the two bytes of every alarm-pool entry. FIELDS += ( ("OBJTMR", 0x24b, 1), ("OBJTMR", 0x251c, 1), ("OBJTMR", 0x2510, 8), ("OBJTMR", 0x2520, 8), ("OBJTMR", 0x2068, 8), ) + tuple(("OBJTMR", 0x268 + 0x50 * entry + field, 1) for entry in range(96) for field in (0x20, 0x30)) # Pointer fields it stores, written as `construct-pointer