Hi,
rdos made some good points.
Bonfra wrote:
rdos wrote:
Another problem with older USB standards is BIOS hand-off. Some real hardware will require this before you can successfully use them.
Yeah about that I couldn't find anything about it regarding UHCI, not in the specs nor in any piece of code I can find. I'm not sure about this but I also don't think is mentioned in Ben's book (or at least I cant find it referred to UHCI)
Appendix M shows the Legacy support for all four controllers.
Bonfra wrote:
rdos wrote:
A further problem is that UHCI controllers often are companion controllers for EHCI, which means you need to hand over control to the ports from EHCI (unless this is done by default).
Shouldn't the BIOS setup everything for non-EHCI aware software? like auto-enable the hand over and stuffs? Anyway yes, my testing machine (an optiplex 780) has this EHCI-UHCI companion things
In theory, yes the BIOS should have set the EHCI controller to bypass and use the companion controllers. However, this doesn't mean that someone hasn't changed this setting. You should check the settings to be sure. If you have to change the EHCI yourself, you will need to read up on how the EHCI handles the companion controllers, which means you will need to detect the EHCI and parse its companion controller map. Probably something you are not wanting to do at the moment.
Octocontrabass makes a good point too. Bochs makes it quite simple to create a bochsrc.txt file. Either way, you really only need a few lines. Here is the one I used to boot your image file we talked about in the last thread.
Code:
config_interface: win32config
romimage: file=C:/bochs/bochs/bios/BIOS-bochs-latest
cpu: model=broadwell_ult
cpu: count=1, ips=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1
cpu: cpuid_limit_winnt=0
clock: sync=none, time0=local
memory: guest=512, host=512
vgaromimage: file=C:/bochs/bochs/bios/VGABIOS-lgpl-latest
vga: extension=vbe, update_freq=5, realtime=1, ddc=builtin
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="BonsOS.img", model="BonsOS.img", sect_size=512
boot: disk
log: log.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
mouse: enabled=0, type=imps2
private_colormap: enabled=0
pci: enabled=1, chipset=i440fx
magic_break: enabled=1
port_e9_hack: enabled=1
print_timestamps: enabled=0
com1: enabled=1, mode=file, dev=serial1.txt
usb_uhci: enabled=1, port1=disk:"..\FAT.IMG"
The first line is the line necessary to use the GUI part of the configuration I mentioned (clicking on the "Config" menu bar items).
To create a bochsrc file, simply run bochs with no parameters.
Code:
bochs
It will allow you to set configuration for devices, then save to a file. Once you have a
bochsrc.txt file, you can then skip the configuration with the 'q' parameter:
Code:
bochs -q
Also note that Octocontrabass mentioned Bochs doesn't support AHCI. The firmware will load your kernel anyway, doing so as if it was IDE. However, his point is that once your kernel gets to the point where you want to read from the disk, you won't be able to anymore since you assume AHCI and Bochs is IDE only.
Bonfra wrote:
BenLunt wrote:
https://www.virtualbox.org/ also supports USB and is open source as well.
Yes but regarding USB 1.1 only OHCI is supported
Sorry, I had forgotten that it only supports OHCI, EHCI, and xHCI.
Ben