RE: DMA not supported below 4GB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ard,

I'm not familiar with how dma-ranges will be utilized, could you educate me more?
For example, PlatformInit may assign dma-ranges = <0 0x100000000> // 0 ~ 4GB, but we still want to prevent DMA access from some sensitive regions within this huge range.
Does that mean we rely on reserved-memory node to prevent DMA from some regions? Or are there any other nodes that PlatformInit/Payload has to provide?

Thanks,
Chasel

> -----Original Message-----
> From: Simon Glass <sjg@xxxxxxxxxxxx>
> Sent: Tuesday, November 21, 2023 9:38 AM
> To: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Cc: Tan, Lean Sheng <sheng.tan@xxxxxxxxxxxxx>; Devicetree Discuss
> <devicetree@xxxxxxxxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Guo, Gua
> <gua.guo@xxxxxxxxx>; Chiu, Chasel <chasel.chiu@xxxxxxxxx>; Dong, Guo
> <guo.dong@xxxxxxxxx>; Brune, Maximilian <maximilian.brune@xxxxxxxxxxxxx>
> Subject: Re: DMA not supported below 4GB
> 
> Hi Ard,
> 
> On Tue, 21 Nov 2023 at 10:31, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> >
> > dma-ranges is supposed to handle this, but I'm not sure how well it
> interoperates with SMMUs (which remap DMA addresses into a virtual address
> space, and this can both solve and create issues when it comes to DMA address
> limits).
> >
> > Adding a 'no-dma-above-4g' property is a bad idea. Not only does it
> > result in potential inconsistencies wrt 'dma-ranges', it also only
> > describes 32 bits of DMA addressing capability, and other DMA
> > addressing limits exist too (40 bits is also common)
> 
> OK, thank you for that. We will use dma-ranges for this.
> 
> Regards,
> Simon
> 
> >
> >
> >
> >
> > On Tue, 21 Nov 2023 at 12:01, Lean Sheng Tan <sheng.tan@xxxxxxxxxxxxx>
> wrote:
> >>
> >> Added Ard for some input on this.
> >>
> >> Best Regards,
> >> Lean Sheng Tan
> >>
> >>
> >>
> >> 9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
> >> Email: sheng.tan@xxxxxxxxxxxxx
> >> Phone: +49 234 68 94 188
> >> Mobile: +49 176 76 113842
> >>
> >> Registered office: Bochum
> >> Commercial register: Amtsgericht Bochum, HRB 17519
> >> Management: Sebastian German, Eray Bazaar
> >>
> >> Data protection information according to Art. 13 GDPR
> >>
> >>
> >> On Tue, 14 Nov 2023 at 23:17, Simon Glass <sjg@xxxxxxxxxxxx> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Some devices do not support DMA above 4GB. Is there a way to express
> >>> this in the devicetree?
> >>>
> >>> Should we add sometimes a 'no-dma-above-4g' property?
> >>>
> >>> Or should we be using dma-ranges for this?
> >>>
> >>> Regards,
> >>> Simon
> >>>




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux