QEMU Bug, kernel problem, or grub bug?

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
kfreezen
Member
Member
Posts: 46
Joined: Tue Jul 21, 2009 11:36 am

QEMU Bug, kernel problem, or grub bug?

Post by kfreezen »

I have implemented a floppy driver in my kernel and my boot device is not a valid floppy. The boot device number is 0xFFFFFF (as reported by grub multiboot)

EDIT: I don't think it is a bug in qemu because Virtual box reports the same boot device.
User avatar
blobmiester
Member
Member
Posts: 45
Joined: Fri Jul 16, 2010 9:49 am

Re: QEMU Bug, kernel problem, or grub bug?

Post by blobmiester »

kfreezen wrote:g, kernel problem, or grub bug?  
I have implemented a floppy driver in my kernel and my boot device is not a valid floppy. The boot device number is 0xFFFFFF (as reported by grub multiboot)

EDIT: I don't think it is a bug in qemu because Virtual box reports the same boot device.
I'm fairly sure that the 'standard-ish' boot device number is 0 not 0xFFFFFF for floppy disk drive #0. Maybe check to see if there is something wrong with the way you access the multiboot information?

Oh and it is definitely not a problem with QEMU, BOCHS, GRUB, etc. Many people on here have made workable floppy drivers with the same QEMU and GRUB setup.
kfreezen
Member
Member
Posts: 46
Joined: Tue Jul 21, 2009 11:36 am

Re: QEMU Bug, kernel problem, or grub bug?

Post by kfreezen »

I do not believe that I am accessing the boot information wrong because mem_upper is the correct amount of upper memory in my qemu setup.
also, the boot device entry is at mboot_info+12, and the bit indicating that the boot device is valid is 1.
User avatar
Combuster
Member
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: QEMU Bug, kernel problem, or grub bug?

Post by Combuster »

considering that grub/emulators are rarely at fault, it's hard to trust your claim. Hence, please proof that your kernel is correct. Most likely you'll find the bug in the process.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: QEMU Bug, kernel problem, or grub bug?

Post by xenos »

It seems you are misinterpreting the boot_device field. The drive number is only one byte, so it cannot by any chance be 0xFFFFFF. For a floppy the drive number should be 0x00, and the following 3 bytes should be 0xFF, indicating that there are no partitions. Probably your 0xFFFFFF comes just from these 3 bytes.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Post Reply