arceos-usb / arceos_experiment

An experimental modular OS written in Rust.
http://rcore-os.cn/arceos/
Apache License 2.0
5 stars 6 forks source link

xhci初始化 #4

Closed ZR233 closed 7 months ago

ZR233 commented 8 months ago

xchi的初始化,包括中断内存等配置。

jackyliu16 commented 8 months ago

我最近乱翻的时候看到这里 https://forums.raspberrypi.com/viewtopic.php?t=343755&sid=f0402f7ad3b90c803cc38279cb0e9799 好像说可以通过某种方式绕过pci来着,但是鉴于这个项目的语言我完全没了解过,直接原地摆烂

While it's traditional that an XHCI controller be attached to PCI it isn't essential, in fact the Pi 4 contains a second one that is memory mapped (MMIO) and the specification allows for that as well, the good news is that one driver will cover both controllers. 虽然传统上XHCI控制器连接到PCI并不是必需的,但事实上Pi 4包含第二个内存映射(MMIO),并且规范也允许这样做,好消息是一个驱动程序将覆盖两个控制器。

Hopefully we are not confusing you, just to be clear this is the second XHCI on the Pi 4 which is attached to the USB-C port not the USB A ports. 希望我们没有让你感到困惑,只是为了明确这是Pi 4上的第二个XHCI,它连接到USB-C端口而不是USB A端口。

https://github.com/hathach/tinyusb/issues/2161#issuecomment-1653127027

jackyliu16 commented 8 months ago

里面还提供了一些可行的技术思路,比如说

lookup the xhci specs, and follow those when talking to it added complication on the rpi, after you assign the pci-e BAR's and i think after you do the xhci scratch space allocation you need to use a mailbox call to the closed firmware, to bootstrap the vl805 firmware

以及一些可以参考的文件

ZR233 commented 7 months ago

已修复