Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: cgd@broadcom.com
Cc: gdb-patches@sources.redhat.com, fche@redhat.com, echristo@redhat.com
Subject: Re: MIPS simulator initializes LSI pmon vector table with code
Date: Fri, 19 Apr 2002 14:07:00 -0000	[thread overview]
Message-ID: <ory9fjmm91.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <yov5vgaor5ky.fsf@broadcom.com>

On Apr 18, 2002, cgd@broadcom.com wrote:

> The code at 0xbfc00200, etc., _ARE_ supposed to be code; in MIPS
> they're various exception entry points.  If they are data which is
> invalid code, the wrong thing will almost certainly happen.

Ok, so could you please explain to me how these two chunks of code can
possibly be correct:

	if (lsipmon_monitor_base != 0)
	  {
	    address_word vaddr = (lsipmon_monitor_base + (loop * 4));
	    sim_write (sd, vaddr, (char *)&value, sizeof (value));
	  }

(where lsipmon_monitor_base is 0xBFC00200, and loop varies from 0 to
23.  I read that as writing pointers into lsipmon_monitor_base)

      sim_write (sd, 0xBFC00200, (char *) halt, sizeof (halt));
      sim_write (sd, 0xBFC00380, (char *) halt, sizeof (halt));
      sim_write (sd, 0xBFC00400, (char *) halt, sizeof (halt));

(where halt is 64-byte long chunk of code, which means that one of
these halts overwrites not only its own entry in lsipmon_monitor_base,
but also the following entry.)

> I cannot believe that any monitor does what you describe (puts a table
> of addresses here), as doing so (instead of putting vectors there)
> would be fundamentally incompatible with the MIPS architecture.

I stand corrected.  It doesn't write pointers into chose chunks.  I
misremembered what I had seen.  The values of `value' that are written
in the first chunk of code as numbers that range from 6 to 28, except
for the printf service.  However, I don't see how a code sequence that
halts the machine could possibly fit there as an entry in the vector
table.

Enlightenment would be appreciated.

Thanks,

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


  parent reply	other threads:[~2002-04-19 21:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-18 12:46 Alexandre Oliva
2002-04-18 13:44 ` Andrew Cagney
2002-04-19 14:00   ` Alexandre Oliva
     [not found] ` <mailpost.1019159224.1687@news-sj1-1>
2002-04-18 15:43   ` cgd
     [not found]     ` <1019238909.1702.35.camel@ghostwheel.cygnus.com>
     [not found]       ` <yov54ri7pnbe.fsf@broadcom.com>
2002-04-19 11:36         ` Eric Christopher
2002-04-19 12:06           ` cgd
2002-04-19 12:48             ` Eric Christopher
2002-04-19 14:07     ` Alexandre Oliva [this message]
2002-04-19 15:32       ` cgd
2002-04-22 12:09         ` Alexandre Oliva
2002-04-22 12:30           ` cgd
2002-04-23 18:24             ` Alexandre Oliva
     [not found]               ` <mailpost.1019611460.15770@news-sj1-1>
2002-04-24 11:19                 ` cgd
2002-04-20  9:43 ` Andrew Cagney

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=ory9fjmm91.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=cgd@broadcom.com \
    --cc=echristo@redhat.com \
    --cc=fche@redhat.com \
    --cc=gdb-patches@sources.redhat.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