fix(device): Correct chip naming, CPID classification, and header guards

Renamed S5L8950/S5L8955 from "A9" to correct A5-class names, moved
them to ARMV7 macro, renamed CPID_IS_A9_CLASS to CPID_IS_LEGACY_64,
disambiguated duplicate A10 entries, and fixed cross-file header guard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tr4m0ryp 2026-04-05 03:26:32 +02:00
parent a6ba920e14
commit 4e6f7b70ee
5 changed files with 47 additions and 34 deletions

View file

@ -37,11 +37,18 @@
/* ARMv7 32-bit chips (payload_dest_armv7 != 0) */
#define CPID_IS_ARMV7(cpid) \
((cpid) == 0x7002 || (cpid) == 0x8002 || (cpid) == 0x8004)
((cpid) == 0x7002 || (cpid) == 0x8002 || (cpid) == 0x8004 || \
(cpid) == 0x8950 || (cpid) == 0x8955)
/* A9-class chips that use the TTBR0 payload variant */
#define CPID_IS_A9_CLASS(cpid) \
((cpid) == 0x8950 || (cpid) == 0x8955 || (cpid) == 0x8947)
/*
* CPID_IS_LEGACY_64 -- ARM64 chips that use payload_hdr_a9_t (the simpler
* 64-bit header without ROP gadgets or tlbi). This groups A7 (0x8947) with
* the A9-family (0x8000, 0x8003) which share the same header layout.
* Note: 0x8950 and 0x8955 are 32-bit ARMv7 chips; they belong in
* CPID_IS_ARMV7, not here.
*/
#define CPID_IS_LEGACY_64(cpid) \
((cpid) == 0x8947)
/* Chips with ROP gadgets (tlbi != 0 means newer overwrite path) */
#define CPID_HAS_TLBI(chip) ((chip)->tlbi != 0)