VFS error

General questions related to the company.

Moderator: Moderators

VFS error

Postby Mezo » Mon Nov 08, 2010 3:16 pm

Hi everyone,
At first I want to say that is a great tutorial.
Now i have downloaded the VFS tutorial (Chapter 22).
When i run it in an emulator such as MSVPC or Bochs it runs perfectly but when i run it on real computer it doesn't running and the error handler starts and tells me "*** STOP:General Protection Fault"
I don't know where is the problem.
I have tried it on two computer and it always shows the same error.
I didn't change any small part from the code

and i have searched in the forums about the error and i have found this post :
http://www.brokenthorn.com/forums/viewtopic.php?f=14&t=1388&view=next

and i have downloaded this demo :
http://brokenthorn.com/Resources/Demos/SysCore2.zip

this demo runs in a real computer but when i start to read a text file it stops without any error.

Can anyone help me in my situation ?
------------------------------------------------
Thank you in advance.
And specially thank you MR.Mike
Mezo
 
Posts: 7
Joined: Wed Oct 20, 2010 1:20 pm

Re: VFS error

Postby Andyhhp » Mon Nov 08, 2010 10:43 pm

Sorry but you are going to have to provide more information than just that.

First of all, what processors are in the real computers you tried?
Image
Andyhhp
Moderator
 
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1

Re: VFS error

Postby Mezo » Tue Nov 09, 2010 6:56 am

Hi,
It's a P4M900-M4 mother board.
http://www.biostar.com.tw/app/en/mb/content.php?S_ID=283
With processor Intel Pentium 4 3.00 GHz
and it have 1.5 GB RAM DDR2
Mezo
 
Posts: 7
Joined: Wed Oct 20, 2010 1:20 pm

Re: VFS error

Postby chibicitiberiu » Wed Nov 10, 2010 11:51 am

Please note that the floppy driver that is used in this series is bugged, it has several problems. You can check it for yourself, find the bugs, and fix them, and use as reference this article: http://wiki.osdev.org/Floppy_Disk_Controller

I found personally some nasty bugs, you should check it. It may run okay in emulators, but it doesn't compare to real computers.
chibicitiberiu
 
Posts: 22
Joined: Sat Jul 17, 2010 7:55 am

Re: VFS error

Postby halofreak1990 » Mon Nov 15, 2010 12:01 am

chibicitiberiu wrote:Please note that the floppy driver that is used in this series is bugged, it has several problems. You can check it for yourself, find the bugs, and fix them, and use as reference this article: http://wiki.osdev.org/Floppy_Disk_Controller

I found personally some nasty bugs, you should check it. It may run okay in emulators, but it doesn't compare to real computers.

I agree with this. Emulators and real hardware do not work exactly alike, which is why my homebrew kernel does not work in VirtualPC, but runs on real hardware just fine.

The key to getting something useful from the floppy drive on real hardware, is to retry every command sent to the floppy drive.
Especially the calibrate command, since it often takes 2 tries to get it to sector0.
Retry and check the return values to see if things work.

My Floppy code is over 3x bigger than Mike's, because of error checking and retrying if it fails, though the code is designed to give up after roughly 10 tries, since the hardware is most likely faulty if it takes that much.
halofreak1990
 
Posts: 92
Joined: Thu May 27, 2010 8:54 pm
Location: Netherlands

Re: VFS error

Postby Mike » Mon Nov 15, 2010 5:21 am

Hello,

There is a couple of issues with the demo provided by the FDC chapter. An update is planned with these fixes, however there might be a restructure of this part of the series.

More specifically, the DMA chapter might be moved before the FDC chapter to avoid the current issues with the DMAC interface in the current FDC chapter. If anyone has any comments on this possible change, please post them here.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron