Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
46f5764
T6050: MTP DAPF, one release bit per CPU, room for the J714c's i2c nodes
edimoldovan Oct 23, 2026
222146d
nvme: T6050 register geometry, retained heap, opt-in coprocessor stop
edimoldovan Oct 25, 2026
6a740fa
cpufreq: T6050 cluster 0 (M), same command model as T8142
edimoldovan Oct 26, 2026
4ae1eab
usb: T6050 leaves the free ports in USB 2.0 host mode for the next stage
edimoldovan Oct 26, 2026
4b0a276
kboot: GPU handoff for T6050
edimoldovan Oct 28, 2026
24bb2fd
payload: boot= takes the stage 1 config's proxy window without its ch…
edimoldovan Nov 5, 2026
608a177
dapf: add the T6050 PMP DART (dart-pmp0)
edimoldovan Nov 6, 2026
162b25f
payload: an appended kernel takes the stage 1 config's proxy window w…
edimoldovan Nov 7, 2026
ad08bf5
payload: T6050 stage 2 marks stage 1's live ANS session for U-Boot
edimoldovan Nov 7, 2026
140a36b
main: keep the heap the last steps before the jump allocate
edimoldovan Nov 8, 2026
4d24ca1
tests: build the T6050 paths that #30 adds
rolotrealanis98 Nov 7, 2026
ff75a40
smp: t6050: forward cores locked to a stage 1 base the image left
rolotrealanis98 Nov 7, 2026
2739143
kboot: n1: fill the T6050 N1 hand-off in the DT
rolotrealanis98 Nov 7, 2026
1d23ae6
pcie: t6050: train apcie0 port 0 (the N1) behind chosen.asahi,t6050-n1
rolotrealanis98 Nov 7, 2026
1599b6c
pcie: t6050: start ANS for the N1 training's storage checks (chosen.a…
rolotrealanis98 Nov 7, 2026
c615f34
pcie: t6050: pulse the N1 reset through the SMC as on J813 (chosen.as…
rolotrealanis98 Nov 7, 2026
9879c2f
pcie: t6050: handle a warm N1 and a live port 0 at entry (chosen.asah…
rolotrealanis98 Nov 7, 2026
2bebfe7
kboot_gpu: hand the T6050 GPU to the G17 driver from the ADT
rolotrealanis98 Nov 7, 2026
4785090
firmware: add the 27.2 and 27.3 beta 1 stub iBoot strings
rolotrealanis98 Nov 7, 2026
088b8c4
kboot: t6050: reserve the running coprocessors' __OS_LOG segments
rolotrealanis98 Nov 7, 2026
8082c0a
kboot: t6050: hand the internal display to the firmware-27 DCP driver
rolotrealanis98 Nov 7, 2026
1946694
kboot: t6050: publish DCP firmware-compat 27.3.0 for the 27.3 beta 1 …
rolotrealanis98 Nov 7, 2026
5818f6b
kboot: t6050: give the display nodes a phandle if the DT has none
rolotrealanis98 Nov 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ OBJECTS := \
iodev.o \
iova.o \
isp.o \
kboot.o kboot_atc.o kboot_gpu_t8122.o kboot_gpu_t8122_power.o kboot_pmp_t8122.o \
kboot.o kboot_atc.o kboot_n1.o kboot_gpu_t8122.o kboot_gpu_t8122_power.o kboot_pmp_t8122.o \
kboot_t6020_compat.o \
kboot_display_handoff.o kboot_display_facts.o kboot_gpu26.o kboot_gpu_t6031.o kboot_t6031.o \
main.o boot_options.o \
Expand All @@ -195,7 +195,7 @@ OBJECTS := \
memory.o memory_asm.o \
nvme.o \
payload.o \
pcie.o \
pcie.o pcie_t6050.o \
pmgr.o \
proxy.o \
ringbuffer.o \
Expand Down
22 changes: 22 additions & 0 deletions src/chainload.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ void rust_free_image(void *image, size_t size);
extern u8 _chainload_stub_start[];
extern u8 _chainload_stub_end[];

/* The staged copy of the next stage's boot_args, and the next_stage.args[0] that runs it */
static struct boot_args *staged_boot_args;
static u64 staged_args0;
/* The heap high-water once the staging is done */
static u64 staged_heap_end;

_Static_assert(sizeof(struct chainload_header) == CHAINLOAD_HDR_SIZE, "load header size");
_Static_assert(offsetof(struct chainload_header, footprint) == CHAINLOAD_HDR_FOOTPRINT_OFF,
"load header footprint offset");
Expand Down Expand Up @@ -56,6 +62,7 @@ int chainload_image(void *image, size_t size, char **vars, size_t var_cnt)

printf("chainload: Preparing image...\n");
next_stage.entry = NULL;
staged_boot_args = NULL;
if (!image || !size || (chip_id == T8140 && ro_status != 1) ||
cur_boot_args.phys_base > UINT64_MAX - cur_boot_args.mem_size)
return -1;
Expand Down Expand Up @@ -246,6 +253,9 @@ int chainload_image(void *image, size_t size, char **vars, size_t var_cnt)
footprint, run_base);
next_stage.entry = stub;
next_stage.args[0] = fw_base + fw_bootargs_off;
staged_boot_args = new_boot_args;
staged_args0 = next_stage.args[0];
staged_heap_end = heapblock_high_water();
next_stage.args[1] = (u64)new_image;
next_stage.args[2] = new_base;
next_stage.args[3] = copy_size;
Expand All @@ -254,6 +264,18 @@ int chainload_image(void *image, size_t size, char **vars, size_t var_cnt)
return 0;
}

/* The last steps before the jump can still grow the heap; keep it from the next stage. */
void chainload_retain_late_heap(void)
{
if (!next_stage.entry || !staged_boot_args || next_stage.args[0] != staged_args0)
return;
u64 heap_end = heapblock_high_water();
if (heap_end > staged_heap_end && heap_end > staged_boot_args->top_of_kernel_data) {
printf("chainload: late heap up to 0x%lx kept from the next stage\n", heap_end);
staged_boot_args->top_of_kernel_data = heap_end;
}
}

#ifdef CHAINLOADING

int chainload_load(const char *spec, char **vars, size_t *var_cnt, size_t var_capacity)
Expand Down
1 change: 1 addition & 0 deletions src/chainload.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct chainload_header {
};

int chainload_image(void *base, size_t size, char **vars, size_t var_cnt);
void chainload_retain_late_heap(void);
int chainload_load(const char *spec, char **vars, size_t *var_cnt, size_t var_capacity);

#endif
Expand Down
23 changes: 20 additions & 3 deletions src/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static u32 pstate_reg_to_pstate(u64 val)
case T8122:
case T8142:
case T8140:
case T6050:
return FIELD_GET(CLUSTER_PSTATE_DESIRED1, val);
default:
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);
Expand All @@ -80,8 +81,9 @@ static u32 pstate_reg_to_pstate(u64 val)

static int set_pstate(const struct cluster_t *cluster, uint32_t pstate)
{
if (chip_id == T8142 && poll64(cluster->base + CLUSTER_PSTATE, CLUSTER_PSTATE_BUSY, 0,
CLUSTER_SWITCH_TIMEOUT) < 0) {
if ((chip_id == T8142 || chip_id == T6050) &&
poll64(cluster->base + CLUSTER_PSTATE, CLUSTER_PSTATE_BUSY, 0, CLUSTER_SWITCH_TIMEOUT) <
0) {
printf("cpufreq: Cluster %s is busy before P-State request\n", cluster->name);
return -1;
}
Expand Down Expand Up @@ -118,6 +120,7 @@ static int set_pstate(const struct cluster_t *cluster, uint32_t pstate)
case T8122:
case T8142:
case T8140:
case T6050:
val &= ~CLUSTER_PSTATE_DESIRED1;
val |= CLUSTER_PSTATE_SET | FIELD_PREP(CLUSTER_PSTATE_DESIRED1, pstate);
break;
Expand All @@ -133,7 +136,7 @@ static int set_pstate(const struct cluster_t *cluster, uint32_t pstate)
}
}

if (chip_id == T8142 &&
if ((chip_id == T8142 || chip_id == T6050) &&
pstate_reg_to_pstate(read64(cluster->base + CLUSTER_PSTATE)) != pstate) {
printf("cpufreq: Cluster %s did not accept P-State %u\n", cluster->name, pstate);
return -1;
Expand Down Expand Up @@ -179,6 +182,7 @@ int cpufreq_init_cluster(const struct cluster_t *cluster, const struct feat_t *f
case S8000 ... S8003:
case T8010 ... T8015: /* This covers a gap but T8013 and T8014 will not randomly appear. */
case T8142: /* Keep firmware voltage, PLL and throttling configuration. */
case T6050:
/* Do nothing */
break;
case T8103:
Expand Down Expand Up @@ -378,6 +382,16 @@ static const struct cluster_t t8142_clusters[] = {
{},
};

/*
* T6050 (M5 Pro/Max): two M clusters (ADT voltage-states22/23, 15 P-states,
* 1.344 to 4.38 GHz) and one P cluster (voltage-states5, 20 P-states). Only
* cluster 0 runs cores today (CPU-START.md); the others stay untouched.
*/
static const struct cluster_t t6050_clusters[] = {
{"MCPU0", 0x210e00000, false, 1, 4},
{},
};

const struct cluster_t *cpufreq_get_clusters(void)
{
switch (chip_id) {
Expand Down Expand Up @@ -417,6 +431,8 @@ const struct cluster_t *cpufreq_get_clusters(void)
return t6030_clusters;
case T8142:
return t8142_clusters;
case T6050:
return t6050_clusters;
case T6031:
case T6034:
return t6031_clusters;
Expand Down Expand Up @@ -535,6 +551,7 @@ const struct feat_t *cpufreq_get_features(void)
case T8122:
return t8122_features;
case T8142:
case T6050:
return t8142_features;
case T6020:
case T6021:
Expand Down
10 changes: 8 additions & 2 deletions src/dapf.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,14 @@ struct entry {

struct entry dapf_entries[] = {
/* Keep dart-ane out: its Linux driver owns that DAPF on T8140. */
{"/arm-io/dart-aop", 1, "aop"}, {"/arm-io/dart-mtp", 1, "mtp"}, {"/arm-io/dart-pmp", 1, "pmp"},
{"/arm-io/dart-isp", 5, "isp"}, {"/arm-io/dart-isp0", 5, "isp"}, {NULL, -1, NULL},
{"/arm-io/dart-aop", 1, "aop"},
{"/arm-io/dart-mtp", 1, "mtp"},
{"/arm-io/dart-pmp", 1, "pmp"},
/* T6050: the PMP's DART is dart-pmp0 (dart,t8110; DAPF aperture reg[1], live-verified). */
{"/arm-io/dart-pmp0", 1, "pmp0"},
{"/arm-io/dart-isp", 5, "isp"},
{"/arm-io/dart-isp0", 5, "isp"},
{NULL, -1, NULL},
};

int dapf_init_fdt(const void *fdt)
Expand Down
4 changes: 4 additions & 0 deletions src/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ const struct fw_version_info fw_versions[NUM_FW_VERSIONS] = {
// Same iBoot string as 27.0: detect_firmware() always picks V27_0. Verified from the J575D
// (M3 Ultra) 27.0.1 iBoot (26A434): both report "mBoot-20457.1.29", so no V27_0_1 exists.
[V27_0] = {V27_0, "27.0", {27, 0, 0}, 3, "mBoot-20457.1.29"},
// Aura (aurora-silicon/aura PR #61): the 27.2 stub's iBoot string.
[V27_2] = {V27_2, "27.2", {27, 2, 0}, 3, "mBoot-20457.41.3"},
// J716s stub 26C5035r (27.3 beta 1); its DCP firmware is AppleDCP-1317.60.10, SDK 27.3.
[V27_3B1] = {V27_3B1, "27.3 beta", {27, 2, 98, 1}, 4, "mBoot-20457.60.65.0.1"},
// clang-format on
};

Expand Down
2 changes: 2 additions & 0 deletions src/firmware.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ enum fw_version {
V26_7,
V26_7_1,
V27_0,
V27_2,
V27_3B1,
NUM_FW_VERSIONS,
};

Expand Down
Loading