booting from USB floppy

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
Ferrarius
Member
Member
Posts: 69
Joined: Sun Oct 28, 2007 4:10 pm

booting from USB floppy

Post by Ferrarius »

hello,

I've a short question, when you boot an OS with an USB keyboard, the keyboard will still be useful if you jump to protected mode as long as the USB controller(s ) are not reinitialized. Now I wondered if this is also true for USB Floppy Drives or are these rendered unusable without USB Drivers?
Modular Interface Kernel With a lot of bugs ;)
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: booting from USB floppy

Post by Dex »

Here's how it works, if your PC/laptop will boot from a usb device, the code to load stuff off the usb device will be the same as a floppy/hdd eg: you will use int 13h, but in stead of using fat12 you will need to use fat16 or fat32 depending on the formating on the USB device.
Now this is fine but as soon as you go to pmode emulation stop's, but if you go back to realmode it starts again.
This means you can read/write to a usb fob without a usb driver, as long as you are in realmode or you can go back and forth to realmode to use int 13h, or you can send a int to stop emulation.
Thats why i have both a go back to realmode floppy/hdd driver and a pmode driver's in my OS, not only does this work with usb fobs, but also usb floppys and hdd's.
Hope this answers your ?.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: booting from USB floppy

Post by jal »

Dex wrote:Now this is fine but as soon as you go to pmode emulation stop's, but if you go back to realmode it starts again.
At least for USB keyboard, I understand it emulates PS/2 at hardware level. But this isn't true for floppy?


JAL
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: booting from USB floppy

Post by Dex »

It seems to hook into BIOS int 13h.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: booting from USB floppy

Post by jal »

Dex wrote:It seems to hook into BIOS int 13h.
But that would mean the USB support is actually in the BIOS, while I always thought (don't know what it's founded on), that it's the hardware doing the emulation (at least for the keyboard).


JAL
Hyperdrive
Member
Member
Posts: 93
Joined: Mon Nov 24, 2008 9:13 am

Re: booting from USB floppy

Post by Hyperdrive »

jal wrote: But that would mean the USB support is actually in the BIOS, while I always thought (don't know what it's founded on), that it's the hardware doing the emulation (at least for the keyboard).
As far as I know BIOS emulates USB mice by issuing an SMI and then executing some routines in SMM. At the time you (re)initialize the USB controller you get the port mastership and the BIOS ceases PS/2 emulation. So - yes, the BIOS has some USB "driver" code.

Regards,
Thilo
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: booting from USB floppy

Post by jal »

Hyperdrive wrote:As far as I know BIOS emulates USB mice by issuing an SMI and then executing some routines in SMM. At the time you (re)initialize the USB controller you get the port mastership and the BIOS ceases PS/2 emulation. So - yes, the BIOS has some USB "driver" code.
Yeah, ok, the SMM stuff I knew about, but I'd assumed something similar would be done for floppy drives. It seems that doesn't happen though (which would make some sense, as mice have never been part of the original BIOS).


JAL
LoseThos
Member
Member
Posts: 112
Joined: Tue Oct 30, 2007 6:41 pm
Location: Las Vegas, NV USA
Contact:

Re: booting from USB floppy

Post by LoseThos »

The ICH7 intel manual mentiones "USB Legacy keyboard/mouse" support. I think that means the intel support chip makes a USB mouse or keyboard resemble a PS/2. I use a PS/2 keyboard/mouse driver in protected mode and it works with a USB keyboard/mouse. As I recall, I had to slightly change my keyboard/mouse code for USB mice/keyboards acting as legacy PS/2 but it works.

I doubt a USB floppy has any such mode.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: booting from USB floppy

Post by jal »

LoseThos wrote:The ICH7 intel manual mentiones "USB Legacy keyboard/mouse" support. I think that means the intel support chip makes a USB mouse or keyboard resemble a PS/2. I use a PS/2 keyboard/mouse driver in protected mode and it works with a USB keyboard/mouse. As I recall, I had to slightly change my keyboard/mouse code for USB mice/keyboards acting as legacy PS/2 but it works.

I doubt a USB floppy has any such mode.

It's the USB chip doing the legacy emulation, so it could do that for floppies too. It's also unclear whether the USB chip operates together with the SMM BIOS to emulate stuff, or whether it's completely hardware transparent.


JAL
Post Reply