Bug#504878: Support for 3215 console in zipl
I just did a little more research and discovered that a 3215 doesn't
support the sense id command; so scanning the subchannels looking for it
won't work. But here's what you can do:
1. Determine if you are running under VM. Do this by executing a STIDP
instruction. If the first byte of the CPU id is X'FF', then you are running
under VM, otherwise not.
2. If running under VM, issue the following CP command via DIAG X'8', with
output directed to a buffer.
QUERY VIRTUAL CONSOLE
Parse the command output to determine the subchannel number
and device type of the virtual console. There can only be one virtual
console. If there is no virtual console, or if the virtual console is
device type 3270, use the SCLP interface that you are currently using.
3. If the virtual console is device type 3215, then enable the
corresponding subchannel, if necessary. (STSCH, turn on enable bit, MSCH).
4. Write out the boot menu and read the user's reply using S/390 I/O
to the 3215 console. The following channel commands should suffice:
X'01' WRITE NO RETURN
X'09' WRITE WITH RETURN
I believe that the SCLP interface is designed to emulate a 3215; so
it shouldn't be too hard. The interface, of course, is quite different
(SSCH and I/O interruptions vs. SERVC and external interruptions).