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.
This commit is contained in:
Acelogic committed 2026-10-23 20:41:43 -04:00
1 parent 2c60b47a95
commit 80b48fbbb4
2 files changed
+7

No files matched your search

+3
View File
@@ -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; '
+4
View File
@@ -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)