lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Jan 2020 11:30:19 +0800
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     Paul Burton <paulburton89@...il.com>
Cc:     "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        "chenhc@...ote.com" <chenhc@...ote.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "hch@....de" <hch@....de>
Subject: Re: [PATCH 2/2] MIPS: Loongson64: Add dma iocoherency detection support



14.01.2020, 02:52, "Paul Burton" <paulburton89@...il.com>:
> Hi Jiaxun,
>
> On Mon, Jan 13, 2020 at 10:07:05PM +0800, Jiaxun Yang wrote:
>>  diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
>>  index 8c286bedff3e..2da2be40ad81 100644
>>  --- a/arch/mips/include/asm/mach-loongson64/boot_param.h
>>  +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
>>  @@ -115,7 +115,8 @@ struct irq_source_routing_table {
>>           u64 pci_io_start_addr;
>>           u64 pci_io_end_addr;
>>           u64 pci_config_addr;
>>  - u32 dma_mask_bits;
>>  + u16 dma_mask_bits;
>>  + u16 dma_noncoherent;
>>   } __packed;
>
> This struct is generated by the firmware, right? So does this change
> require that firmware be updated along with the kernel? Or was the
> kernel's definition always incorrect/incomplete?
Hi Paul,

This define added to the firmware by 2013 but somehow never upstream.
That's what Loongson always doing.

Some versions of Loongson-3B1500 failed to maintain DMA coherent.
So they add this parameter to the firmware.
As the maximum dma_mask_bits is 64, the upper 16bit of the old u32 will always
be zero. Which means coherent DMA transformed into the new definition,
that's the expected default behavior. Thus it's safe to do so even if firmware
doesn't understand this parameter.

Thanks

>
> Thanks,
>     Paul
--
Jiaxun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ