* PciLib/PciExpressLib: 64-bit r/w functions
@ 2017-08-05 21:38 Marvin H?user
2017-08-06 11:34 ` Laszlo Ersek
0 siblings, 1 reply; 3+ messages in thread
From: Marvin H?user @ 2017-08-05 21:38 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Dear developers,
While browsing the KabylakeSiPkg code, I noticed that 64-bit registers are read directly via MmioRead64() as there is no PciRead64() function.
Is there a specific reason there are no PciRead64() and PciExpressRead64() functions or were they simply not needed previously?
Thanks and regards,
Marvin.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PciLib/PciExpressLib: 64-bit r/w functions
2017-08-05 21:38 PciLib/PciExpressLib: 64-bit r/w functions Marvin H?user
@ 2017-08-06 11:34 ` Laszlo Ersek
2017-08-06 12:46 ` Marvin Häuser
0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2017-08-06 11:34 UTC (permalink / raw)
To: Marvin Häuser; +Cc: edk2-devel@lists.01.org
On 08/05/17 23:38, Marvin H?user wrote:
> Dear developers,
>
> While browsing the KabylakeSiPkg code, I noticed that 64-bit registers are read directly via MmioRead64() as there is no PciRead64() function.
> Is there a specific reason there are no PciRead64() and PciExpressRead64() functions or were they simply not needed previously?
Validity of 64-bit accesses to PCI config space is platform dependent
[*] and I guess the PciLib designers didn't want to deviate from the
common interface pattern that PciReadXX() always succeeds (as long as
the input parameter is valid), regardless of XX.
[*] The UEFI spec repeats the following paragraph in several places:
The I/O operations are carried out exactly as requested. The caller
is responsible satisfying any alignment and I/O width restrictions
that the PCI controller on a platform might require. For example on
some platforms, width requests of EfiPciIoWidthUint64 do not work.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PciLib/PciExpressLib: 64-bit r/w functions
2017-08-06 11:34 ` Laszlo Ersek
@ 2017-08-06 12:46 ` Marvin Häuser
0 siblings, 0 replies; 3+ messages in thread
From: Marvin Häuser @ 2017-08-06 12:46 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Laszlo Ersek
Thank you for your reply!
Sorry, I was only thinking of MMIO access when I wrote the mail, should have limited it to PciExpressLib.
I did not hear of any platform supporting MMIO but not 64-bit register r/w, will research that.
Regards,
Marvin.
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Sunday, August 6, 2017 1:35 PM
> To: Marvin Häuser <Marvin.Haeuser@outlook.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] PciLib/PciExpressLib: 64-bit r/w functions
>
> On 08/05/17 23:38, Marvin H?user wrote:
> > Dear developers,
> >
> > While browsing the KabylakeSiPkg code, I noticed that 64-bit registers are
> read directly via MmioRead64() as there is no PciRead64() function.
> > Is there a specific reason there are no PciRead64() and PciExpressRead64()
> functions or were they simply not needed previously?
>
> Validity of 64-bit accesses to PCI config space is platform dependent [*] and I
> guess the PciLib designers didn't want to deviate from the common interface
> pattern that PciReadXX() always succeeds (as long as the input parameter is
> valid), regardless of XX.
>
> [*] The UEFI spec repeats the following paragraph in several places:
>
> The I/O operations are carried out exactly as requested. The caller
> is responsible satisfying any alignment and I/O width restrictions
> that the PCI controller on a platform might require. For example on
> some platforms, width requests of EfiPciIoWidthUint64 do not work.
>
> Thanks
> Laszlo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-06 12:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-05 21:38 PciLib/PciExpressLib: 64-bit r/w functions Marvin H?user
2017-08-06 11:34 ` Laszlo Ersek
2017-08-06 12:46 ` Marvin Häuser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox