Skip to content

Add Apple T2 SMC module - #92

Draft
ahowimocaj587-beep wants to merge 1 commit into
namazso:mainfrom
ahowimocaj587-beep:agent/apple-t2-smc
Draft

Add Apple T2 SMC module#92
ahowimocaj587-beep wants to merge 1 commit into
namazso:mainfrom
ahowimocaj587-beep:agent/apple-t2-smc

Conversation

@ahowimocaj587-beep

Copy link
Copy Markdown

What changed

Adds an AppleT2Smc PawnIO module for the MMIO-based SMC interface found on Intel Macs with the Apple T2 chip (2018–2020).

The module exposes narrowly scoped IOCTL functions for:

  • reading SMC keys and key metadata;
  • looking up keys by index;
  • writing fan-control keys only (F?Tg, F?Md, and FS! ).

Why

On T2 Macs, the legacy Apple SMC I/O-port interface does not return usable fan or temperature data under Windows. The controller is instead exposed through an MMIO window. A signed PawnIO module is needed so Windows applications can access that interface without bundling a general-purpose raw-memory driver.

The register layout and handshake follow the Linux T2 applesmc implementation from MCMrARM/mbp2018-etc.

Safety

The module probes the mapped status register before becoming available. Kernel-side write filtering prevents arbitrary SMC writes and permits only fan target/mode keys.

Validation

  • Compiled successfully with Pawn compiler 4.1.7152 using the repository CI-equivalent flags: -C64 -;+ -(+ -p.
  • Confirmed the target Mac exposes ACPI\\APP0001 with an MMIO resource at 0xFE0B0000.
  • Hardware protocol validation is pending a build signed for PawnIO Official edition; the current official driver correctly refuses the locally unsigned module.

This PR is intentionally a draft until maintainers can review the MMIO and write-filtering behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant