2 * (C) Copyright 2007-2011 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
20 } __attribute__((packed
));
22 struct sccb_evd_header
{
27 } __attribute__((packed
));
29 struct sccb_mcd_header
{
34 } __attribute__((packed
));
36 struct sccb_obj_header
{
39 } __attribute__((packed
));
41 struct sccb_mto_header
{
44 } __attribute__((packed
));
47 struct sccb_header hdr
;
48 struct sccb_evd_header evd
;
49 struct sccb_mcd_header mcd
;
50 struct sccb_obj_header obj
;
51 struct sccb_mto_header mto
;
53 } __attribute__((aligned(8)));
55 void sclp_msg(const char *fmt
, ...)
61 memset(&sccb
, 0, sizeof(sccb
));
64 ret
= vsnprintf(sccb
.txt
, sizeof(sccb
.txt
), fmt
, args
);
70 ascii2ebcdic((u8
*) sccb
.txt
, ret
);
72 /* Note: sccb.mto is ok all zeroed out */
73 #define SCCB_OBJ_TYPE_MESSAGE 0x0004
74 sccb
.obj
.len
= ret
+ sizeof(struct sccb_mto_header
) +
75 sizeof(struct sccb_obj_header
);
76 sccb
.obj
.type
= SCCB_OBJ_TYPE_MESSAGE
;
78 sccb
.mcd
.len
= sccb
.obj
.len
+ sizeof(struct sccb_mcd_header
);
79 sccb
.mcd
.type
= 0x0001;
80 sccb
.mcd
.tag
= 0xd4c4c240;
81 sccb
.mcd
.code
= 0x00000001;
83 #define SCCB_EVD_TYPE_PRIOR 0x09
84 sccb
.evd
.len
= sccb
.mcd
.len
+ sizeof(struct sccb_evd_header
);
85 sccb
.evd
.type
= SCCB_EVD_TYPE_PRIOR
;
87 #define SCCB_FLAGS_SYNC 0x80
88 #define SCCB_WRITE_EVENT_DATA 0x00760005
89 sccb
.hdr
.len
= sccb
.evd
.len
+ sizeof(struct sccb_header
);
90 sccb
.hdr
.flags
= SCCB_FLAGS_SYNC
;
95 * r2 = real addr of control block
98 int cmd
= SCCB_WRITE_EVENT_DATA
;
100 " .insn rre,0xb2200000,%1,%2\n" /* servc %1,%2 */
103 : "=&d" (cc
) : "d" (cmd
), "a" (&sccb
)