Enable A20?

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
pepito

Enable A20?

Post by pepito »

Why (or why not) is important enable the A20 line?
Is necesary to work in protected mode?
Which CPU's support teh A20 line?

Sorry, I am very new with A20...

Thank you.
MadProgrammer

RE:Enable A20?

Post by MadProgrammer »

Every CPU over like the 286 has an A20 line, it IS protected mode, and is required to access more the 16MB of RAM IIRC.
Anton

RE:Enable A20?

Post by Anton »

A20 has nothing to do with protected mode. A20 for emulation of an 86 processor. It had a 20 bit bus, and many programers used it's feature: address
0xffff:0xffff = 0xffff0+0xffff = 0x10FFEF = ( beacause of the 20-bit bus)= 0xFFEF.
Starting with a 286 A20 apeared, because the effect above would not apear overwise.
Anton
p4n1c

RE:Enable A20?

Post by p4n1c »

A20 was disabled by default on AT architecture when introduced because of compatibility issues with the XT architecture.  XT when you try to reference memory passed 1 meg would wrap back to 0.  So you must enable it to access anything over 1 meg to prevent wrapping back.  IIRC it's actually 21 address lines(start from 0, 20 is the 21st address line).
pepito

RE:Enable A20?

Post by pepito »

If A20 has nothing to do with protected mode, then may I switch to protected mode and access the 4GB of memory?
Tim Robinson

RE:Enable A20?

Post by Tim Robinson »

A20 lets you access every other megabyte of memory. You could enter protected mode without enabling A20, but then you wouldn't be able to access memory at 1MB-2MB, 3MB-4MB, 5MB-6MB, etc.
Anton

RE:Enable A20?

Post by Anton »

That's exactly what i wrote.
pepito

RE:Enable A20?

Post by pepito »

Thank you for everybody, I know now what A20 is.

I get a very interseting code at http://lists.insecure.org/linux-kernel/ ... /1123.html it works very fine and maybe someone else like to study it.

Thank you again!
Post Reply