[Skiboot] [PATCH 06/14] phb4: Disable device config space access when fenced

Michael Neuling mikey at neuling.org
Wed Jul 26 20:50:05 AEST 2017


On DD2 you can't access device config space when fenced, so just
disable access whenever we are fenced.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 hw/phb4.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/phb4.c b/hw/phb4.c
index 250e1e80ee..12a05f44c3 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -430,6 +430,8 @@ static int64_t phb4_pcicfg_read(struct phb4 *p, uint32_t bdfn,
 	if (p->flags & PHB4_AIB_FENCED) {
 		if (!(p->flags & PHB4_CFG_USE_ASB))
 			return OPAL_HARDWARE;
+		if (bdfn != 0)
+			return OPAL_HARDWARE;
 		use_asb = true;
 	} else if ((p->flags & PHB4_CFG_BLOCKED) && bdfn != 0) {
 		return OPAL_HARDWARE;
@@ -521,6 +523,8 @@ static int64_t phb4_pcicfg_write(struct phb4 *p, uint32_t bdfn,
 	if (p->flags & PHB4_AIB_FENCED) {
 		if (!(p->flags & PHB4_CFG_USE_ASB))
 			return OPAL_HARDWARE;
+		if (bdfn != 0)
+			return OPAL_HARDWARE;
 		use_asb = true;
 	} else if ((p->flags & PHB4_CFG_BLOCKED) && bdfn != 0) {
 		return OPAL_HARDWARE;
-- 
2.11.0



More information about the Skiboot mailing list