Files
vphone-cli/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestDisplayPatchSet.swift
T
LakrandClaude Opus 5.5 ae5e4531a5 Name every patch {component}-{effect}-{name}
The 117 bundled patch identifiers had grown five naming schemes
(kernel.x, jb.x, kernelcache_jb.x, txm_dev.x, bare names). Each one is now
{component}-{effect}-{name}:

- component: avpbooter, ibss, ibec, llb, txm, kernel, devicetree, dyld,
  preboot, or system-<binary> for a guest binary or file.
- effect: boot when the patch is boot-essential, exp when the standard
  preset leaves it off, cfw otherwise. A catalog test enforces this.
- name: snake_case, no hyphen, so the identifier splits from the right.

Record sites are now always <identifier>.<site>. The underscore-prefix
rule in covers(recordIdentifier:) and in the gate is gone: the new names
contain underscores, so kernel-boot-post_validation would otherwise have
covered kernel-boot-post_validation_unsigned. The 25 records that relied
on it (amfi_trustcache_1, launch_constraints_mov, sandbox_ext_N, ...) now
use a dot.

Old identifiers are not migrated. A VM whose PatchPlan or PatchSelection
names one must be patched again. The bundle becomes 2.2.0 and Launchpad
requires 2.2.0, so it never meets an old identifier from a bundle.

Launchpad's patch table shows Component, Effect and Name columns in place
of Identifier and Patch Set; the set moves to the detail line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:20:20 +09:00

46 lines
1.9 KiB
Swift

// FirmwareGuestDisplayPatchSet.swift — Manifest for the guest display path.
//
// IOMFB talks to a framebuffer that does not exist on a research board. Which
// patch is needed depends on the userland: a 27 base routes the swap through the
// kernel, while 26.0 and 18.x only need the swap-end structure resized. The two
// are mutually exclusive by version, so one set covers both.
import Foundation
import VPhonePatchKit
public enum FirmwareGuestDisplayPatchSet {
public static let identifier = "com.vphone.patchset.guest.display"
public static let manifest = VPhonePatchSetManifest(
identifier: identifier,
name: "Guest Display",
summary: "IOMFB patches that let the guest present a frame on the virtual display",
patches: [
VPhonePatchDeclaration(
identifier: "dyld-boot-iomfb_force_kern",
title: "IOMFB force kernel swap",
summary: "Routes the 27 display swap through the kernel, where the virtual framebuffer lives.",
target: .dyldSharedCache,
applicability: VPhonePatchApplicability(iOSBase: .major(27)),
bootEssential: true,
),
VPhonePatchDeclaration(
identifier: "dyld-boot-iomfb_swapend",
title: "IOMFB swap-end size",
summary: "Resizes the swap-end structure a 26.0 or 18.x userland submits.",
target: .dyldSharedCache,
applicability: VPhonePatchApplicability(
iOSBase: .oneOf([.release(major: 26, minor: 0), .major(18)]),
),
bootEssential: true,
),
],
requires: ["vphone.guest.system"],
provides: ["vphone.guest.display"],
after: ["vphone.guest.system"],
)
/// The swap-end target size the verb is invoked with.
public static let swapEndTargetSize = "0x560"
}