From: "Pali Rohár" <pali.rohar@gmail.com>
To: Tony Lindgren <tony@atomide.com>, Sebastian Reichel <sre@ring0.de>
Cc: linux-omap@vger.kernel.org, Aaro Koskinen <aaro.koskinen@iki.fi>,
Pavel Machek <pavel@ucw.cz>, Nishanth Menon <nm@ti.com>
Subject: Re: runtime check for omap-aes bus access permission (was: Re: 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot)
Date: Sat, 31 Jan 2015 12:34:40 +0100 [thread overview]
Message-ID: <201501311234.41001@pali> (raw)
In-Reply-To: <20150117174125.GV18552@atomide.com>
[-- Attachment #1: Type: Text/Plain, Size: 4435 bytes --]
On Saturday 17 January 2015 18:41:26 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [150117 09:32]:
> > On Saturday 17 January 2015 18:04:11 Tony Lindgren wrote:
> > > * Pali Rohár <pali.rohar@gmail.com> [150117 01:21]:
> > > > Hello, after playing with aes and non-aes version of
> > > > bootloaders I found out that code which configure L3
> > > > firewall must be in signed X-Loader part. So probably we
> > > > cannot change configuration at runtime...
> > > >
> > > > Tony,
> > > > any idea how to dump L3_PM_ADDR_MATCH_* registers from
> > > > userspace or from kernel? Now I have configured one N900
> > > > with original Nokia X-Loader (where loading omap aes
> > > > driver cause kernel crash) and one N900 with aes
> > > > X-Loader (where loading omap aes driver is working).
> > >
> > > Hmm maybe give the omapconf too a try? It's at:
> > >
> > > https://github.com/omapconf/omapconf
> > >
> > > That uses /dev/mem from userspace, then you can just
> > > ioremap them in the kernel code if you need to do
> > > something during runtime. Probably best to access them
> > > with a syscon mapping from the aes driver.
> > >
> > > Regards,
> > >
> > > Tony
> >
> > https://github.com/omapconf/omapconf/wiki
> >
> > Legacy TI OMAP platforms (OMAP[1-2-3]) are not supported.
>
> Oh OK. Well at least you can look at the code if you want to
> do it from the user space :)
>
> Regards,
>
> Tony
I played with devmem2.c program, but trying to read any of those register caused probably L3 violation
error...
registers:
L3_PM_ERROR_LOG
L3_PM_CONTROL
L3_PM_REQ_INFO_PERMISSION_i
L3_PM_READ_PERMISSION_i
L3_PM_WRITE_PERMISSION_i
L3_PM_ADDR_MATCH_k
protection mechanisms:
PM_RT
PM_GPMC
PM_OCM_RAM
PM_OCM_ROM
PM_IVA2.2
Here is example output for address 0x68010028 (PM_RT L3_PM_CONTROL):
$ devmem2 0x68010028 w
/dev/mem opened.
Memory mapped at address 0xb6f87000.
Bus error
dmesg output:
[ 172.923553] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f87028
[ 172.930664] In-band Error seen by MPU at address 0
[ 172.937408] ------------[ cut here ]------------
[ 172.944061] WARNING: CPU: 0 PID: 612 at drivers/bus/omap_l3_smx.c:166 omap3_l3_app_irq+0xd4/0x118()
[ 172.957733] Modules linked in: wl1251_spi wl1251 crc7 mac80211 cfg80211 isp1704_charger
lis3lv02d_i2c lis3lv02d input_polldev bq2415x_charger si4713 bq27x00_battery v4l2_common videodev
media leds_lp5523 omap_ssi hsi leds_lp55xx_common tsl2563 rtc_twl rx51_battery twl4030_vibra
ff_memless tsc2005 twl4030_wdt omap_wdt
[ 172.987762] CPU: 0 PID: 612 Comm: devmem2 Tainted: G W 3.19.0-rc5+ #297
[ 172.995483] Hardware name: Nokia RX-51 board
[ 173.002960] [<c0012678>] (unwind_backtrace) from [<c0010d44>] (show_stack+0x10/0x14)
[ 173.010589] [<c0010d44>] (show_stack) from [<c0032194>] (warn_slowpath_common+0x84/0xac)
[ 173.018280] [<c0032194>] (warn_slowpath_common) from [<c00321d4>] (warn_slowpath_null+0x18/0x1c)
[ 173.026123] [<c00321d4>] (warn_slowpath_null) from [<c01f30e0>] (omap3_l3_app_irq+0xd4/0x118)
[ 173.034057] [<c01f30e0>] (omap3_l3_app_irq) from [<c0061fd0>] (handle_irq_event_percpu+0xcc/0x294)
[ 173.049987] [<c0061fd0>] (handle_irq_event_percpu) from [<c00621fc>] (handle_irq_event+0x64/0x8c)
[ 173.058441] [<c00621fc>] (handle_irq_event) from [<c0064b9c>] (handle_level_irq+0xcc/0x130)
[ 173.066925] [<c0064b9c>] (handle_level_irq) from [<c0061850>] (generic_handle_irq+0x20/0x30)
[ 173.075592] [<c0061850>] (generic_handle_irq) from [<c0061a38>] (__handle_domain_irq+0x80/0xa4)
[ 173.084411] [<c0061a38>] (__handle_domain_irq) from [<c0008520>] (omap_intc_handle_irq+0x78/0xa4)
[ 173.093383] [<c0008520>] (omap_intc_handle_irq) from [<c0409380>] (__irq_svc+0x40/0x74)
[ 173.102508] Exception stack(0xc6f2ff58 to 0xc6f2ffa0)
[ 173.111755] ff40: 00000000 00000001
[ 173.121154] ff60: 60000010 00000001 c6f2ffb0 00000000 ffffffff 10c5387d 00000000 c6f2e000
[ 173.130554] ff80: 00000000 bea65b44 00000000 c6f2ffa0 c000dc20 c00104a0 20000113 ffffffff
[ 173.140136] [<c0409380>] (__irq_svc) from [<c00104a0>] (do_work_pending+0x34/0xb4)
[ 173.149902] [<c00104a0>] (do_work_pending) from [<c000dc20>] (work_pending+0xc/0x20)
[ 173.159759] ---[ end trace 124b6fccc1bf5a71 ]---
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2015-01-31 11:34 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 21:36 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot Sebastian Reichel
2013-12-06 22:27 ` Tony Lindgren
2013-12-07 0:00 ` Sebastian Reichel
2013-12-07 0:38 ` Tony Lindgren
2013-12-07 8:18 ` Pali Rohár
2013-12-07 13:48 ` Sebastian Reichel
2013-12-07 13:57 ` Pali Rohár
2013-12-07 16:51 ` Tony Lindgren
2013-12-07 17:53 ` Tony Lindgren
2013-12-07 18:49 ` runtime check for omap-aes bus access permission (was: Re: 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot) Sebastian Reichel
2013-12-07 21:11 ` Tony Lindgren
2013-12-07 23:03 ` Sebastian Reichel
2013-12-07 23:22 ` Tony Lindgren
2014-09-08 23:45 ` Pali Rohár
2014-11-25 21:08 ` Pali Rohár
2014-11-25 21:31 ` Pali Rohár
2014-11-26 17:54 ` Tony Lindgren
2015-01-17 9:18 ` Pali Rohár
2015-01-17 17:04 ` Tony Lindgren
2015-01-17 17:29 ` Pali Rohár
2015-01-17 17:41 ` Tony Lindgren
2015-01-31 11:34 ` Pali Rohár [this message]
2015-01-31 15:13 ` Matthijs van Duin
2015-01-31 19:06 ` Pali Rohár
2015-02-11 12:39 ` Pali Rohár
2015-02-11 15:22 ` Matthijs van Duin
2015-02-11 20:28 ` Pali Rohár
2015-02-11 20:33 ` Tony Lindgren
2015-02-11 20:40 ` Nishanth Menon
2015-02-18 21:14 ` Pali Rohár
2015-05-28 7:37 ` Pali Rohár
2015-05-28 16:01 ` Tony Lindgren
2015-05-28 20:26 ` Matthijs van Duin
2015-05-28 22:24 ` Tony Lindgren
2015-05-28 22:27 ` Pali Rohár
2015-05-29 0:15 ` Tony Lindgren
2015-05-29 0:58 ` Matthijs van Duin
2015-05-29 1:35 ` Matthijs van Duin
2015-05-29 15:50 ` Tony Lindgren
2015-05-29 18:16 ` Tony Lindgren
2015-05-30 15:22 ` Matthijs van Duin
2015-06-01 17:58 ` Tony Lindgren
2015-06-01 20:32 ` Matthijs van Duin
2015-06-01 20:52 ` Tony Lindgren
2015-06-02 4:21 ` Matthijs van Duin
2015-02-19 18:20 ` Pali Rohár
2015-02-19 20:25 ` Matthijs van Duin
2015-02-19 21:10 ` Aaro Koskinen
2015-01-24 10:40 ` Pali Rohár
2015-01-31 14:38 ` Matthijs van Duin
2015-01-31 19:09 ` Pali Rohár
2015-02-01 1:36 ` Matthijs van Duin
2015-02-01 8:56 ` Pali Rohár
2015-02-11 20:43 ` Pavel Machek
2015-02-11 21:14 ` Pali Rohár
2015-02-09 11:55 ` 3.13-rc3 (commit 7ce93f3) breaks Nokia N900 DT boot Pali Rohár
2013-12-08 14:13 ` Aaro Koskinen
2013-12-08 16:40 ` Tony Lindgren
2013-12-08 17:10 ` Sebastian Reichel
2013-12-08 17:43 ` Tony Lindgren
2013-12-08 17:59 ` Aaro Koskinen
2013-12-08 18:09 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201501311234.41001@pali \
--to=pali.rohar@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=pavel@ucw.cz \
--cc=sre@ring0.de \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).