flat assembler
Message board for the users of flat assembler.

Index > OS Construction > What is A20 Enabler??

Author
Thread Post new topic Reply to topic
milind



Joined: 15 Feb 2004
Posts: 33
milind
Hello,
I have checked out some simple boot loader examples and each of them has a module that what it describes as a A20 enabler, which enables 1MB addressing by accessing dome ports 0x64 and 0x60. What does this mean? What are we trying to do exactly? The Manuals of the intel processor family do not describe anything like this.
Post 29 Feb 2004, 17:51
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
By default, when you turn your computer on, line A20 is disabled, which means that you cannot access the memory above 1MB - the addreses will be rounded. You have to enable this line to gain full access to your memory.
Post 29 Feb 2004, 18:41
View user's profile Send private message Visit poster's website Reply with quote
milind



Joined: 15 Feb 2004
Posts: 33
milind
Ok yes I understood upto that part, I was looking for a more specific answer, why do access the keyboard controller to enable it and again as i said i could not find anything about this in the pentium manuals, is it more specific to the motherboard design?
I would really like to know why we do , what we do to enable this A20 line. And why is it not enabled by default in restart.
Post 29 Feb 2004, 21:09
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Iirc, A20 is not enabled by default, because a few 8086 apps depended on the wraparound that occurs at the very last high addresses - pretty moronic, imo.

And why do we use the keyboard controller? They needed to put the ability in some controller somewhere, and it was probably too expensive to make a controller just to fiddle with the A20 line, so - "might as well use the keyboard controller". Just PS/2 mice feels somewhat hacky to work with.
Post 29 Feb 2004, 22:00
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
At start A20 is disabled to provide backward compatibility. I don't know exactly why it uses keyboard controller, but is it important? Wink
Anyway you can take a look at http://www.osdever.net - you will surely find something interesting about A20 line.

regards
Post 29 Feb 2004, 22:11
View user's profile Send private message Visit poster's website Reply with quote
milind



Joined: 15 Feb 2004
Posts: 33
milind
f0dder wrote:
Iirc, A20 is not enabled by default, because a few 8086 apps depended on the wraparound that occurs at the very last high addresses - pretty moronic, imo.


Ok 1st of all please clarify what exactly is A20 enabler. Enabling it enables access of addresses above 1 MB or it enables accesses upto 1MB?? In the Intel Manual it says that in Real Address mode post reset 1MB memory is addressable and when switched to protected mode full 64GB of physical space can be addressed.
So it seems to me this thing is not actually a processor thing which one can also get the hint because we are writing to the keyboard controller. So this means it is a board specific thing. SO why have they implemented this if the processor itself restrics addresses upto 1MB.
Post 01 Mar 2004, 14:32
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
milind



Joined: 15 Feb 2004
Posts: 33
milind
Ok Sorry for my previous post, I found the explanation in the Intel manual, I was wrong, the processor does not do wraparound, and so the A20# pin has to enabled. But still one thing is unclear. From where did the steps to enable the line are known. I have seen some boot loader codes thats the only source aren't there any datasheets or manuals for this available?
Post 01 Mar 2004, 14:41
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
Gomer73



Joined: 29 Nov 2003
Posts: 151
Gomer73
You might want to look at the FASM code.
Apparently the PS/2's have even a different way of enabling the A20 line.
Schematics for IBM computers would definitely show it.
I have some old schematics(not in computer format) which show some of the stuff like A20, but they aren't up to date.

The thing is that the A20 has nothing to do with the processor. It also has nothing to do with the chips on the motherboard. The commands to enable the A20 is just how the manufacturer(IBM) chose to solder the chips on the motherboard. Since IBM set the standard as to how a "PC" was built, everybody copied them in order for the software to work. IBM would be the source for the info you are looking for, good luck.
It is just like the keyboard port could be port 1234h if that is what IBM chose. It is important to note that ports 60h-64h are not the keyboard controller. You can use the ports to access the keyboard controller, but those ports are wired to do a whole lot more.

Ralph Brown's Interrupt List will show you what you need to know although his stuff is tough to read and it is not the "official" documentation.
Post 01 Mar 2004, 19:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.