First off I gotta say 2 things...

Don't ever install Unreal Tournament on your home (or work) machine.  You'll
never get anything productive done.  If you have and see Cyball running
around gettin' his arse blown off, show me some mercy.  Putting a few slugs
in the dude blastin' me would hurt either  :-)

Secondly, VM is bloody cool!!!  I haven't had this much fun in a while and
would never have been able to figure out something like this on bare metal.
(Unless I used Hercules...)

I don't know if it will be of interest to anyone, but it'll help me remember
later on if'n I "write" it down.

When you save the Linux segment you tell CP where to interrupt the IPL (I R
10000).  But, the breakpoint occurs AFTER the instruction at 10000 executes.
That's the point where CP takes a snapshot of the registers that get saved
in the segment.  It is also the location that CP reloads the registers, so
anything that the instruction at 10000 does to the registers, is effectively
nullified when the reload occurs.  Normally, this is okay since CP reloads
what was just set.

But, it causes us a problem when we use the PARMREGS=0-15 in the DEFSYS
command since the instruction (BASR R13,0) at 10000 is setting up a base
register and when CP loads the PARM registers it winds up killing the base.

This is what was causing the loop when PARMREGS=0-15 was specified.  The
easiest solution around that was simply to put a "NOP 0" as the instruction
at 10000.  This allows CP to load the registers with whatever it bloody well
pleases as the base setup will occur after the load.

But, that doesn't help us with PARMs on the IPL command.  And whatever
change is made, must be usable when a kernel compiled with the SHARED option
is IPLed directly from disk, reader, tape, an NSS, or when the SHARED option
isn't used.

It wound up being almost as easy as the NOP.  Since zipl and my original
patch save the IPL registers at location 0x180, all that is necessary to get
this to work with NSSes is to include an LM and STM of all registers as the
first 2 instructions at 10000.  This is only necessary when the SHARED
option is used, so the instructions are left out for a normal compile.

Anyway, enough rambling.  If you want the updated patch, head over to:

http://www.homerow.net/projects/zlinux/vmparms.htm

to grab a copy.  It also includes the change that allows you to specify (or
not) what keyword will be looked for when examining the IPL regs to
determine if parameters were supplied or not.  Currently, it is set to
require "LINE " as in:

IPL 4000 PARM line dasd=0x4000-0x5000 single

If it doesn't find "LINE " at the beginning, it doesn't include any
additional parameters.

You may change what it looks for by modifying the the PARMEYEC define at the
start of the /usr/src/linux/arch/s390/kernel/setup.c file to whatever you
like.  Setting it to the null string ("") will disable the feature and the
patch will blindly attempt to use whatever the registers contained at IPL.
(Well, upto the first hex zero.)

I decided against the allowing prefix and postfix parameters.  It seesm that
"most" parameter processing uses the last option found, thus allowing
overrides.  Let me know if you folks think it necessary.

Leland

Reply via email to