gusc wrote:00:00:07.201562 Guest paging mode: AMD64 (changed 6 times), A20 disabled (changed 1 times)
PML4 on Core2Duo or VirtualBox issue
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: PML4 on Core2Duo or VirtualBox issue
Re: PML4 on Core2Duo or VirtualBox issue
FFFUUUUUUUUUUUUUUU! (rage)Owen wrote:gusc wrote:00:00:07.201562 Guest paging mode: AMD64 (changed 6 times), A20 disabled (changed 1 times)
Thanks man! That means, it was in a totaly opposite direction Now I have to figure out why this does not work:
Code: Select all
; Enable A20 Gate
in al, 0x92 ; read from io port 0x92
test al, 0x02 ; do some test
out 0x90, al ; write to io port 0x90
- Combuster
- 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:
Re: PML4 on Core2Duo or VirtualBox issue
copying port 0x92 to 0x90 doesn't do anything with A20, but setting bit 1 of port 0x92 does:
Code: Select all
IN AL, 0x92 ; A20, using fast A20 gate
MOV CL, AL
AND CL, 2
JNZ skip ; if a20 bit seems set, don't touch it
OR AL, 2
OUT 0x92, AL
Re: PML4 on Core2Duo or VirtualBox issue
It's alive! Funny, but this "Fast A20" worked in Bochs and Qemu, but not on the real hardware. And, yes, I had a typo, so it's 0x92 after all not 0x90.Combuster wrote:copying port 0x92 to 0x90 doesn't do anything with A20, but setting bit 1 of port 0x92 does:
Code: Select all
IN AL, 0x92 ; A20, using fast A20 gate MOV CL, AL AND CL, 2 JNZ skip ; if a20 bit seems set, don't touch it OR AL, 2 OUT 0x92, AL
- Combuster
- 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:
Re: PML4 on Core2Duo or VirtualBox issue
Bochs *boots* with A20 enabled, so any code that tries to enable it again is obviously going to appear successful .
Also, computers are not quantummechanic devices. TEST doesn't change its subjects, so what do you think it's been doing there?
Also, computers are not quantummechanic devices. TEST doesn't change its subjects, so what do you think it's been doing there?
Re: PML4 on Core2Duo or VirtualBox issue
I've said it before and I'll say it again: Why do people who target x64 fiddle with the A20 this way? If you know you're 64bit, then gogo BIOS.
Code: Select all
mov ax, 0x2401
int 0x15
jc .a20Error
cmp ah, 0
jne .a20Error
Re: PML4 on Core2Duo or VirtualBox issue
I use three methods for enabling, along with some self modifying code.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: PML4 on Core2Duo or VirtualBox issue
This will not work on macbook since it does not have PS2 controller at all, not even emulation. It's best to detect if it exist before sending IOs, or just simply call BIOS (for uEFI, A20, if there is still such idea at all, is already enabled).gusc wrote:It's alive! Funny, but this "Fast A20" worked in Bochs and Qemu, but not on the real hardware. And, yes, I had a typo, so it's 0x92 after all not 0x90.Combuster wrote:copying port 0x92 to 0x90 doesn't do anything with A20, but setting bit 1 of port 0x92 does:
Code: Select all
IN AL, 0x92 ; A20, using fast A20 gate MOV CL, AL AND CL, 2 JNZ skip ; if a20 bit seems set, don't touch it OR AL, 2 OUT 0x92, AL
Re: PML4 on Core2Duo or VirtualBox issue
It will not just "not work", it will hang the machine dead.bluemoon wrote:This will not work on macbook since it does not have PS2 controller at all, not even emulation.
Learn to read.
- Combuster
- 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:
Re: PML4 on Core2Duo or VirtualBox issue
I could've provided the cheap answer, but that's not going to further most people's debugging skills. Still, for A20, this is the most thorough method I've come up with and it shouldn't get even close to the 0x92 code on a Mac.
While we're at it, does the read from 0x92 crash the mac or the write? (and if it's the write, what's the value returned by the read - I don't have a macbook or bootcamp to try)
While we're at it, does the read from 0x92 crash the mac or the write? (and if it's the write, what's the value returned by the read - I don't have a macbook or bootcamp to try)
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: PML4 on Core2Duo or VirtualBox issue
I don't know, and it may be model dependent. Is anyone sure 0x92 actually crashes a Mac? I know the keyboard controller ports do, but 0x92?Combuster wrote:While we're at it, does the read from 0x92 crash the mac or the write? (and if it's the write, what's the value returned by the read - I don't have a macbook or bootcamp to try)
EDIT: GRUB2's process is
- Try the BIOS, else
- Port 0x92, else
- Keyboard controller
Re: PML4 on Core2Duo or VirtualBox issue
I'll put the KBC code, prepare the USB and test it tonight.
I didn't check the cause last time, it may be fallen into an infinite loop on the "io wait" or it may be actually crashed, I'll check it out.
I didn't check the cause last time, it may be fallen into an infinite loop on the "io wait" or it may be actually crashed, I'll check it out.
Re: PML4 on Core2Duo or VirtualBox issue
Sorry guys, I found the most difficult part of this test is to find the damn usb stick, it just disappeared out of thin air.
I'd probably do the test when it pop out later.
I'd probably do the test when it pop out later.