a20 and modern hardware

Programming, for all ages and all languages.
Post Reply
JF
Posts: 2
Joined: Sat Jun 27, 2015 11:05 pm

a20 and modern hardware

Post by JF »

Hi all,

Is A20 gating still actually a thing in modern desktop pcs? I remember reading somewhere that intel no longer support a20 gating in their processors, so do modern motherboards and chipsets still boot up with a20 disable? I understand its purpose was to maintain backward compatibility when IBM pcs added more than 1MB of memory, but I would have thought that was so far in the past now it is silly to support it. Maybe some systems will only do it if set to boot in 'legacy bios' rather than uefi, or I suppose virtual machines like virtualbox would emulate it because one of their purposes is to allow people to run legacy software. I really like the osdev wiki, I have just recently had an urge to start experimenting with writing an os as a hobby, but nearly all the info online is very very dated; maybe the topic had a burst of popularity a while ago now few people are interested?
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: a20 and modern hardware

Post by bluemoon »

EFI systems boots with A20 enabled, and there is no standard way to disable it, it may not even support disabling.

And according to wiki:
Intel no longer supports the A20 gate starting with Haswell. Page 271 of the Intel System Programmers Manual Vol. 3A from June 2013 [3] states: "The functionality of A20M# is used primarily by older operating systems and not used by modern operating systems. On newer Intel 64 processors, A20M# may be absent."
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: a20 and modern hardware

Post by Antti »

JF wrote:I understand its purpose was to maintain backward compatibility when IBM pcs added more than 1MB of memory, but I would have thought that was so far in the past now it is silly to support it.
While we are at topic, I would like to re-share the link mikegonta posted in another topic just a while ago: Who needs the address wraparound anyway.
JF
Posts: 2
Joined: Sat Jun 27, 2015 11:05 pm

Re: a20 and modern hardware

Post by JF »

So Im wondering, if I boot a less than 3 years old desktop pc in bios mode (not uefi), would a20 be disabled ? assuming intels chipset that does not support a20 gating anymore, it could not even be present in 'legacy bios' boot, am i correct?

Im just wondering because all the code examples and tutorials and wiki entries and homebrew oses and forums posts on the internet go on at length about it, but it seems like something that does not even exist any more (for newer hardware, not talking about older systems)? (although as I said, nearly all this material is very old, maybe it has just not caught up yet?)
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: a20 and modern hardware

Post by Octocontrabass »

JF wrote:So Im wondering, if I boot a less than 3 years old desktop pc in bios mode (not uefi), would a20 be disabled ?
Probably not. As far as I know, most PCs in the past 5 years (including BIOS-only machines) boot with A20 enabled. All the machines I've tested agree with this.

If you're using a bootloader like GRUB, this is a non-issue: GRUB enables A20 for you. If you're writing your own bootloader, you need to check A20, although you could display an error message and halt instead of enabling A20.
Post Reply