A20 line

A20 line

The A20 or "addressing line 20" is one of the plethora of electrical lines that make up the system bus of an x86-based computer system. The A20 line in particular is used to transmit the 21st bit on the address bus.

A microprocessor will typically have a number of addressing lines equal to the base-two logarithm of its physical addressing space. For example an Intel 80386 with its 4 GiB physical addressing space requires 32 lines, which are named A0 through A31. The lines are named after the number of the bit in the address they are transmitting. Thus, A0 will transmit the least significant bit, which is bit 0. A20 transmits bit 20 and will become active once addresses reach 1 MiB or 220. (In the case of the 80386 the A0 and A1 lines do not actually exist as such, as this processor addresses memory in 4-byte words, indicating through separate "Byte Enable" lines which of the 4 bytes are of interest for a given memory transfer.)

History

When IBM designed the IBM PC AT machine, they decided to use the new higher-performance Intel 80286 microprocessor, which was not entirely compatible with the previous Intel 8088 and Intel 8086 microprocessors when in real mode. Previous x86 microprocessors did not have bus lines for A20 through A31; therefore, addresses above the first megabyte would appear to the processors to wrap externally. The 80286 could address up to 16 MB of system memory, thus removing the ability for memory addresses to wrap around.

Many real mode programs took and still take advantage of this, thus making it a common trick to access the first 64 KB of memory without changing the processor's segment registers. In order to remain compatible with these programs, IBM decided to fix the problem themselves, at the motherboard level.

This was accomplished by inserting a logic gate on the A20 line between the processor and system bus, which logically got named "Gate-A20". Gate-A20 can be enabled or disabled by software to allow or prevent the address bus from receiving a signal from A20. It is set to non-passing for the execution of older programs which rely on the wrap-around. At boot time, the BIOS first enables Gate-A20 when counting and testing all of the system's memory, and disables it before transferring control to the operating system.

Originally, the logic gate was a gate connected to the Intel 8042 keyboard controller. Controlling it was a relatively slow process. Other methods have since been added to allow for more efficient multitasking of programs which require this wrap-around with programs that access all of the system's memory.

Disconnecting A20 would not wrap all memory accesses above 1 MB, just those in the 1 MB-2 MB, 3 MB-4 MB, 5 MB-6 MB, etc. ranges. Real mode software only cared about the area slightly above 1 MB, so Gate-A20 was enough.

Over the time, the "A20 line" expression became confused with "Gate-A20" among less technically savvy audiences.Fact|date=April 2008

Enabling the Gate-A20 line is one of the first steps a protected mode x86 operating system does in the bootup process, often before control has been passed onto the kernel from the bootstrap (in the case of Linux, for example).

Virtual 8086 mode, introduced with the Intel 80386, allows the A20 wrap-around to be simulated by using the virtual memory facilities of the processor: physical memory may be mapped to multiple virtual addresses thus allowing the memory mapped at first megabyte of virtual memory may be mapped again in the second megabyte of virtual memory. The operating system may intercept changes to Gate A20 and make corresponding changes to the virtual memory address space, which also makes irrelevant the efficiency of Gate-A20 toggling.

The Intel 80486 added a special pin named "A20M#", which when asserted low forces bit 20 of the physical address to be zero for all on-chip cache or external memory accesses. This enhancement is mostly significant for mainboard manufacturers, because it makes parts of the external Gate A20 circuitry unnecessary. Software still needs to manipulate the gate and must still deal with external peripherals (the chipset) for that.

External links

* [http://www.win.tue.nl/~aeb/linux/kbd/A20.html A20 - a pain from the past]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • A20 — may refer to:Roads/HighwaysNational Highway *Sturt Highway, South Australia New South Wales *Gawler Bypass, South Australia *Main North Road, Adelaide, South Australia, France * A20 autoroute; Roads : * * A20 road (Isle of Man), a primary road… …   Wikipedia

  • A20 handler — The A20 handler is IBM PC memory manager software controlling access to the High Memory Area. Extended memory managers usually provide this functionality. A20 handlers are named after the 21st address line of the microprocessor, the A20 line.The… …   Wikipedia

  • A20-Gate — Das A20 Gate ist eine elektronische Schaltung in einem PC, welche die 21. Adressleitung einer zum 80286 Prozessor kompatiblen CPU freischaltet oder sperrt. A20 bedeutet „Adressleitung 20“. Dies ist die 21. Adressleitung, da ab A0 gezählt wird.… …   Deutsch Wikipedia

  • A20 road — UK road routebox road= A20 length mi= length km= direction= North west South east start= London (Deptford/New Cross) destinations= Lewisham Swanley Maidstone Ashford Folkestone end= Dover construction date= completion date= junctions=… …   Wikipedia

  • Maidstone East Line — Swanley to Ashford (via Maidstone East) Line, shown with other railway lines in Kent. Overview Type Suburban rail, Heavy rail …   Wikipedia

  • Protected mode — This article is about an x86 processor mode. For Internet Explorer Protected Mode, see Mandatory Integrity Control. x86 processor modes Mode First supported Real mode Intel 8086 8080 emulation mode NEC …   Wikipedia

  • High Memory Area — High Memory Area, HMA  начальный участок дополнительной памяти объёмом 65520 байт (64 килобайта минус 16 байт) с адресами от 10000016 до 10FFEF16 (сразу после Upper Memory Area), доступный в реальном режиме через верхние сегменты адресного… …   Википедия

  • DOS memory management — This article is about a class of DOS device drivers. For the general concept, see: memory management. Physical memory areas of the IBM PC family. In IBM PC compatible computing, DOS memory management refers to software and techniques employed to… …   Wikipedia

  • Master boot record — A master boot record (MBR) is a type of boot sector popularized by the IBM Personal Computer.[1] It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk. MBRs are usually placed on storage… …   Wikipedia

  • Intel 8048 — The Intel 8048 microcontroller (µC) (MCS 48), Intel s first microcontroller, was used in the Magnavox Odyssey² video game console, the Roland Jupiter 4 and Roland ProMars analog synthesizers, and (in its 8042 variant) in the original IBM PC… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”