[Skiboot] [PATCH 25/61] VAS: Do not set foreign address enable for VAS/NX RMA BAR on P10

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Jul 19 23:19:36 AEST 2021


From: Haren Myneni <haren at linux.ibm.com>

>From section 1.3.3.1 in VAS workbook, RA(0:12) = 0's for VAS/NX RMA
BAR. It means foreign address enable bit (RA(11) should be 0 for RMA
VAR. But this bit has to be set for paste base address which is used
for COPY/PASTE.

Signed-off-by: Haren Myneni <haren at linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/vas.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/hw/vas.c b/hw/vas.c
index 6a7bd1c10..0dbe0bcda 100644
--- a/hw/vas.c
+++ b/hw/vas.c
@@ -266,6 +266,9 @@ static void p9_get_rma_bar(int chipid, uint64_t *val)
  *
  *    Thus the paste address for window id 4 is 0x00100000_00040400 and
  *    the _base_ paste address for Node 0 Chip 0 is 0x00100000_00000000.
+ *
+ * Note: Bit 11 (Foreign Address Enable) is set only for paste base address.
+ *	 Not for VAS/NX RMA BAR. RA(0:12) = 0 for VAS/NX RMA BAR.
  */
 
 static void get_rma_bar(struct proc_chip *chip, uint64_t *val)
@@ -273,7 +276,6 @@ static void get_rma_bar(struct proc_chip *chip, uint64_t *val)
 	uint64_t v;
 
 	v = 0ULL;
-	v = SETFIELD(RMA_FOREIGN_ADDR_ENABLE, v, 1);
 	v = SETFIELD(RMA_TOPOLOGY_INDEX, v, chip->primary_topology);
 
 	*val = v;
@@ -361,6 +363,12 @@ static inline void get_paste_bar(int chipid, uint64_t *start, uint64_t *len)
 			return;
 
 		get_rma_bar(chip, &val);
+
+		/*
+		 * RA(11) (Foreign Address Enable) is set only for paste
+		 * base address.
+		 */
+		val = SETFIELD(RMA_FOREIGN_ADDR_ENABLE, val, 1);
 	}
 
 	*start = val;
-- 
2.31.1



More information about the Skiboot mailing list