On Wed, 26 Apr 2023 at 07:11, Yuquan Wang <wangyuquan1...@phytium.com.cn> wrote:
>
> > On 2023-04-25 16:34:04, Peter Maydell replied:
> >
> > On Mon, 24 Apr 2023 at 13:33, 王宇泉 <wangyuquan1...@phytium.com.cn> wrote:
> > > As a junior OS engineer, I met a problem of initialization of 
> > > platform-ehci-usb in sbsa-ref recently.
> > >
> > > The result of sbsa-acs(UEFI Shell application) on sbsa-ref shows that 
> > > "Peripheral: Num of USB controllers: 0".
> > >
> > > And I found that the platform-ehci-usb in qemu is a 32-bits DMA device 
> > > while our sbsa-ref machine does not own
> > >
> > > DRAM memory below 4G. It seems like a contradiction point.
> >
> > This definitely doesn't seem like an intentional thing.
> > What specifically do you mean by "32-bits DMA device" ?
> > Is our implementation of this device accidentally not
> > handling addresses above 4GB? Or is the specification of
> > the device itself limited to 4GB addresses? Or is this a
> > guest driver problem?

> Maybe the specific explanation is that qemu implements that:
> In hw/usb/hcd-ehci.c:
> void usb_ehci_init(EHCIState *s, DeviceState *dev)
> {
> ...
> "s->caps[0x08] = 0x80;"
>
> According to EHCI spec version 1.0 Section 2.2.4,
> the set of "0x80" on Host Controller Capability Parameters
> Register means this(qemu) EHCI Host Controller does not have
> 64-bit Addressing Capability.

Ah, I see; thanks for providing the reference to the spec
and the source code.

Gerd, is there a particular reason our EHCI controller only
claims to be able to do 32-bit DMA ? Should we give it a QOM
property so boards that only have RAM above the 4GB mark can
use it ? (Would the x86 PC benefit from allowing >4GB DMA?)

thanks
-- PMM

Reply via email to