From 80b48fbbb4f62b26abe607d40c8347ecea98a302 Mon Sep 17 00:00:00 2001 From: Acelogic <7362641+Acelogic@users.noreply.github.com> Date: Fri, 23 Oct 2026 20:41:43 -0400 Subject: [PATCH] cycle: add --resident-mib Pass the AdrenoX2 resident-map budget to the guest as the boot-arg adreno_resident_mib=MIB (0 disables residency, at most 4096). An ADRENO_RESIDENT_REPIN kext reads it; older kexts ignore the boot-arg. Without the option the boot-args are unchanged. The A16 desktop runs since b12v19r pass --resident-mib 1536. With this option b12v20's argv reproduces its qualification's boot_argument_addition exactly. --- tools/cycle.py | 3 +++ tools/cycle_lib/installed_fresh.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tools/cycle.py b/tools/cycle.py index c97591a..d7bcb0c 100755 --- a/tools/cycle.py +++ b/tools/cycle.py @@ -467,6 +467,9 @@ def parse(argv=None): help='SNAP_EL0_CACHE_MAINT: SCTLR_EL1.UCI as SPTM installs it, so EL0 DC CVAU/CVAC/CIVAC and IC IVAU ' '(sys_icache_invalidate) no longer trap to EL1, where handle_msr_trap raises SIGILL; give it to ' 'every mode of the attempt') + p.add_argument('--resident-mib', type=int, default=None, metavar='MIB', + help='guest boot-arg adreno_resident_mib=MIB: AdrenoX2 resident-map budget (0 = off, max 4096; ' + 'agents/resident-evict recommends 1536); give it to every mode of the attempt') p.add_argument('--present-maint', action='store_true', help='guest boot-arg adreno_present_maint=1: AdrenoDisplay keeps its layer-0 clean+invalidate pass ' 'even while the beam is LOCKED (tear-free fix2 skips it then); for b12v8\'s stale bands; ' diff --git a/tools/cycle_lib/installed_fresh.py b/tools/cycle_lib/installed_fresh.py index 392e1a5..f6f3bd7 100644 --- a/tools/cycle_lib/installed_fresh.py +++ b/tools/cycle_lib/installed_fresh.py @@ -1099,6 +1099,10 @@ def boot_addition(args): extra = [] if getattr(args, 'present_maint', False): extra.append('adreno_present_maint=1') + resident_mib = getattr(args, 'resident_mib', None) + if resident_mib is not None: + need(0 <= resident_mib <= 4096, '--resident-mib must be 0..4096') + extra.append(f'adreno_resident_mib={resident_mib}') # --present-latch's guest boot-args (AdrenoDisplay start_hardware, SnapI2CHIDBus::start); none without the flag. latch_us, hold = getattr(args, 'present_latch_us', None), getattr(args, 'present_hold', None) margin_us, active_us = getattr(args, 'present_hold_margin_us', None), getattr(args, 'input_active_us', None)