While the driver is called IT8502E, it is talking to a very specific version of the EC firmware that was running on a very specific set of machines that used to have this chip.

Chances are that none of these machines are in operation anymore, and if they are, they are most likely no longer relevant. But that goes for a lot of the code in coreboot / flashrom et all.

Angel, chances are also, that your behavior is caused by one of two things happening:

1. the CPU is catching IO writes to the IO ports in question and, because flashrom does not pass the consistency checks for these accesses, an SMI reboots the machine.

2. the IT8502 firmware on your machine gets a command that it does not understand, because it's not running the firmware from the same ODM as the IT8502 that this driver was developed against, and the EC decides that because someone is sending potentially evil commands, the EC pulls the AP's reset line to stop the behavior. In a lot of these older systems there is no actual security strategy in the software design, and so the only way to keep the device safe is by obscurity. To prevent people from reverse engineering the project, rate limiting the access through resets is a somewhat reasonable method (hu hu).

I bet that we could remove the it85spi driver from flashrom all together and no person or entity would actually ever care. Of course we might want to decide against it for educational reasons.

Patch set 1:Code-Review +2

View Change

To view, visit change 46547. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5761dea48d553b1334eef3c9cf0ad79cedbd7806
Gerrit-Change-Number: 46547
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Tue, 03 Nov 2020 02:26:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment