Skip to content

Commit fb36e30

Browse files
committed
firmware: Add support for 12.3.1 firmware.
This includes mapping it to 12.3.0 for compat in both DCP and GPU. Added for machines with replaced logic boards that trigger the 12.3 bootloop issue. Also fix the 12.5/12.6 version arrays which were wrong. Signed-off-by: Hector Martin <[email protected]>
1 parent 4266049 commit fb36e30

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

src/firmware.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ const struct fw_version_info fw_versions[NUM_FW_VERSIONS] = {
1717
[V12_1] = {V12_1, "12.1", {12, 1, 0}, 3, "iBoot-7429.61.2"},
1818
[V12_2] = {V12_2, "12.2", {12, 2, 0}, 3, "iBoot-7429.81.3"},
1919
[V12_3] = {V12_3, "12.3", {12, 3, 0}, 3, "iBoot-7459.101.2"},
20+
[V12_3_1] = {V12_3_1, "12.3.1", {12, 3, 1}, 3, "iBoot-7459.101.3"},
2021
[V12_4] = {V12_4, "12.4", {12, 4, 0}, 3, "iBoot-7459.121.3"},
21-
[V12_5] = {V12_5, "12.5", {12, 4, 0}, 3, "iBoot-7459.141.1"},
22+
[V12_5] = {V12_5, "12.5", {12, 5, 0}, 3, "iBoot-7459.141.1"},
2223
// Same as 12.5
23-
// {V12_6, "12.6", {12, 4, 0}, 3, "iBoot-7459.141.1"},
24+
// {V12_6, "12.6", {12, 6, 0}, 3, "iBoot-7459.141.1"},
2425
[V13_0B4] = {V13_0B4, "13.0 beta4", {12, 99, 4}, 3, "iBoot-8419.0.151.0.1"},
2526
[V13_0] = {V13_0, "13.0", {13, 0, 0}, 3, "iBoot-8419.41.10"},
2627
};

src/firmware.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ enum fw_version {
1010
V12_1,
1111
V12_2,
1212
V12_3,
13+
V12_3_1,
1314
V12_4,
1415
V12_5,
1516
// V12_6,

src/kboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ static int dt_set_dcp_firmware(const char *alias)
10431043
const struct fw_version_info *compat;
10441044

10451045
switch (os_firmware.version) {
1046+
case V12_3_1:
10461047
case V12_4:
10471048
compat = &fw_versions[V12_3];
10481049
break;

src/kboot_gpu.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,18 @@ int dt_set_gpu(void *dt)
398398
if (firmware_set_fdt(dt, gpu, "apple,firmware-version", &os_firmware))
399399
return -1;
400400

401-
if (firmware_set_fdt(dt, gpu, "apple,firmware-compat", &os_firmware))
401+
const struct fw_version_info *compat;
402+
403+
switch (os_firmware.version) {
404+
case V12_3_1:
405+
compat = &fw_versions[V12_3];
406+
break;
407+
default:
408+
compat = &os_firmware;
409+
break;
410+
}
411+
412+
if (firmware_set_fdt(dt, gpu, "apple,firmware-compat", compat))
402413
return -1;
403414

404415
u32 i = 0;

0 commit comments

Comments
 (0)