Hi Sandrine,
On Tue, Sep 12 2023, Sandrine Bailleux via TF-A wrote:
Now, even though getc() is not used in upstream TF-A code right now, I realize there might be downstream / internal test setups which need it. For example, for firmware recovery purposes (receiving a backup firmware over a serial interface) or automated tests setups (some script driving a test session using some communication protocol over a serial interface).
Is anyone depending on such use cases?
We have a customer in this situation. Their SoC uses Xmodem as last resort for loading BL2. The serial console is PL011. Upstream driver getc implementation works nicely for this purpose.
If not, then I suggest we consider removing getc() feature altogether. We could always bring it back when there is a real use case for it (it will survive through git history).
At the very least, I would like to disable getc() by default. Enabling it would require setting a build flag.
This is a good compromise, IMHO.
Thanks, baruch