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: Thu, 27 Jun 2024 02:31:16 +0000
From: Jason-ch Chen (陳建豪)
	<Jason-ch.Chen@...iatek.com>
To: "mathieu.poirier@...aro.org" <mathieu.poirier@...aro.org>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
	"jason-ch.chen@...iatek.corp-partner.google.com"
	<jason-ch.chen@...iatek.corp-partner.google.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, "andersson@...nel.org" <andersson@...nel.org>
Subject: Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size

Hi Mathieu,

Sorry for the late response.

On Mon, 2024-06-10 at 10:34 -0600, Mathieu Poirier wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Thu, Jun 06, 2024 at 01:00:11PM +0200, AngeloGioacchino Del Regno
> wrote:
> > Il 06/06/24 11:06, jason-ch chen ha scritto:
> > > From: Jason Chen <Jason-ch.Chen@...iatek.com>
> > > 
> > > Increase MT8188 SCP core0 DRAM size for HEVC driver.
> 
> This is telling me _what_ gets done rather than _why_ it gets done.
> 
I will modify the commit message in the next version.

> > > 
> > 
> > ....so the second core only gets a maximum of 0x200000 of SRAM?
> > I'm not sure how useful is the secondary SCP core, at this point,
> with so little
> > available SRAM but... okay, as you wish.
> > 
> > Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@...labora.com>
> > 
> > 
> > > Signed-off-by: Jason Chen <Jason-ch.Chen@...iatek.com>
> > > ---
> > >   drivers/remoteproc/mtk_scp.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/remoteproc/mtk_scp.c
> b/drivers/remoteproc/mtk_scp.c
> > > index b885a9a041e4..2119fc62c3f2 100644
> > > --- a/drivers/remoteproc/mtk_scp.c
> > > +++ b/drivers/remoteproc/mtk_scp.c
> > > @@ -1390,7 +1390,7 @@ static const struct mtk_scp_sizes_data
> default_scp_sizes = {
> > >   };
> > >   static const struct mtk_scp_sizes_data mt8188_scp_sizes = {
> > > -.max_dram_size = 0x500000,
> > > +.max_dram_size = 0x800000,
> 
> Do you require to fix a "reserved-memory" node in a device tree file
> to account
> for this?

Using a "reserved-memory" node to calculate max_dram_size presents
challenges due to alignment requirements in dma_alloc_coherent().

For example, 

static const struct mtk_scp_sizes_data mt8188_scp_c1_sizes = {
        .max_dram_size = 0xA00000,
        .ipi_share_buffer_size = 600,
};

We require 2560 pages (10M) for SCP core1 usage, but alignment
constraints necessitate searching for a free region of 2^12 pages
(16M). This misalignment between the reserved 10M and the required 16M
prevents successful allocation.

Adjusting the reserved memory to 16M for core1 would lead to a 6M
wastage. To avoid this, reserving a larger memory block is advisable.
This block can be partially used by SCP core1, with the remainder
allocated to feature drivers. Consequently, setting the max_dram_size
in SCP configurations is a practical solution to meet these
requirements.

Thanks,
Jason
> 
> Thanks,
> Mathieu
> 
> > >   .ipi_share_buffer_size = 600,
> > >   };
> > 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ