On 18/08/14 00:25, Tian, Feng wrote: > Hi, Reza > > I don't get your meaning about " the ChannelCount is initialized too early ". > These drivers are UEFI driver binding drivers, which means they get > initialized by pre-assigned order. I fixed the IDE issue. ChannelCount too early means the following(unless I misunderstanding something):
The controller Start is called after AtaAtapiPassThruSupported opens the ideinit protocol. SataController is an extremely misleading name. SataController and IdeController are just implementing the init protocol. For ide the channel count is not detected, but defined inside of idecontroller or satacontroller. Currently to IdeMax which is 2. The channelcount for ahci however is loaded from the cap register. The cap register needs ahci to be initialized. If AhciMode is not initialized the cap register read in SataController->Start returns 0. If you initialize AhciMode in the start of SataController ahcimode initialization will subsequently fail. I have addressed the issue you had with removing the IdeInit.ChannelCount and will post a new patch, but I can frankly not imagine a single instance where the ide controller would actually define that to be 1. When I say loaded too early I'm saying that, because SataControllerStart does memory allocations which are later used as an optimization to reduce hardware ops. But those memory allocations are based on ChannelCount which is only known after ahcimode is initialized. > > Why we did put SataController Driver at DuetPkg before rather than at > PcAtChipsetPkg is because it's a platform driver and may vary at different > platforms with different configurations. > > So I don't think moving SataController driver from Duet to PcAtChipsetPkg is > a good idea. If you want to enable Ovmf, I would like to suggest you > implement a similar on in Ovmf platform package. I completely disagree. SataController implements so basic a functionality that I don't see why it was duetpkg only to begin with. I see different projects using SataController for different hardware. Why would we copy the exact same over to Ovmf? ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
