Hi Feng, Now I understand the concept. I was expecting that PEIM would already be available for the Minnowboard Max. Is Usb in the PEI phase not supported in Minnowboard?
>From my digging in the code today, it seems to enable the xhci controller, it's PCI BAR needs to be set and enabled for memory access. I found memory base addresses for some devices in Vlv2DeviceRefCodePkg\ValleyView2Soc\NorthCluster\Include\PlatformBaseAddress es.h but not for XHCI. From looking at the Atom E3800 datasheet, the xhci memory base doesn't have a fixed location so I believe I need to pick an unused range in the Low MMIO space to set as the xhci BAR. If you or someone else on the list can recommend a different platform that already supports xhci in the PEI phase to use as a development platform that might be a better option for me. Thank you again for your patience and prompt responses. Eric > -----Original Message----- > From: Tian, Feng [mailto:[email protected]] > Sent: Sunday, August 16, 2015 10:20 PM > To: Eric Wittmayer; [email protected] > Cc: Tian, Feng > Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max > > Do you look into the UsbController.h in MdeModulePkg/Include/Ppi > directory? > > typedef > EFI_STATUS > (EFIAPI *PEI_GET_USB_CONTROLLER)( > IN EFI_PEI_SERVICES **PeiServices, > IN PEI_USB_CONTROLLER_PPI *This, > IN UINT8 UsbControllerId, > OUT UINTN *ControllerType, > OUT UINTN *BaseAddress > ); > > You need write a PEIM to produce this PPI and implement the above > interface according to your platform setting. > > For how to write a PEIM module, you can refer to EDKII Module Writer's > Guide in edk2.sourceforge.net > > Thanks > Feng > > -----Original Message----- > From: Eric Wittmayer [mailto:[email protected]] > Sent: Monday, August 17, 2015 11:50 > To: Tian, Feng; [email protected] > Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max > > Hi Feng, > I see now that XhciPei needs gPeiUsbControllerPpiGuid and creates > gPeiUsbHostControllerPpiGuid which UsbBusPei needs. > > I can't seem to figure out what creates gPeiUsbControllerPpiGuid? I see it > listed in the .dec file I'm using but that apparently isn't enough to > install the Ppi. What should be installing the gPeiUsbControllerPpiGuid? > > Thanks, > Eric > > > -----Original Message----- > > From: Tian, Feng [mailto:[email protected]] > > Sent: Sunday, August 16, 2015 6:09 PM > > To: Eric Wittmayer; [email protected] > > Cc: Tian, Feng > > Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max > > > > Eric, > > > > I must agree the naming of these usb pei related ppi guids are not > > good, which misleads you. > > > > There is no the chicken and egg problem. gPeiUsbHostControllerPpiGuid > > and gPeiUsbControllerPpiGuid are two different ppis. The former is > > consumed by UsbPei and the latter is consumed by XhciPei. You need > > write a pei module to produce PeiUsbControllerPpi (see > > MdeModulePkg/Include/Ppi for > > definitions) at first. > > > > Thanks > > Feng > > > > -----Original Message----- > > From: edk2-devel [mailto:[email protected]] On Behalf Of > > Eric Wittmayer > > Sent: Saturday, August 15, 2015 08:12 > > To: [email protected] > > Subject: [edk2] Help debugging PEIM on Minnowboard Max > > > > I'm writing a PEIM for a USB3 device but having trouble even getting > > the UsbBusPie and XhciPei modules to load during boot. > > > > I thought getting the existing Usb Peims to load would be a good first > step. > > I looked at the DEPEX for both of the above modules and tried removing > > "gEfiPeiBootInRecoveryModePpiGuid" but I didn't see them load. If I > > set both of their DEPEX == TRUE then I see some print statements that > > show they are at least trying to load but then I have a chicken and > > egg problem > in > > that UsbBusPie needs either gPeiUsbHostControllerPpiGuid or > > gPeiUsb2HostControllerPpiGuid which come from XhciPei. However, > > XhciPei needs gPeiUsbControllerPpiGuid which comes from UsbBusPei > > before it will install the gPeiUsb2HostControllerPpiGuid. The same > > cross dependency is shown in the DEPEX for these two modules. > > > > I feel like I'm missing something simple and fundamental and I'm > > hoping someone will point me in the right direction. > > > > Thanks, > > Eric W > > > > _______________________________________________ > > edk2-devel mailing list > > [email protected] > > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

