<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21206">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">linux pci: Add dummy PCI access for shared contracts<br><br>Other implementations may update the PCI_State in Resource_Size() and<br>Map(). To share the contract with those implementations, we have to<br>simulate such accesses.<br><br>Change-Id: If994db22d91eb3707e555871d854c3a25a13678b<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M common/linux/hw-pci-dev.adb<br>1 file changed, 17 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/libhwbase refs/changes/06/21206/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/common/linux/hw-pci-dev.adb b/common/linux/hw-pci-dev.adb<br>index a768002..294d976 100644<br>--- a/common/linux/hw-pci-dev.adb<br>+++ b/common/linux/hw-pci-dev.adb<br>@@ -41,6 +41,19 @@<br>    procedure Write16 (Offset : Index; Value : Word16) renames MM.Write16;<br>    procedure Write32 (Offset : Index; Value : Word32) renames MM.Write32;<br> <br>+   package Dummy is<br>+      -- No-op PCI config update to share contracts<br>+      -- with implementations that do actual updates.<br>+      procedure PCI_Update<br>+      with<br>+         Global => (In_Out => MM.PCI_State);<br>+   end Dummy;<br>+   package body Dummy is<br>+      procedure PCI_Update is null<br>+      with<br>+         SPARK_Mode => Off;<br>+   end Dummy;<br>+<br>    function Hex (Val : Natural) return Character<br>    with<br>       Pre => Val < 16<br>@@ -85,6 +98,8 @@<br>       Path     : String (1 .. 49) :=<br>          "/sys/devices/pci0000:xx/0000:xx:xx.x/resourcex_wc";<br>    begin<br>+      Dummy.PCI_Update;<br>+<br>       Patch_Sysfs_Path (Path);<br>       Path (46) := Character'Val (Character'Pos ('0') + Resource'Pos (Res));<br>       if not WC then<br>@@ -123,6 +138,8 @@<br>       Path : String (1 .. 46) :=<br>          "/sys/devices/pci0000:xx/0000:xx:xx.x/resourcex";<br>    begin<br>+      Dummy.PCI_Update;<br>+<br>       Patch_Sysfs_Path (Path);<br>       Path (46) := Character'Val (Character'Pos ('0') + Resource'Pos (Res));<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/21206">change 21206</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21206"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libhwbase </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If994db22d91eb3707e555871d854c3a25a13678b </div>
<div style="display:none"> Gerrit-Change-Number: 21206 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>