On 12/08/14 23:16, A. Sava wrote:
> Hi Reza,
> 
> Take note that regarding SataControllerDxe, there still remains a problem
> that effects Qemu functionality.
> 
> On this query:
> 
> Data32 = AhciReadReg (PciIo, R_AHCI_CAP);
> 
> SataPrivateData->IdeInit.ChannelCount = (UINT8) ((Data32 & B_AHCI_CAP_NPS)
> + 1);
> 
> qemu seems to always report 1 channel. This will end in only the first AHCI
> device being detected.
> 
> As a temporal workaround, to allow all AHCI channels detected, you
> could change the second line to:
> 
> SataPrivateData->IdeInit.ChannelCount = 6;
> 
> but if you can, you should probably promote a fix at qemu's side for this.

I've been debugging this last night. Are you sure that this is a Qemu bug? It
looks to me like it's an error in SataController.

SataController should not read CAP register in its start method. That's where
it installs the protocol for AtaAtapiPassthru to use. Rather it should be set
later by the init function.

The CAP register is read fine after AhciMode initialization, but
SataController reads its before attaching to the bus or something like that, I
think.


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to