On 05/13/16 01:49, Jordan Justen wrote:
> Is there much point to the PCDs after this?
> 
> Even before, the benefit was minimal. I think there was the idea that
> they could allow you to get the base address without having to include
> the platform specific include files. (OvmfPlatforms.h)
> 
> Another idea could be to go ahead and convert it to a dynamic PCD, and
> use it wherever possible. But, it doesn't seem all that important
> either way.
> 
> I'd prefer to either drop the PCDs, or make 1 dynamic PCD. What do you
> think?

I can replace both PCDs, with macros in "OvmfPlatforms.h":

#define PIIX4_PMBA_VALUE  0xB000
#define ICH9_PMBASE_VALUE 0x0600

These macro names would be built by taking the register names from the
IndustryStandard include files, and appending _VALUE:

- I440FxPiix4.h: PIIX4_PMBA + _VALUE
- Q35MchIch9.h: ICH9_PMBASE + _VALUE

Is that okay for version 2?

Thanks
Laszlo

> -Jordan
> 
> On 2016-05-09 17:37:29, Laszlo Ersek wrote:
>> Short version:
>> - Each PCIe downstream port can host only one device.
>> - Each PCIe downstream port is represented as a PCI bridge.
>> - If a PCI device needs an IO BAR, then the non-root bridge it is on
>>   will at least need 0x1000 IO ports (required by the PCI spec), for
>>   accommodating the IO BARs of all of the devices on it.
>> - Consequently, each IO BAR requiring device in a PCIe downstream port
>>   eats up 0x1000 from the limited PCI IO Port aperture (current size:
>>   0x4000).
>> - The long term solution is to move away from IO BARs (for example,
>>   legacy-free virtio-1.0 devices use MMIO BARs only).
>> - Until then, we can push down PMBASE from 0xB000 to 0x0600 on Q35 (same
>>   as SeaBIOS does), and then push down the base of the PCI IO Port
>>   aperture from 0xC000 to 0x6000, increasing its size from 0x4000 to
>>   0xA000.
>>
>> Long version:
>> - https://bugzilla.redhat.com/show_bug.cgi?id=1333238
>>
>> Public branch:
>> - https://github.com/lersek/edk2/commits/grow_portspace_bz1333238
>>
>> Cc: Jordan Justen <[email protected]>
>>
>> Thanks
>> Laszlo
>>
>> Laszlo Ersek (6):
>>   OvmfPkg: rename PcdAcpiPmBaseAddress to PcdPiix4AcpiPmBaseAddress
>>   OvmfPkg: add and use industry standard macro PIIX4_PMBA_MASK
>>   OvmfPkg: introduce PcdIch9AcpiPmBaseAddress
>>   OvmfPkg: determine PMBA value dependent on host bridge device ID
>>   OvmfPkg/PlatformPei: set PCI IO port aperture dynamically
>>   OvmfPkg/PlatformPei: provide 10 * 4KB of PCI IO Port space on Q35
>>
>>  OvmfPkg/OvmfPkg.dec                                  | 16 ++++---
>>  OvmfPkg/OvmfPkgIa32.dsc                              |  2 +
>>  OvmfPkg/OvmfPkgIa32X64.dsc                           |  2 +
>>  OvmfPkg/OvmfPkgX64.dsc                               |  2 +
>>  OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf    |  5 +-
>>  OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf |  5 +-
>>  OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf    |  5 +-
>>  OvmfPkg/PlatformPei/PlatformPei.inf                  |  3 +-
>>  OvmfPkg/Include/IndustryStandard/I440FxPiix4.h       |  2 +
>>  OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c      | 10 +++-
>>  OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c   | 10 +++-
>>  OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c      | 22 ++++++++-
>>  OvmfPkg/PlatformPei/Platform.c                       | 48 
>> +++++++++++++++-----
>>  13 files changed, 101 insertions(+), 31 deletions(-)
>>
>> -- 
>> 1.8.3.1
>>

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to