looking for help tshooting pmode, machine resetting
Posted: Sun Dec 20, 2015 3:15 am
Hi, I have did this before many years ago, implementing code to enter pmode after preparing gdts and disabling interrupts. But recently I am working on the project after losing all the old code, I re-wrote the code. However, it is not working. As soon as I enter pmode by setting the bit in cr0 register, machine resets. I know it is tricky and I can not remember what i did to make it work. I am still trying to fix when the time allows.
Can someone look at my code to see what could be wrong?
I decided to paste the entire code here:
Being able to do is extremely important to me as it blocks all my further development efforts.
I am willing to pay for person who can nail this for me (nego)
HEre is the lowdown:
I am using 2 HYPER-V VMs. One is dev machine running XP and
masm32 6.1 + VS.NET2003 (VS is not necesary except for makefile)
I created vfdd (virtual fdd with dos bootable partition from which I launch the pmode program)
conn-fd-dev.ps1 will connect the fdd into dev VM so I can copy the file to it.
conn-fd-boot.ps1 will connect the fdd into target VM from which I run the program from
here are the program code, i will provide link to the whole software code along with makefile, libraries if it is necessary
https://github.com/gggh000/exp.git
once code loaded
simply type nmake pmsw to compile the code.
and to make the debugging easier, i made this neat function in the code called parseDesc that will print out every entry in the GDT verbosely.
Can someone look at my code to see what could be wrong?
I decided to paste the entire code here:
Being able to do is extremely important to me as it blocks all my further development efforts.
I am willing to pay for person who can nail this for me (nego)
HEre is the lowdown:
I am using 2 HYPER-V VMs. One is dev machine running XP and
masm32 6.1 + VS.NET2003 (VS is not necesary except for makefile)
I created vfdd (virtual fdd with dos bootable partition from which I launch the pmode program)
conn-fd-dev.ps1 will connect the fdd into dev VM so I can copy the file to it.
conn-fd-boot.ps1 will connect the fdd into target VM from which I run the program from
Code: Select all
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.20 01:10:16 =~=~=~=~=~=~=~=~=~=~=~=
type c:\scrtype C:\scriptstype C:\scripts1\type C:\scripts\.gittype C:\scripts\conn-fd-boot.ps1
write-host "disconnecting floppy from minix development machine..."
Set-VMFloppyDiskDrive -VMName minix.dev.winxp -Path $null
write-host "connecting floppy to minix boot test machine..."
Set-VMFloppyDiskDrive -VMName minix.boot.system -Path j:\hyperv.fdds\fd0.vfd
write-host "starting minix.boot.system"
start-vm minix.boot.system
PS J:\users\Administrator> type c:\scrtype C:\scripts\conntype C:\scripts\conn-fd-boot.ps1type C:\scripts\conn-fd-dev.ps1
write-host "disconnecting floppy from minix boot test machine..."
Set-VMFloppyDiskDrive -VMName minix.boot.system -Path $null
write-host "connecting floppy to minix development machine ..."
Set-VMFloppyDiskDrive -VMName minix.dev.winxp -Path j:\hyperv.fdds\fd0.vfd
write-host "stopping minix.boot.system "
stop-vm minix.boot.system -f
PS J:\users\Administrator>
https://github.com/gggh000/exp.git
once code loaded
simply type nmake pmsw to compile the code.
and to make the debugging easier, i made this neat function in the code called parseDesc that will print out every entry in the GDT verbosely.