From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4BFD0AC003E for ; Fri, 3 Nov 2023 00:03:58 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IvRCk7C9I6c7wIF3j9OvXc6A9IS4QO1oeJd6PVISi9c=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1698969836; v=1; b=JkdHpkl+YCfCUdYlK/xqBrg+QPNrQPlhh/3lEhVwCT+1tAMu/WdkNAuaxU8SFlmslcTtoRMi JrnhrGSGVyW4K3suVFUc+gcL4qRzDUr+YlbLLvLRqaUaNOvAJEqECF0aEv8l+axfYdGTzehH/IT RP8eAySOWY78Agf3rHooCOEQ= X-Received: by 127.0.0.2 with SMTP id rAYtYY7687511xggPhwrn3jj; Thu, 02 Nov 2023 17:03:56 -0700 X-Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mx.groups.io with SMTP id smtpd.web11.6528.1698969836350107893 for ; Thu, 02 Nov 2023 17:03:56 -0700 X-Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-3595eb920e9so2148355ab.0 for ; Thu, 02 Nov 2023 17:03:56 -0700 (PDT) X-Gm-Message-State: lfGJJrkrs1vseej0x6I8CNBtx7686176AA= X-Google-Smtp-Source: AGHT+IFdkF7kGl4zkHH/x9BI0DGyw2NokiwFeu66lb4ciXaP8+5s8Bae+QCQo8a6DyzPHrAVKgl/Jg== X-Received: by 2002:a05:6602:2c82:b0:7aa:125a:b0c4 with SMTP id i2-20020a0566022c8200b007aa125ab0c4mr27919816iow.5.1698969835243; Thu, 02 Nov 2023 17:03:55 -0700 (PDT) X-Received: from JOE-LENO.redmond.corp.microsoft.com ([131.107.159.17]) by smtp.gmail.com with ESMTPSA id fd15-20020a056a002e8f00b006b5922221f4sm275600pfb.8.2023.11.02.17.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 17:03:54 -0700 (PDT) From: "Joe L" To: devel@edk2.groups.io Cc: joelopez333 , Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Jian J Wang , Liming Gao , Hao A Wu , Ray Ni , Pedro Falcato , Michael Brown Subject: [edk2-devel] [PATCH] MdeModulePkg/PciHostBridgeDxe: Add readback after final Cfg-Write Date: Thu, 2 Nov 2023 17:03:35 -0700 Message-Id: <742009f523e8645102f784a3c0df6af870c68804.1698966883.git.jlotwo@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jlotwo@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=JkdHpkl+; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: joelopez333 REF:https://edk2.groups.io/g/devel/topic/102310377#110456 - Add a read after the final PCI Configuration space write in RootBridgeIoPciAccess. - When configuration space is strongly ordered, this ensures that program execution cannot continue until the completion is received for the previous Cfg-Write, which may have side-effects. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Jian J Wang Cc: Liming Gao Cc: Hao A Wu Cc: Ray Ni Cc: Pedro Falcato Cc: Michael Brown Signed-off-by: Joe Lopez --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c index 157a0ada80..4bc774b574 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c @@ -1238,6 +1238,13 @@ RootBridgeIoPciAccess ( } } + // + // Perform readback after write to confirm completion was received for the last write + // + if (!Read) { + PciSegmentRead8 (Address - InStride); + } + return EFI_SUCCESS; } -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110576): https://edk2.groups.io/g/devel/message/110576 Mute This Topic: https://groups.io/mt/102354842/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-