Hello SeaBIOS community,
Please look at the patch I've attached to this email. It fixes a regression recently introduced in SeaBIOS, introduced by SeaBIOS git commit ID 8863cbbd. I request that this patch by merged, and I will now explain why.
A recent SeaBIOS patch (commit 8863cbbd) adds AHCI controller reset prior to enablement, as a way to make SeaBIOS's AHCI driver work correctly on CSM-based setups.
However, that commit (commit 8863cbbd) broke AHCI initialisation on the Lenovo ThinkPad T420 when testing SeaBIOS as a coreboot payload. It caused an AHCI timeout. I tried to include these logs on the mailing list but it came back telling me my message was too big.
Anyways
To mitigate this, I have provided for SeaBIOS a patch to this email (0004-ahci-Only-reset-controller-on-CSM.patch). My patch retains the new behaviour, resetting the AHCI controller prior to enablement, so that it will continue to function correctly on CSM, but it *only* applies that new behaviour on CSM setups.
With my patch, the *old* behaviour is used (enable the controller from its current state), if a CSM is not in use. This was confirmed to work correctly, fixing the issue when re-tested on the same ThinkPad T420.
I am also using this fix in Libreboot, see:
https://browse.libreboot.org/lbmk.git/commit/?id=c073ee9d4fc4a631c16ff681bb6...
That's where the patch is from. I put it there first. SeaBIOS devs are welcome to merge this if they wish.