aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/vas.c13
-rw-r--r--include/vas.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/core/vas.c b/core/vas.c
index 9fd7521..988662c 100644
--- a/core/vas.c
+++ b/core/vas.c
@@ -69,6 +69,19 @@ static int vas_scom_write(struct proc_chip *chip, uint64_t reg, uint64_t val)
return rc;
}
+/* Interface for NX - make sure VAS is fully initialized first */
+__attrconst inline uint64_t vas_get_hvwc_mmio_bar(const int chipid)
+{
+ uint64_t addr;
+
+ if (!vas_initialized)
+ return 0ULL;
+
+ get_hvwc_mmio_bar(chipid, &addr, NULL);
+
+ return addr;
+}
+
static int init_north_ctl(struct proc_chip *chip)
{
uint64_t val = 0ULL;
diff --git a/include/vas.h b/include/vas.h
index 2590d9e..c382585 100644
--- a/include/vas.h
+++ b/include/vas.h
@@ -37,6 +37,7 @@
*/
extern void vas_init(void);
+extern __attrconst uint64_t vas_get_hvwc_mmio_bar(const int chipid);
/*
* HVWC and UWC BAR.