aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/s390-arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/s390-ccw/s390-arch.h')
-rw-r--r--pc-bios/s390-ccw/s390-arch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/s390-arch.h b/pc-bios/s390-ccw/s390-arch.h
index 5e92c7a27d..504fc7c2f0 100644
--- a/pc-bios/s390-ccw/s390-arch.h
+++ b/pc-bios/s390-ccw/s390-arch.h
@@ -87,4 +87,17 @@ typedef struct LowCore {
extern LowCore const *lowcore;
+static inline void set_prefix(uint32_t address)
+{
+ asm volatile("spx %0" : : "m" (address) : "memory");
+}
+
+static inline uint32_t store_prefix(void)
+{
+ uint32_t address;
+
+ asm volatile("stpx %0" : "=m" (address));
+ return address;
+}
+
#endif