I saw an acticle said that Modern PC is not using 8042 Keyboard Controller chip, it using super I/O chip instead and that enables the A20 line for us. Is it true?
Posted on 2005-07-11 13:29:54 by hongmaster
It's true that some functionality has moved elsewhere, but you still have to enable A20 manually unless you want incompatibilities...
Posted on 2005-07-11 13:53:47 by f0dder
Do I need to test it before enable A20 Line?
In modern PC, If I enable it by keyboard controller, what happened?

Posted on 2005-07-11 14:05:25 by hongmaster
There is alternative way to enabling a20 gate with port 92h (System Control Port A). Setting first bit will enable a20:

in al, 92h
or al, 00000010b
and al, 11111110b
out 92h, al


And another alternative way is to use INT15 ax=2401. (however it doesn't work with really old BIOSes)

The safest way is to try the INT15, if it fails attempt enabling a20 with kb controller and if it also fails - use 92h port.
Posted on 2005-07-11 16:02:44 by arafel

There is alternative way to enabling a20 gate with port 92h (System Control Port A). Setting first bit will enable a20:

in al, 92h
or al, 00000010b
and al, 11111110b
out 92h, al


And another alternative way is to use INT15 ax=2401. (however it doesn't work with really old BIOSes)

The safest way is to try the INT15, if it fails attempt enabling a20 with kb controller and if it also fails - use 92h port.


The alternate methods you have suggested are discouraged since they are not accepted as standards. The best method would be from Stuart George's "OS FAQ".
Posted on 2005-07-17 14:42:04 by SpooK
Could you please explain why is it exactly discouraged as there is no actual standard for a20 gate manipulation. Using port 92h is a well accepted method for enabling a20 in embedded systems (in case of systems without kb for example). And INT 15 function is actually a standard which was introduced in order to simplify a20 manipulation.

By the way the "int15->kb->port 92h" sequence is used by Linux to enable the a20.
Posted on 2005-07-19 12:26:23 by arafel
To reiterate, just because not all systems support that standard... so just don't rely on one method... have fail-safes ;)
Posted on 2005-07-21 11:02:43 by SpooK