<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/OvmfPkg/Library/BasePciCapLib, branch dependabot/github_actions/actions/github-script-8</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-8</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-8'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2023-04-10T14:19:57+00:00</updated>
<entry>
<title>OvmfPkg: Update code to be more C11 compliant by using __func__</title>
<updated>2023-04-10T14:19:57+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2023-04-06T19:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8ba392687b6f7fcb6e333756edd090003c57402e'/>
<id>urn:sha1:8ba392687b6f7fcb6e333756edd090003c57402e</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
OvmfPkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Sunil V L &lt;sunilvl@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ac0a286f4d747a4c6c603a7b225917293cbe1e9f'/>
<id>urn:sha1:ac0a286f4d747a4c6c603a7b225917293cbe1e9f</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the OvmfPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Andrew Fish &lt;afish@apple.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg/BasePciCapLib: suppress invalid "nullptr deref" warning</title>
<updated>2019-04-18T14:06:04+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2019-04-12T17:00:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c2f643479eb3f00d930c461cdec3ba420a36072c'/>
<id>urn:sha1:c2f643479eb3f00d930c461cdec3ba420a36072c</id>
<content type='text'>
RH covscan reports the following "nullptr deref" warning:

&gt; Error: CLANG_WARNING:
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:312:5:
&gt; warning: Dereference of null pointer
&gt; #    InstanceZero-&gt;NumInstancesUnion.NumInstances++;
&gt; #    ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:509:7:
&gt; note: Assuming 'OutCapList' is not equal to NULL
&gt; #  if (OutCapList == NULL) {
&gt; #      ^~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:509:3:
&gt; note: Taking false branch
&gt; #  if (OutCapList == NULL) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:518:7:
&gt; note: Assuming the condition is false
&gt; #  if (OutCapList-&gt;Capabilities == NULL) {
&gt; #      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:518:3:
&gt; note: Taking false branch
&gt; #  if (OutCapList-&gt;Capabilities == NULL) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:529:7:
&gt; note: Assuming 'CapHdrOffsets' is not equal to NULL
&gt; #  if (CapHdrOffsets == NULL) {
&gt; #      ^~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:529:3:
&gt; note: Taking false branch
&gt; #  if (CapHdrOffsets == NULL) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:546:3:
&gt; note: Taking false branch
&gt; #  if (RETURN_ERROR (Status)) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:549:7:
&gt; note: Assuming the condition is true
&gt; #  if ((PciStatusReg &amp; EFI_PCI_STATUS_CAPABILITY) != 0) {
&gt; #      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:549:3:
&gt; note: Taking true branch
&gt; #  if ((PciStatusReg &amp; EFI_PCI_STATUS_CAPABILITY) != 0) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:557:5:
&gt; note: Taking false branch
&gt; #    if (RETURN_ERROR (Status)) {
&gt; #    ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:565:12:
&gt; note: Assuming 'NormalCapHdrOffset' is &gt; 0
&gt; #    while (NormalCapHdrOffset &gt; 0) {
&gt; #           ^~~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:565:5:
&gt; note: Loop condition is true.  Entering loop body
&gt; #    while (NormalCapHdrOffset &gt; 0) {
&gt; #    ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:570:7:
&gt; note: Taking false branch
&gt; #      if (RETURN_ERROR (Status)) {
&gt; #      ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:574:16:
&gt; note: Calling 'InsertPciCap'
&gt; #      Status = InsertPciCap (OutCapList, CapHdrOffsets, PciCapNormal,
&gt; #               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:235:3:
&gt; note: Null pointer value stored to 'InstanceZero'
&gt; #  InstanceZero = NULL;
&gt; #  ^~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:243:7:
&gt; note: Assuming 'PciCap' is not equal to NULL
&gt; #  if (PciCap == NULL) {
&gt; #      ^~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:243:3:
&gt; note: Taking false branch
&gt; #  if (PciCap == NULL) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:259:3:
&gt; note: Taking false branch
&gt; #  if (RETURN_ERROR (Status)) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:297:3:
&gt; note: Taking false branch
&gt; #  if (RETURN_ERROR (Status)) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:311:7:
&gt; note: Assuming the condition is true
&gt; #  if (PciCap-&gt;Key.Instance &gt; 0) {
&gt; #      ^~~~~~~~~~~~~~~~~~~~~~~~
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:311:3:
&gt; note: Taking true branch
&gt; #  if (PciCap-&gt;Key.Instance &gt; 0) {
&gt; #  ^
&gt; edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:312:5:
&gt; note: Dereference of null pointer
&gt; #    InstanceZero-&gt;NumInstancesUnion.NumInstances++;
&gt; #    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt; #  310|     //
&gt; #  311|     if (PciCap-&gt;Key.Instance &gt; 0) {
&gt; #  312|-&gt;     InstanceZero-&gt;NumInstancesUnion.NumInstances++;
&gt; #  313|     }
&gt; #  314|     return RETURN_SUCCESS;

The warning is invalid: the flagged dereferencing of "InstanceZero" is
gated by a condition that is only satisfied if we dereference
"InstanceZero" *first*.

(Perhaps the analyzer assumes that the OrderedCollectionInsert() call,
just before line 259, can change the value of "PciCap-&gt;Key.Instance" via
the last argument:

   254    //
   255    // Add PciCap to CapList.
   256    //
   257    Status = OrderedCollectionInsert (CapList-&gt;Capabilities, &amp;PciCapEntry,
   258               PciCap);
   259    if (RETURN_ERROR (Status)) {

That assumption is incorrect.)

Add a comment and an ASSERT().

Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Issue: scan-0994.txt
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:19+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:06:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b26f0cf9ee09a180c91a4beeeb1b149e7f92afed'/>
<id>urn:sha1:b26f0cf9ee09a180c91a4beeeb1b149e7f92afed</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg BasePciCapLib: Fix VS build failure</title>
<updated>2018-05-29T08:21:40+00:00</updated>
<author>
<name>Liming Gao</name>
<email>liming.gao@intel.com</email>
</author>
<published>2018-05-29T05:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2d0c6692eee4b1e54714942098776eedfbcf38fa'/>
<id>urn:sha1:2d0c6692eee4b1e54714942098776eedfbcf38fa</id>
<content type='text'>
Fix VS warning C4244: 'function': conversion from 'UINT32' to 'UINT16',
possible loss of data.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
[lersek@redhat.com: remove whitespace after casts]
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: introduce PciCapLib</title>
<updated>2018-05-24T19:12:06+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2018-04-28T21:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=392a31467f4164423ae459bf28b39f282bb48e98'/>
<id>urn:sha1:392a31467f4164423ae459bf28b39f282bb48e98</id>
<content type='text'>
Add a library class, and a BASE lib instance, to work more easily with PCI
capabilities in PCI config space. Functions are provided to parse
capabilities lists, and to locate, describe, read and write capabilities.
PCI config space access is abstracted away.

Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Suggested-by: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
</feed>
