Hi, Reza

Sorry, forget one thing about why we don't suggest directly putting the 
DuetPkg/SataController driver to PcAtChipsetPkg.

DuetPkg is running after legacy bios, which means SATA controller has been 
initialized by legacy bios. So DuetPkg/SataController could directly read AHCI 
CAP register and don’t care if AE bit of AHCI AHC register is set. This 
behavior is correct for Duet, but not for other platforms, such as Ovmf and so 
on.

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.

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.

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.

Thanks
Feng

-----Original Message-----
From: Jordan Justen [mailto:jljus...@gmail.com] 
Sent: Saturday, October 25, 2014 07:40
To: Reza Jelveh; Tian, Feng
Cc: Laszlo Ersek; edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [PATCH v3 4/5] MdeModulePkg: AhciMode calls GetChannelInfo 
when enumerating

On Thu, Oct 23, 2014 at 1:32 PM, Reza Jelveh <reza.jel...@tuhh.de> wrote:
> On 23/10/14 22:20, Laszlo Ersek wrote:
>> Okay -- I wasn't aware that the explanation requested by Feng had 
>> already been provided.
> It didn't. I thought the new patch explains it, but I guess not...

Maybe we can wait on Feng's feedback to see where it stands. :)

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

Reply via email to