@@ -217,7 +217,8 @@
#define OPAL_ADDR_TO_SYM 181
#define OPAL_SYM_TO_ADDR 182
#define OPAL_REPORT_TRAP 183
-#define OPAL_LAST 183
+#define OPAL_FIND_VM_AREA 184
+#define OPAL_LAST 184
#define QUIESCE_HOLD 1 /* Spin all calls at entry */
#define QUIESCE_REJECT 2 /* Fail all calls with OPAL_BUSY */
@@ -1189,6 +1190,18 @@ struct opal_mpipl_fadump {
#define OPAL_TRAP_WARN 2
#define OPAL_TRAP_PANIC 3
+#define OS_VM_FLAG_READ 0x1
+#define OS_VM_FLAG_WRITE 0x2
+#define OS_VM_FLAG_EXECUTE 0x4
+#define OS_VM_FLAG_CI 0x8
+
+struct opal_vm_area {
+ __be64 address;
+ __be64 length;
+ __be64 pa;
+ __be64 vm_flags;
+};
+
#endif /* __ASSEMBLY__ */
#endif /* __OPAL_API_H */
@@ -405,6 +405,8 @@ void opal_powercap_init(void);
void opal_psr_init(void);
void opal_sensor_groups_init(void);
+int64_t opal_find_vm_area(uint64_t addr, struct opal_vm_area *opal_vm_area);
+
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_OPAL_H */
@@ -332,3 +332,4 @@ OPAL_CALL(opal_secvar_enqueue_update, OPAL_SECVAR_ENQUEUE_UPDATE);
OPAL_CALL(opal_addr_to_sym, OPAL_ADDR_TO_SYM);
OPAL_CALL(opal_sym_to_addr, OPAL_SYM_TO_ADDR);
OPAL_CALL(opal_report_trap, OPAL_REPORT_TRAP);
+OPAL_CALL(opal_find_vm_area, OPAL_FIND_VM_AREA);
This will be used in the next patch. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/include/asm/opal-api.h | 15 ++++++++++++++- arch/powerpc/include/asm/opal.h | 2 ++ arch/powerpc/platforms/powernv/opal-call.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-)