Path: utzoo!attcan!uunet!husc6!mailrus!bbn!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.sys.intel Subject: Re: Returning the 80286 to Real Mode Message-ID: <3493@pt.cs.cmu.edu> Date: 5 Nov 88 16:49:46 GMT References: <1081@xenon.idec.stc.co.uk> <11367@conexch.UUCP> Sender: netnews@pt.cs.cmu.edu Organization: Carnegie-Mellon University, CS/RI Lines: 35 (someone from Intel will no doubt correct any errors in the following) In article <11367@conexch.UUCP> rob@conexch.UUCP (PUT YOUR NAME HERE) writes: }If memory serves me correctly, IBM states that the processor shutdown }will typically take 60ms to take place. One the processor shuts down, More like 600 microseconds. If it were 60ms, VDISK could only service 16 requests per second, for a maximum possible throughput of 64K/s (8 512-byte sectors). }So, the bottom line is this: Kludge #3 takes ~60ms. Kludge #4 takes }another few ms. In other words, it's SLOW! There is another MUCH }more elegant way to cause a processor shutdown without using the }keyboard controller. In fact, it takes ~1ms (or less). This method }involves telling the processor you will service NO interrupts, (lidt to }a idt w/ 0 entries), then generate an interrupt. Since the processor }can't service the interrupt, it generates an exception. The exception }also can't be service (since you hosed IDT), which will in turn will }reset the processor. The former method is rather well documented in The processor is only reset by an external signal. What happens is that the triple exception generated by the above puts the processor in SHUTDOWN mode. The PC/AT contains external circuitry to assert the reset line when the processor goes into SHUTDOWN. Since the processor is reset, you still need kludges #1, 2, and 4 (magic CMOS byte, return address, FAR jump in BIOS). }executing a 386 instruction on the 286 will cause the desired exception. It generates an "undefined opcode" exception. -- {harvard,uunet,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- AT&T: (412)268-3053 (school) ARPA: RALF@B.GP.CS.CMU.EDU |"Tolerance means excusing the mistakes others make. FIDO: Ralf Brown at 129/31 | Tact means not noticing them." --Arthur Schnitzler BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA -=-=- DISCLAIMER? I claimed something?