[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SCLP Read Events
From: |
Harold Grovesteen |
Subject: |
SCLP Read Events |
Date: |
Tue, 16 May 2023 08:43:46 -0500 |
User-agent: |
Evolution 3.44.4-0ubuntu1 |
Sorry for the rather long email, but I have hit a major snag in my work
with QEMU.
As part of the SATK (https://github.com/s390guy/SATK) project, I have
been working on extending bare-metal program support to QEMU by the
project.
Many bare-metal programs at some point need to share information with
the user. SCLP write events provide this vehicle and write events are
working within a bare-metal program.
However, SCLP read events, the mechanism one would expect to use to
allow a query from the user is not. The implementation makes a request
for a read event and gets the X'60F0' reason code and response class
for no available events.
That makes perfect sense, because I have not been able to actually type
any input that could turn into a read event.
Is there a configuration option required to enable communication with
the emulated SCLP console from the QEMU process console input?
This is the command by which I invoke QEMU:
/home/harold/qemu-7.2.0-rc4/install/bin/qemu-system-s390x -machine
s390-ccw-virtio -cpu max -m 3M -no-shutdown -nographic -serial
mon:stdio -kernel test9.elf
As the command line reflects, I am testing with QEMU 7.2.0 rc4.
One of the concerns I have had is that the program terminates before I
can type the input. In this regard I have tried various attempts to
get the program to "continue" by use of timer related interruptions,
specifically CPU Timer and Clock Comparator external interruptions.
(And, yes, the active PSW is enabled for external interruptions and the
subclass mask is set as needed in control register zero.)
In the case of the CPU Timer it decrements, but never below zero. It
stops at zero and does not decrement to a negative value required for a
CPU Timer external interrupt.
In the case of the Clock Comparator, it does not appear to ever compare
the actual TOD Clock to the Clock Comparator register. The TOD Clock
advances past the Clock Comparator, but no external interruption is
generated.
(Aside, I would be very surprised if Linux itself does not use one
these types of timer interruptions. So hoping it just needs enabling.)
In the case of each of the types of timers, I have tests that I can
share.
If there is some configuration option required to enable time related
interruptions knowing which option would be appreciated.
I am at the point of just hammering away at the Service Processor
interface with SERVC to see if I can eventually type something hoping
the read event is eventually queued. If this is the proper way to get
the read events to be recognized, that would be useful information. I
can "emulate" the Clock Comparator timing effect in the program if
needed to detect a "timeout" condition without an actual interruption.
(That is what the Clock Comparator test program does.)
If read events are known to work and my program is not working, it must
be the program. I am simply looking for some pointers at how to make
it work.
If any of these issues have been since resolved with a more recent
release, please let me know to which release I would need to upgrade.
Thanks for whatever assistance can be provided.
Harold Grovesteen
- SCLP Read Events,
Harold Grovesteen <=