diff options
-rw-r--r-- | core/vas.c | 13 | ||||
-rw-r--r-- | include/vas.h | 1 |
2 files changed, 14 insertions, 0 deletions
@@ -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. |