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] [thread-next>] [day] [month] [year] [list]
Message-Id: <201303311128.12698@pali>
Date:	Sun, 31 Mar 2013 11:28:12 +0200
From:	Pali Rohár <pali.rohar@...il.com>
To:	Tony Lindgren <tony@...mide.com>
Cc:	Juha Yrjola <juha.yrjola@...idboot.com>,
	Russell King <linux@....linux.org.uk>,
	Matt Mackall <mpm@...enic.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	Ивайло Димитров 
	<freemangordon@....bg>
Subject: Re: [PATCH] OMAP3 ROM Random Number Generator support

On Thursday 28 March 2013 22:44:11 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@...il.com> [130328 10:58]:
> > Here is new version of patch:
> > 
> > --- a/arch/arm/mach-omap2/devices.c
> > +++ b/arch/arm/mach-omap2/devices.c
> > @@ -486,6 +486,23 @@ static void omap_init_mcspi(void)
> > 
> >  static inline void omap_init_mcspi(void) {}
> >  #endif
> > 
> > +extern u32 *omap3_rom_rng_call(u32 id, u32 proc, u32 flags,
> > u32 va_ptr); +
> > +static struct platform_device omap3_rom_rng_device = {
> > +	.name		= "omap3-rom-rng",
> > +	.id		= -1,
> > +	.dev	= {
> > +		.platform_data	= omap3_rom_rng_call,
> > +	},
> > +};
> > +
> > +static void omap_init_rom_rng(void)
> > +{
> > +	if (!cpu_is_omap34xx() || omap_type() ==
> > OMAP2_DEVICE_TYPE_GP) +		return;
> > +	platform_device_register(&omap3_rom_rng_device);
> > +}
> > +
> > 
> >  /**
> >  
> >   * omap_init_rng - bind the RNG hwmod to the RNG
> >   omap_device *
> 
> This driver probably only works on Nokia boards because of the
> different SMC call numbering. Until it's been verified on some
> other HS omap34xx, I'd probably register this only from the
> Nokia board-*.c file.
> 

Freemangordon, can you look at this smc and errara 430973 code if 
they could be merged? Really omap3_rom_rng_call function looks 
like n900 specific.

Link: https://lkml.org/lkml/2013/3/28/398

> > --- /dev/null
> > +++ b/drivers/char/hw_random/omap3-rom-rng.c
> > +static int omap3_rom_rng_probe(struct platform_device
> > *pdev) +{
> > +	printk(KERN_INFO "%s: initializing\n",
> > omap3_rom_rng_name); +
> > +	omap3_rom_rng_call = pdev->dev.platform_data;
> > +	if (!omap3_rom_rng_call) {
> > +		printk(KERN_ERR "%s: omap3_rom_rng_call is NULL\n",
> > +		       omap3_rom_rng_name);
> > +		return -EINVAL;
> > +	}
> > +
> > +	setup_timer(&idle_timer, omap3_rom_idle_rng, 0);
> > +	rng_clk = clk_get_sys("omap_rng", "ick");
> > +	if (IS_ERR(rng_clk)) {
> > +		printk(KERN_ERR "%s: unable to get RNG clock\n",
> > +		       omap3_rom_rng_name);
> > +		return IS_ERR(rng_clk);
> > +	}
> 
> You can use regular clk_get if you add the alias to
> struct omap_clk omap3xxx_clks table.
> 
> Regards,
> 
> Tony

Tony, can you show me how?

-- 
Pali Rohár
pali.rohar@...il.com

Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ