On 27/10/14 01:56, Tian, Feng wrote:
> I think you have found this and are proposing this patch to make the 
> SataController driver more generic.
> 
> But your proposed patch makes an incorrect assumption, that is the upper 
> caller must invoke IdeInit.GetChannelInfo(). So I think this patch is not 
> correct.
Indeed that was the reason.

> One way to solve this is to define a max port number for specific platform or 
> enable BME/MSE/AE bit at SataControllerStart() and read CAP register to fill 
> ChannelCount variable.
For some reason this does not work, it caused ovmf to lock up. I have to retry
to remember where, but I remember doing this caused other issues for me.


> PS: the sata controller driver has another bug, it uses Channel * Device 
> rather than [Channel][Device] to traverse an array. It may cause issue, for 
> example, Channel is 1 and Device is 0.
I'll address this in the next series,

Thank you,
Reza

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to