All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Dan Malek <ppc6dev@digitaldans.com>,
	Bob Cochran <ppc@mindchasers.com>, Support <support@abatron.ch>
Subject: Re: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL
Date: Fri, 1 Jun 2012 00:35:41 +0200	[thread overview]
Message-ID: <OFDC3DAEDA.27E0B532-ONC1257A0F.007BF637-C1257A0F.007C1E26@transmode.se> (raw)
In-Reply-To: <4FC7EDD5.8090302@freescale.com>

Scott Wood <scottwood@freescale.com> wrote on 2012/06/01 00:16:53:
>
> On 05/31/2012 05:14 PM, Joakim Tjernlund wrote:
> > Scott Wood <scottwood@freescale.com> wrote on 2012/05/31 23:43:34:
> >>
> >> On 05/31/2012 04:38 PM, Joakim Tjernlund wrote:
> >>> Scott Wood <scottwood@freescale.com> wrote on 2012/05/31 19:47:53:
> >>>>
> >>>> On 05/31/2012 04:56 AM, Joakim Tjernlund wrote:
> >>>>> Abatron Support <support@abatron.ch> wrote on 2012/05/31 11:30:57:
> >>>>>>
> >>>>>>
> >>>>>>> Abatron Support <support@abatron.ch> wrote on 2012/05/30 14:08:26:
> >>>>>>>>
> >>>>>>>>>> I have tested this briefly with BDI2000 on P2010(e500) and
> >>>>>>>>>> it works for me. I don't know if there are any bad side effects,
> >>>>>>>>>> therfore
> >>>>>>>>>> this RFC.
> >>>>>>>>
> >>>>>>>>> We used to have MSR_DE surrounded by CONFIG_something
> >>>>>>>>> to ensure it wasn't set under normal operation.  IIRC, if MSR_DE
> >>>>>>>>> is set, you will have problems with software debuggers that
> >>>>>>>>> utilize the the debugging registers in the chip itself.  You only want
> >>>>>>>>> to force this to be set when using the BDI, not at other times.
> >>>>>>>>
> >>>>>>>> This MSR_DE is also of interest and used for software debuggers that
> >>>>>>>> make use of the debug registers. Only if MSR_DE is set then debug
> >>>>>>>> interrupts are generated. If a debug event leads to a debug interrupt
> >>>>>>>> handled by a software debugger or if it leads to a debug halt handled
> >>>>>>>> by a JTAG tool is selected with DBCR0_EDM / DBCR0_IDM.
> >>>>>>>>
> >>>>>>>> The "e500 Core Family Reference Manual" chapter "Chapter 8
> >>>>>>>> Debug Support" explains in detail the effect of MSR_DE.
> >>>>>>
> >>>>>>> So what is the verdict on this? I don't buy into Dan argument without some
> >>>>>>> hard data.
> >>>>>>
> >>>>>> What I tried to mention is that handling the MSR_DE correct is not only
> >>>>>> an emulator (JTAG debugger) requirement. Also a software debugger may
> >>>>>> depend on a correct handled MSR_DE bit.
> >>>>>
> >>>>> Yes, that made sense to me too. How would SW debuggers work if the kernel keeps
> >>>>> turning off MSR_DE first chance it gets?
> >>>>
> >>>> The kernel selectively enables MSR_DE when it wants to debug.  I'm not
> >>>> sure if anything will be bothered by leaving it on all the time.  This
> >>>> is something we need for virtualization as well, so a hypervisor can
> >>>> debug the guest.
> >>>
> >>> hmm, I read that as you as in favour of the patch?
> >>
> >> I'd want some confirmation that it doesn't break anything, and that
> >> there aren't any other places that need MSR_DE that this doesn't cover,
> >> but in general yes.
> >
> > Then you need to test drive the patch :)
>
> I was thinking more along the lines of someone who's more familiar with
> the relevant parts of the code confirming that it's really OK, not just
> testing that it doesn't blow up in my face.

It just occurred to me that you guys have this already in your Linux SDK so it can't be that bad.

 Jocke

  parent reply	other threads:[~2012-05-31 22:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30  7:43 [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL Joakim Tjernlund
2012-05-30  7:59 ` Dan Malek
2012-05-30 12:08   ` Re[2]: " Abatron Support
2012-05-31  9:05     ` Joakim Tjernlund
2012-05-31  9:30       ` Re[4]: " Abatron Support
2012-05-31  9:56         ` Joakim Tjernlund
2012-05-31 17:47           ` Scott Wood
2012-05-31 21:38             ` Joakim Tjernlund
2012-05-31 21:43               ` Scott Wood
2012-05-31 22:14                 ` Joakim Tjernlund
2012-05-31 22:16                   ` Scott Wood
2012-05-31 22:33                     ` Joakim Tjernlund
2012-05-31 22:35                     ` Joakim Tjernlund [this message]
2012-07-20  8:27                       ` Zang Roy-R61911
2012-07-20  8:37                         ` Joakim Tjernlund
2013-06-25  0:51                           ` Scott Wood
2013-06-25  6:00                             ` Joakim Tjernlund
2013-06-26 21:42                               ` Scott Wood
2012-06-01  9:12       ` Re[2]: " Benjamin Herrenschmidt
2012-06-01 10:34         ` Joakim Tjernlund
2012-05-30 13:26 ` Bob Cochran
2012-06-01  9:14   ` Benjamin Herrenschmidt
2012-06-01 10:38     ` Joakim Tjernlund
2012-06-01 16:28     ` Scott Wood
2012-06-01 22:30       ` Benjamin Herrenschmidt
2012-06-01 22:42         ` Scott Wood
2012-06-01 23:24           ` Benjamin Herrenschmidt
2012-06-02 18:29             ` Joakim Tjernlund
2012-06-02 21:21               ` Benjamin Herrenschmidt
2012-06-03  9:20                 ` Joakim Tjernlund
2012-06-04  9:06                 ` Joakim Tjernlund
     [not found]                 ` <OF7810EBD9.B191A242-ONC1257A13.0031E9E3-C1257A13.00320D10@LocalDomain>
2012-07-11 14:24                   ` Joakim Tjernlund
2012-07-11 14:45                     ` Kumar Gala

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=OFDC3DAEDA.27E0B532-ONC1257A0F.007BF637-C1257A0F.007C1E26@transmode.se \
    --to=joakim.tjernlund@transmode.se \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ppc6dev@digitaldans.com \
    --cc=ppc@mindchasers.com \
    --cc=scottwood@freescale.com \
    --cc=support@abatron.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.