From: Scott Wood <scottwood@freescale.com>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: ppcdev <linuxppc-dev@ozlabs.org>
Subject: Re: Relocating bootwrapper causes kernel panic
Date: Thu, 5 Aug 2010 12:37:25 -0500 [thread overview]
Message-ID: <20100805123725.63d009b1@schlenkerla.am.freescale.net> (raw)
In-Reply-To: <AANLkTikS3f8q+Kuq8aYX1vhRotfSMHN_S+qKPwrfDn2j@mail.gmail.com>
On Thu, 5 Aug 2010 00:23:17 -0700
Shawn Jin <shawnxjin@gmail.com> wrote:
> >> The flat tree located at 0xbe4300 as the kerne message showed. Why
> >> cannot the kernel access this area? No TLB set for this area?
> >>
> >> <1>Unable to handle kernel paging request for data at address 0xc0be43=
08
> >> <1>Faulting instruction address: 0xc01fdabc
> >> <4>Oops: Kernel access of bad area, sig: 11 [#1]
> >
> > Before the flat tree was accessed, I checked the DTLB and didn't find
> > any entry related to 0xc0be4300. After the exception, I found the
> > following DTLBs.
> >
> > 30 : 02 =A0c0be4000 =A0 4KB ------ -> 00000000
> > 31 : 00 =A0fa000000 =A0 8MB VI-S-M -> fa000000
> >
> > The DTLB#30 doesn't seem right. Why would it map to 0x0? I think this
> > should be something like 00be4000?
Note that the valid bit is clear -- it's not mapping to anything.
> When the early_debug is enabled, the kernel can boot successfully. I
> checked the TLB settings and found the following.
>=20
> 28 : 00 c0000000 8MB V--S-M -> 00000000
> 29 : 00 fa000000 8MB VI-S-M -> fa000000
> 30 : 00 c0800000 8MB V--S-M -> 00800000
> 31 : 14 04919000 ?KB V---WM -> 00e45000
That last entry looks weird... might want to look into that.
> So the kernel can access the dtb at 0xbe4300 because of the pinned down D=
TLB#30.
>=20
> I think the cause is clear now. But how to fix it? Two questions:
> 1. Should this DTLB miss exception properly set a new TLB entry for
> the new dtb address 0xbe4300?
Not if it doesn't find an entry in the page tables.
> 2. If the DTLB miss exception handler is not the right guy to load a
> proper TLB entry, how can I set one entry based on the link_address
> and the address of the flat dt blob?
Given how early in the boot process it is, it's probably going to need
to be handled specially.
-Scott
next prev parent reply other threads:[~2010-08-05 17:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 4:11 Relocating bootwrapper causes kernel panic Shawn Jin
2010-08-05 5:13 ` Shawn Jin
2010-08-05 7:23 ` Shawn Jin
2010-08-05 17:37 ` Scott Wood [this message]
2010-08-05 18:33 ` Shawn Jin
2010-08-05 18:46 ` Scott Wood
2010-08-06 22:49 ` Benjamin Herrenschmidt
2010-08-09 5:55 ` Shawn Jin
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=20100805123725.63d009b1@schlenkerla.am.freescale.net \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=shawnxjin@gmail.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).