[Skiboot] [PATCH 1/2] vas: Set FIRs according to workbook
Michael Neuling
mikey at neuling.org
Mon Aug 21 17:16:06 AEST 2017
This sets the FIR, FIR mask and FIR action registers according to VAS
workbook v1.20. It also renames them to make it clear what they are.
Without this any VAS error will checkstop the machine, rather than
potentially be recoverable.
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
core/vas.c | 16 +++++-----------
include/vas.h | 10 +++-------
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/core/vas.c b/core/vas.c
index 16b7fea934..0ac20e7c30 100644
--- a/core/vas.c
+++ b/core/vas.c
@@ -117,17 +117,11 @@ static inline int reset_north_ctl(struct proc_chip *chip)
static void reset_fir(struct proc_chip *chip)
{
- uint64_t val;
-
- val = 0x0ULL;
- vas_scom_write(chip, VAS_FIR0, val);
- vas_scom_write(chip, VAS_FIR1, val);
- vas_scom_write(chip, VAS_FIR2, val);
- vas_scom_write(chip, VAS_FIR3, val);
- vas_scom_write(chip, VAS_FIR4, val);
- vas_scom_write(chip, VAS_FIR5, val);
- vas_scom_write(chip, VAS_FIR6, val);
- vas_scom_write(chip, VAS_FIR7, val);
+ vas_scom_write(chip, VAS_FIR0, 0x0000000000000000ULL);
+ /* From VAS workbook */
+ vas_scom_write(chip, VAS_FIR_MASK, 0x000001000001ffffULL);
+ vas_scom_write(chip, VAS_FIR_ACTION0, 0xf800fdfc0001ffffull);
+ vas_scom_write(chip, VAS_FIR_ACTION1, 0xf8fffefffffc8000ull);
}
#define RMA_LSMP_64K_SYS_ID PPC_BITMASK(8, 12)
diff --git a/include/vas.h b/include/vas.h
index bc0aff7e1c..6bc2a1cd98 100644
--- a/include/vas.h
+++ b/include/vas.h
@@ -93,13 +93,9 @@ extern __attrconst uint64_t vas_get_wcbs_bar(int chipid);
#define VAS_P9_SAT(sat, offset) XSCOM_SAT(0x0, sat, offset)
#define VAS_FIR0 VAS_P9_SAT(0x0, 0x0)
-#define VAS_FIR1 VAS_P9_SAT(0x0, 0x1)
-#define VAS_FIR2 VAS_P9_SAT(0x0, 0x2)
-#define VAS_FIR3 VAS_P9_SAT(0x0, 0x3)
-#define VAS_FIR4 VAS_P9_SAT(0x0, 0x4)
-#define VAS_FIR5 VAS_P9_SAT(0x0, 0x5)
-#define VAS_FIR6 VAS_P9_SAT(0x0, 0x6)
-#define VAS_FIR7 VAS_P9_SAT(0x0, 0x7)
+#define VAS_FIR_MASK VAS_P9_SAT(0x0, 0x3)
+#define VAS_FIR_ACTION0 VAS_P9_SAT(0x0, 0x6)
+#define VAS_FIR_ACTION1 VAS_P9_SAT(0x0, 0x7)
#define VAS_WCM_BAR VAS_P9_SAT(0x0, 0xA)
#define VAS_UWCM_BAR VAS_P9_SAT(0x0, 0xB)
--
2.11.0
More information about the Skiboot
mailing list