A20 line

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
chezzestix
Member
Member
Posts: 118
Joined: Mon May 05, 2008 5:51 pm

A20 line

Post by chezzestix »

I was reading through the wiki about protected mode and came across the optional enabling of A20 line. I then proceeded to read about the A20 line but... it never really said anything that seemed terribly existential. So it just seems to me to be an extra hassle.

What are the pros of enabling this?
What are the cons of not?

Sorry if this has already been answered, I searched and didn’t like what I could find.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Have you read the A20 Line entry in the wiki? It does tell you why it should be enabled.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
chezzestix
Member
Member
Posts: 118
Joined: Mon May 05, 2008 5:51 pm

Post by chezzestix »

:( Sorry about that I dont know how I missed those two sentences the first three reads through.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

The A20 line permits you to have access to memory above the 1Mb barrier,
this without swtching to protected mode.
Image you would like your bootloader to locate your kernel in the !Mb above address space.Without the a20 line trick,that will mean you should enable PMODE in the bootloader itself!Thats useless since you cannot relocate the kernel when PMOde is enabled,at least the GDT and other system descriptors.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

einsteinjunior wrote:The A20 line permits you to have access to memory above the 1Mb barrier,
this without swtching to protected mode.
Image you would like your bootloader to locate your kernel in the !Mb above address space.Without the a20 line trick,that will mean you should enable PMODE in the bootloader itself!Thats useless since you cannot relocate the kernel when PMOde is enabled,at least the GDT and other system descriptors.
I'm sorry, but you are talking gibberish. Try not giving 'advice' when you clearly do not know what you are talking about. To rectify what I think you are saying above:

1) "A20 line permits you to have access to memory above the 1Mb barrier" - Partially true, as it does give you access to the 1Mb directly above the 1Mb barrier. But even with the A20 disabled you can still access every other 1Mb, since address lines 21-31 are available.
2) "Without the a20 line trick,that will mean you should enable PMODE in the bootloader itself!" - The A20 line is disabled in both real mode and pmode. Pmode has nothing to do with it.
3) "Thats useless since you cannot relocate the kernel when PMOde is enabled" - Relocating a kernel is preferably done in pmode, since in real mode you only have access to the first 1MB (whether the A20 is enabled or not), so there's not much place to relocate it to, is there?
4) "at least the GDT and other system descriptors." - I'm at loss here what you mean, but no doubt it is just as misinformed as your other comments.


JAL
Post Reply