[comp.unix.i386] Rebooting a PS/2

m5@lynx.uucp (Mike McNally) (03/10/90)

I need help from a kind person who's successfully written code to
reset (cold reboot) a 386-based PS/2.  What I've got so far is some
code that runs just fine on 386 AT machines.  On the PS/2 it just
sits there.

I know about the keyboard controller deal; like I said above, I've
got code that works on PC's.  I suspect that there's something in
the clock RAM that tells the BIOS that the reset is not a cold boot,
but instead is a return to real mode.  I don't have any hard facts.

I'll be very thankful for any information.  I'll even offer source
code to my excellent tomato sauce recipe.


-- 
Mike McNally                                    Lynx Real-Time Systems
uucp: {voder,athsys}!lynx!m5                    phone: 408 370 2233

            Where equal mind and contest equal, go.

jrh@mustang.dell.com (James R. Howard) (03/10/90)

In article <7191@lynx.UUCP>, m5@lynx.uucp (Mike McNally) writes: 
> I know about the keyboard controller deal; like I said above, I've
> got code that works on PC's.  I suspect that there's something in
> the clock RAM that tells the BIOS that the reset is not a cold boot,
> but instead is a return to real mode.  I don't have any hard facts.
> 
> I'll be very thankful for any information.  I'll even offer source
> code to my excellent tomato sauce recipe.

Well, I looked in the IBM PS/2 Model 80 Technical Reference Manual.  
According to the documentation, on page 4-13, the exact same keyboard
controller reset should work.  If not, then it is broken, since the
document clearly states that pulsing the reset bit will reset the
microprocessor. 

I don't know what code you have tried, judging by the newsgroups
posted to, I would assume you are running aix or unix.  At any 
rate, the easiest test for pure functionality according to their
published specs, would be to boot DOS on the machine, and load up
debug.com.  Then do the following:

C:\> debug
-o 64,fe



That should reboot the machine as described in the tech ref.  If so,
then you know it works, and the code you are using yourself is 
probably suspect.


--------------------------------------------------------------
James Howard
..uunet!dell!mustang!jrh   or    jrh@mustang.dell.com

The opinions stated are my own, and do not necessarily 
reflect the opinions of my employer, or anyone else.
--------------------------------------------------------------

webb@bass.tcspa.ibm.com (Bill Webb) (03/16/90)

> I need help from a kind person who's successfully written code to
> reset (cold reboot) a 386-based PS/2.  What I've got so far is some
> code that runs just fine on 386 AT machines.  On the PS/2 it just
> sits there.
> Mike McNally                                    Lynx Real-Time Systems

Here's the code that I am using in our kernel debugger to cause
the system to reboot. It causes a processor shutdown by
clearing to interupt descriptor table pointer and then causing a level
3 interrupt. It appears to cause a hard reboot (e.g. the system goes 
thru the memory checking and re-initializes the processor).
It has been used on PS/2 model 80, 70 and P70.
Strictly "as is" but it might help you out.

You will probably have to roll your own version of the assembler routines
"lidt" and "int3" but they are pretty trivial.


db_reboot(void)
{
	struct dtinfo { short fill, limit; int addr } idtp;

        idtp.limit = 0;
        idtp.addr = 0;
        lidt(&idtp.limit);
        int3();
}


----------------------------------------------------------------
The above views are my own, not necessarily those of my employer.
Bill Webb (IBM AWD Palo Alto), (415) 855-4457.
UUCP: ...!uunet!ibmsupt!webb