fix(device): Correct A7 (0x8947) chip classification from gaster
Updated CPID 0x8947 entry based on gaster reference implementation to use correct payload path and offset values. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a15cdc0abd
commit
a810516aff
2 changed files with 15 additions and 8 deletions
|
|
@ -20,6 +20,8 @@ static const chip_info_t g_chip_table[] = {
|
||||||
|
|
||||||
/* CPID 0x8947 -- A7, iPhone 5s / iPad Air */
|
/* CPID 0x8947 -- A7, iPhone 5s / iPad Air */
|
||||||
/* gaster: iBoot-1458.2 */
|
/* gaster: iBoot-1458.2 */
|
||||||
|
/* A7 is Apple's first ARM64 SoC, but gaster's checkm8 path uses */
|
||||||
|
/* payload_dest_armv7 / notA9_armv7 header -- treat as ARMv7 here. */
|
||||||
{
|
{
|
||||||
.cpid = 0x8947,
|
.cpid = 0x8947,
|
||||||
.name = "A7",
|
.name = "A7",
|
||||||
|
|
|
||||||
|
|
@ -47,20 +47,25 @@
|
||||||
/* CPID classification helpers */
|
/* CPID classification helpers */
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
/* ARMv7 32-bit chips (payload_dest_armv7 != 0) */
|
/*
|
||||||
|
* CPID_IS_ARMV7 -- 32-bit ARMv7 chips (payload_dest_armv7 != 0).
|
||||||
|
* 0x8947 (A7, iPhone 5s) is included here: despite being Apple's first
|
||||||
|
* ARM64 SoC, gaster's DFU exploit path uses payload_dest_armv7 and the
|
||||||
|
* notA9_armv7 payload header for this chip, identical to the other
|
||||||
|
* 32-bit chips. It is NOT in the notA9 ARM64 branch in gaster.
|
||||||
|
*/
|
||||||
#define CPID_IS_ARMV7(cpid) \
|
#define CPID_IS_ARMV7(cpid) \
|
||||||
((cpid) == 0x7002 || (cpid) == 0x8002 || (cpid) == 0x8004 || \
|
((cpid) == 0x8947 || (cpid) == 0x7002 || (cpid) == 0x8002 || \
|
||||||
(cpid) == 0x8950 || (cpid) == 0x8955)
|
(cpid) == 0x8004 || (cpid) == 0x8950 || (cpid) == 0x8955)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CPID_IS_LEGACY_64 -- ARM64 chips that use payload_hdr_a9_t (the simpler
|
* 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
|
* 64-bit header without ROP gadgets or tlbi). Previously this included
|
||||||
* the A9-family (0x8000, 0x8003) which share the same header layout.
|
* 0x8947 (A7), but gaster treats A7 as ARMv7 (payload_dest_armv7 path),
|
||||||
* Note: 0x8950 and 0x8955 are 32-bit ARMv7 chips; they belong in
|
* so this macro is currently unused; kept for future use.
|
||||||
* CPID_IS_ARMV7, not here.
|
|
||||||
*/
|
*/
|
||||||
#define CPID_IS_LEGACY_64(cpid) \
|
#define CPID_IS_LEGACY_64(cpid) \
|
||||||
((cpid) == 0x8947)
|
(0)
|
||||||
|
|
||||||
/* Chips with ROP gadgets (tlbi != 0 means newer overwrite path) */
|
/* Chips with ROP gadgets (tlbi != 0 means newer overwrite path) */
|
||||||
#define CPID_HAS_TLBI(chip) ((chip)->tlbi != 0)
|
#define CPID_HAS_TLBI(chip) ((chip)->tlbi != 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue