Attention is currently required from: Felix Singer, Nico Huber, Michał Żygowski, Paul Menzel, Angel Pons.
1 comment:
File ite_ec.c:
p = extract_programmer_param("portpair");
if (p) {
if (!strcmp(p, "0")) {
ctx_data->control_port = 0x64;
ctx_data->data_port = 0x60;
} else if (!strcmp(p, "1")) {
ctx_data->control_port = 0x66;
ctx_data->data_port = 0x62;
} else if (!strcmp(p, "2")) {
ctx_data->control_port = 0x6c;
ctx_data->data_port = 0x68;
} else if (!strcmp(p, "3")) {
ctx_data->control_port = 0x6e;
ctx_data->data_port = 0x6a;
} else {
msg_pdbg("%s(): incorrect portpair param value: %s\n",
__func__, p);
ret = false;
}
}
free(p);
I found out, why the reference implementation first communicates through 62/66 and then switches to a different port pair:
Getting the EC fw info like version, project id and so on is done through 62/66 because this is the port pair used for EC fw communication at runtime. This pair is even hardcoded in the vendor UEFI fw.
When issuing any flash command, the EC fw disables all interrupts, copies the flash function(s) to scratch ROM in XRAM and jumps there. What port pair is used by the flash functions is specific to the OEM. Some use 60/64 (KBC) like Clevo. Others use different pairs, e.g. Lenovo uses 68/6C or 62/66 in various fw implementations or even have implemented both (Yoga C740 for example).
Since uECFlash is vendor-independent and comes from ITE directly, they probably added that option to support them all.
To view, visit change 55715. To unsubscribe, or for help writing mail filters, visit settings.