On 02/26/13 06:22, satish kondapalli wrote:
> Hi,
> 
> I developed option ROM Driver for my PCIe device. Driver is working fine
> on Intel servers.  But on Dell R720 server, I am not able to access my
> BAR registers but i am able to access device config space.
> 
> In Driver supported function, verified the Device ID,Vendor ID and
> returned EFI_SUCCESS. In my start function I enabled my pcie device with
> following API.
> 
> Status = PciIo->Attributes(
>                         PciIo,
>                         EfiPciIoAttributeOperationEnable,
>                         EFI_PCI_DEVICE_ENABLE,
>                         NULL
>                         );
> After enabling my device, i accessed one register(at x offset) in my bar
> space with following API.
> 
> Status = PciIo->Mem.Read(
>                                 PciIo,
>                                 EfiPciIoWidthUint64,
>                                 0,
>                                 x,
>                                 1,
>                                 &TmpAddr);
>                 if(EFI_ERROR(Status)) {
>                          Print(L"BAR READ Failed: status:%d\n",Status);
>              }
> 
> Above API giving error with status value as 2. But same code is working
> fine in Intel servers.

Try two 32-bit reads instead.

    13.4 EFI PCI I/O Protocol
    EFI_PCI_IO_PROTOCOL.Mem.Read()

    [...] The caller is responsible for any alignment and I/O width
    issues which the bus, device, platform, or type of I/O might
    require. For example on some platforms, width requests of
    EfiPciIoWidthUint64 do not work.

Laszlo


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to