Gate A20 Option
Назначением функции BIOS Gate A20 Option (опция шлюза линии A20) является выбор режима переключения работы процессора из защищенного режима в реальный и обратно. Опция может принимать всего два значения – Normal (Нормальный) и Fast (Быстрый).
Принцип работы
Поскольку в большинстве современных операционных систем используется исключительно защищенный режим работы процессора, то данная опция в настоящее время редко используется на практике.
Тем не менее, возможно, читателям будет интересно узнать, что представляет собой Gate A20. Чтобы разобраться в этом, следует вспомнить историю разработки процессоров Intel.
Все дело в том, что при разработке процессора i80286, точнее, его шины адреса, была допущена ошибка, которая позволила программам в реальном режиме работы процессора адресовать память за пределами 1 МБ (так называемая верхняя память, High Memory Area или HMA). Поскольку многие старые программы не работали с этой памятью, то в чипсеты материнских плат была встроена специальная микросхема, блокирующая 20-й разряд шины адреса, благодаря которой и была возможна адресация к верхней области памяти. Именно эта микросхема и называется Gate A20 (Шлюз A20 или вентиль A20).
Для того чтобы управлять блокировкой 20-го разряда шины адреса, существует два способа. Первый способ предполагает использование контроллера порта PS/2 (который также часто называют контроллером клавиатуры, хотя это не совсем корректное название), другой – так называемого порта 92h.
Контроллер порта PS/2 в основном используется для управления периферийными устройствами, такими, как клавиатура и мышь. Однако при этом он может управлять и микросхемой Gate A20.
Однако низкое быстродействие контроллера PS/2 и сложность процесса управления вентилем A20 при помощи этого контролера заставили разработчиков искать другие возможности для управления Gate A20. Для этой цели была разработана специализированная микросхема, которая получила название порта 92h. В настоящее метод переключения режима процессора при помощи данного порта считается основным.
Таким образом, значение опции Fast позволяет пользователю выбрать в качестве переключателя порт 92h, а значение Normal – старый добрый, но и, в то же время, медленный контроллер клавиатуры.
Какое значение опции выбрать?
Прежде всего, опция Gate A20 Option имеет ограниченную область применения. Она полезна лишь в операционных системах, которые используют как реальный режим работы процессора, так и защищенный. Это могут быть операционные системы MS DOS, а также Windows 98 и более старые операционные системы от Microsoft, в которых используется как реальный, так и защищенный режимы.
Если у вас установлены подобные ОС, то следует выбрать вариант опции Fast, позволяющий использовать для переключения режима более быстрый контроллер порта 92h. В системах подобных Windows XP, 7 и 8, переключение режима процессора не используется, поэтому не имеет значения, какой вариант опции у вас установлен.
Значение опции Normal можно установить лишь в том случае, если по какой-то причине микросхема порта 92h является неработоспособной, или ее использование приводит к сбоям в работе системы.
Gate A20 Option – The BIOS Optimization Guide
share
Gate A20 Option
Common Options : Normal, Fast
Quick Review
The Gate A20 Option BIOS feature is used to determine the method by which Gate A20 is controlled. The Normal option forces the chipset to use the slow keyboard controller to do the switching. The Fast option, on the other hand, allows the chipset to use its own 0x92 port for faster switching. No candy for guessing which is the recommended setting!
Please note this feature is only important for operating systems that switch a lot between real mode and protected mode. These operating systems include 16-bit operating systems like MS-DOS and 16-bit/32-bit hybrid operating systems like Microsoft Windows 98.
This feature has no effect if the operating system only runs in real mode (no operating system currently in use does that, as far as I know!) or if the operating system operates entirely in protected mode (i.e. Microsoft Windows XP or newer). This is because if A20 mode switching is not required, then it does not matter at all if the switching was done by the slow keyboard controller or the faster 0x92 port.
With all that said and done, the recommended setting for this BIOS feature is still Fast, even with operating systems that don’t do much mode switching. Although using the 0x92 port to control Gate A20 has been known to cause spontaneous reboots in certain, very rare instances, there is really no reason why you should keep using the slow keyboard controller to turn A20 or or off.
Details
The A20 address line is a relic from the past. It came about because the father of x86 processors – the Intel 8088 had only 20 address lines! That meant that it could only address 1 MB of memory. Of course, in the 8088 days, 1 MB of memory was a LOT!
When the Intel 80286 processor was introduced, it had 24 address lines. This represented a tremendous leap in the amount of addressable memory. Although there were only four extra address lines, that allowed the 80286 to address up to 16 MB of memory.
To maintain 100% software compatibility with the 8088, the 80286 had a real mode that would truncate addresses to 20-bits. Unfortunately, a design bug prevented it from truncating the addresses properly. Thus, the 80286 was unable to run many 8088-compatible software.
To solve this problem, IBM designed an AND gate switch to control the 20th address bit. This switch was henceforth known as the Gate A20. When enabled, all available address lines would be used by the processor for access to memory above the first megabyte.
In the 8088-compatible real mode, the Gate A20 would be used to clear the 20th bit of all addresses. This allowed the 80286 to function like a superfast 8088 processor with access only to the first megabyte of memory.
Even today, Gate A20 is still an important part of the computer. The processor needs to turn A20 on and off when it switches between real mode and protected mode. Since operating systems like Microsoft Windows 98 switch a lot between real mode and protected mode, relying on the understandably slow keyboard controller was not acceptable.
The motherboard chipset’s I/O port 0x92 (System Control Port A) was summarily recruited to take over the job. A lot faster than the keyboard controller, the 0x92 port allows the processor to switch much faster between real mode and protected mode. This translates into faster memory access and better system performance.
The Gate A20 Option BIOS feature is used to determine the method by which Gate A20 is controlled. The Normal option forces the chipset to use the slow keyboard controller to do the switching. The Fast option, on the other hand, allows the chipset to use its own 0x92 port for faster switching. No candy for guessing which is the recommended setting!
Please note this feature is only important for operating systems that switch a lot between real mode and protected mode. These operating systems include 16-bit operating systems like MS-DOS and 16-bit/32-bit hybrid operating systems like Microsoft Windows 98.
This feature has no effect if the operating system only runs in real mode (no operating system currently in use does that, as far as I know!) or if the operating system operates entirely in protected mode (i.e. Microsoft Windows XP or newer). This is because if A20 mode switching is not required, then it does not matter at all if the switching was done by the slow keyboard controller or the faster 0x92 port.
With all that said and done, the recommended setting for this BIOS feature is still Fast, even with operating systems that don’t do much mode switching. Although using the 0x92 port to control Gate A20 has been known to cause spontaneous reboots in certain, very rare instances, there is really no reason why you should keep using the slow keyboard controller to turn A20 or or off.
Go Back To > The BIOS Optimization Guide | Home
Support Tech ARP!
If you like our work, you can help support our work by visiting our sponsors, participating in the Tech ARP Forums, or even donating to our fund. Any help you can render is greatly appreciated!





