[edk2-devel] [PATCH 1/5] ArmPkg: Allow platforms to override PCI supported state in SmbiosMiscDxe

Rebecca Cran rebecca at nuviainc.com
Wed Apr 14 01:44:21 UTC 2021


On 4/13/21 10:53 AM, Ard Biesheuvel wrote:
> On Tue, 13 Apr 2021 at 18:51, Leif Lindholm <leif at nuviainc.com> wrote:
>>
>> On Tue, Mar 30, 2021 at 20:16:15 -0600, Rebecca Cran wrote:
>>> Not all platforms support PCI, so introduce a PCD to allow platforms to
>>> specify whether they support it.
>>
>> Are we planning to add one?
>> If not, I'd rather skip this until we do.
>> These days, I would expect any platform providing SMBIOS tables to
>> have PCI.
>>
> 
> Also, does it matter? SMBIOS is mostly informational, and whether a
> platform 'supports' PCI does not imply that it 'implements' it. And
> even if it implements PCI, it may not have any slots.
> 
> IOW, this is PC legacy that we care little about one way or the other, I think..

Yeah, I think there was a comment on the original review that lots of 
platforms get these values wrong, and nothing depends on them.

-- 
Rebecca Cran

> 
> 
>> No further comments on this set.
>>
>> /
>>      Leif
>>
>>> Signed-off-by: Rebecca Cran <rebecca at nuviainc.com>
>>> ---
>>>   ArmPkg/ArmPkg.dec                                                     | 1 +
>>>   ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf               | 1 +
>>>   ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 4 ++++
>>>   3 files changed, 6 insertions(+)
>>>
>>> diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
>>> index a8a22c649ff8..51ac2191c85a 100644
>>> --- a/ArmPkg/ArmPkg.dec
>>> +++ b/ArmPkg/ArmPkg.dec
>>> @@ -125,6 +125,7 @@ [PcdsFixedAtBuild.common]
>>>     #
>>>     # SMBIOS PCDs
>>>     #
>>> +  gArmTokenSpaceGuid.PcdPlatformSupportsPCI|TRUE|BOOLEAN|0x30000052
>>>     gArmTokenSpaceGuid.PcdSystemProductName|L""|VOID*|0x30000053
>>>     gArmTokenSpaceGuid.PcdSystemVersion|L""|VOID*|0x30000054
>>>     gArmTokenSpaceGuid.PcdBaseBoardManufacturer|L""|VOID*|0x30000055
>>> diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
>>> index 60d8fe31c219..ebc4c99ac436 100644
>>> --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
>>> +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
>>> @@ -71,6 +71,7 @@ [Pcd]
>>>     gArmTokenSpaceGuid.PcdFdSize
>>>     gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor
>>>     gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
>>> +  gArmTokenSpaceGuid.PcdPlatformSupportsPCI
>>>     gArmTokenSpaceGuid.PcdSystemBiosRelease
>>>     gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease
>>>     gArmTokenSpaceGuid.PcdSystemProductName
>>> diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
>>> index 5aea32521bd3..a06f814aeb7c 100644
>>> --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
>>> +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
>>> @@ -13,6 +13,7 @@
>>>   #include <Library/DebugLib.h>
>>>   #include <Library/HiiLib.h>
>>>   #include <Library/MemoryAllocationLib.h>
>>> +#include <Library/PcdLib.h>
>>>   #include <Library/PrintLib.h>
>>>   #include <Library/UefiBootServicesTableLib.h>
>>>
>>> @@ -264,6 +265,9 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
>>>     UnicodeStrToAsciiStrS (Version, StrStart, VerStrLen + 1);
>>>     StrStart += VerStrLen + 1;
>>>     UnicodeStrToAsciiStrS (ReleaseDate, StrStart, DateStrLen + 1);
>>> +
>>> +  SmbiosRecord->BiosCharacteristics.PciIsSupported = FixedPcdGetBool (PcdPlatformSupportsPCI);
>>> +
>>>     //
>>>     // Now we have got the full smbios record, call smbios protocol to add this record.
>>>     //
>>> --
>>> 2.26.2
>>>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74072): https://edk2.groups.io/g/devel/message/74072
Mute This Topic: https://groups.io/mt/81741553/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list