summaryrefslogtreecommitdiffstats
path: root/qemu/pc-bios/s390-ccw/s390-ccw.h
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-05-18 13:18:31 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-05-18 13:42:15 +0300
commit437fd90c0250dee670290f9b714253671a990160 (patch)
treeb871786c360704244a07411c69fb58da9ead4a06 /qemu/pc-bios/s390-ccw/s390-ccw.h
parent5bbd6fe9b8bab2a93e548c5a53b032d1939eec05 (diff)
These changes are the raw update to qemu-2.6.
Collission happened in the following patches: migration: do cleanup operation after completion(738df5b9) Bug fix.(1750c932f86) kvmclock: add a new function to update env->tsc.(b52baab2) The code provided by the patches was already in the upstreamed version. Change-Id: I3cc11841a6a76ae20887b2e245710199e1ea7f9a Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'qemu/pc-bios/s390-ccw/s390-ccw.h')
-rw-r--r--qemu/pc-bios/s390-ccw/s390-ccw.h54
1 files changed, 50 insertions, 4 deletions
diff --git a/qemu/pc-bios/s390-ccw/s390-ccw.h b/qemu/pc-bios/s390-ccw/s390-ccw.h
index 5484c2a45..616d96738 100644
--- a/qemu/pc-bios/s390-ccw/s390-ccw.h
+++ b/qemu/pc-bios/s390-ccw/s390-ccw.h
@@ -45,15 +45,22 @@ typedef unsigned long long __u64;
#include "cio.h"
+typedef struct irb Irb;
+typedef struct ccw1 Ccw1;
+typedef struct cmd_orb CmdOrb;
+typedef struct schib Schib;
+typedef struct chsc_area_sda ChscAreaSda;
+typedef struct senseid SenseId;
+typedef struct subchannel_id SubChannelId;
+
/* start.s */
void disabled_wait(void);
void consume_sclp_int(void);
/* main.c */
-void virtio_panic(const char *string);
+void panic(const char *string);
void write_subsystem_identification(void);
extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
-extern char ring_area[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
extern uint64_t boot_value;
/* sclp-ascii.c */
@@ -63,10 +70,11 @@ void sclp_setup(void);
/* virtio.c */
unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
ulong subchan_id, void *load_addr);
-bool virtio_is_blk(struct subchannel_id schid);
-void virtio_setup_block(struct subchannel_id schid);
+bool virtio_is_supported(SubChannelId schid);
+void virtio_setup_device(SubChannelId schid);
int virtio_read(ulong sector, void *load_addr);
int enable_mss_facility(void);
+ulong get_second(void);
/* bootmap.c */
void zipl_load(void);
@@ -143,4 +151,42 @@ static inline void yield(void)
#define MAX_SECTOR_SIZE 4096
+static inline void sleep(unsigned int seconds)
+{
+ ulong target = get_second() + seconds;
+
+ while (get_second() < target) {
+ yield();
+ }
+}
+
+static inline void *memcpy(void *s1, const void *s2, size_t n)
+{
+ uint8_t *p1 = s1;
+ const uint8_t *p2 = s2;
+
+ while (n--) {
+ p1[n] = p2[n];
+ }
+ return s1;
+}
+
+static inline void IPL_assert(bool term, const char *message)
+{
+ if (!term) {
+ sclp_print("\n! ");
+ sclp_print(message);
+ panic(" !\n"); /* no return */
+ }
+}
+
+static inline void IPL_check(bool term, const char *message)
+{
+ if (!term) {
+ sclp_print("\n! WARNING: ");
+ sclp_print(message);
+ sclp_print(" !\n");
+ }
+}
+
#endif /* S390_CCW_H */