Is Protected Mode feasible without the A20 Line enabled?

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
User avatar
ChosenOreo
Member
Member
Posts: 25
Joined: Sun May 29, 2011 5:16 pm
Location: Inside A Computer
Contact:

Is Protected Mode feasible without the A20 Line enabled?

Post by ChosenOreo »

Hi,
I'm currently working on improving my bootloader to work on more computers, and I noticed on the PS/2 Controller page that on Intel Mac computers, if I attempt to use the PS/2 controller and it doesn't exist then the computer will crash. It recommends using the ACPI tables to determine if the computer has a PS/2 Controller.

Is it feasible to wait until I am in protected mode and have parsed the ACPI tables before I enable the A20 Line?

Thanks!
- Adrian
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Is Protected Mode feasible without the A20 Line enabled?

Post by Brendan »

Hi,
ChosenOreo wrote:Is it feasible to wait until I am in protected mode and have parsed the ACPI tables before I enable the A20 Line?
The problem is that you'll probably need to enable A20 so that you can access the ACPI tables.

The solution you're looking for is the "enable A20" BIOS function. ;)


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
ChosenOreo
Member
Member
Posts: 25
Joined: Sun May 29, 2011 5:16 pm
Location: Inside A Computer
Contact:

Re: Is Protected Mode feasible without the A20 Line enabled?

Post by ChosenOreo »

Is using the BIOS function well enough supported to work on almost all computers? When I saw that on the A20 page I wasn't sure if it was widespread enough.

Thanks!
- Adrian
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Is Protected Mode feasible without the A20 Line enabled?

Post by Brendan »

Hi,
ChosenOreo wrote:Is using the BIOS function well enough supported to work on almost all computers? When I saw that on the A20 page I wasn't sure if it was widespread enough.
You can expect that a computer without a PS/2 controller will have it. For older machines (e.g. 80486) it might not be supported; but even then I'd try to use it in case it does work.

The most correct way would be to test if the A20 is already enabled (and do nothing if it is). Then try the BIOS function and test again. If that didn't work, then assume the computer is old and try the keyboard controller and test again. Finally, try the "fast A20" method. If nothing worked tell the user there's a problem and wait for "control+alt+delete" (or reset, or power off).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply