linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "wilbur.chan" <wilbur512@gmail.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Can't write value into memory ?(E500 V2)
Date: Thu, 27 Aug 2009 23:53:07 +0800	[thread overview]
Message-ID: <e997b7420908270853i7d4058e1p8ddcfcf8df18486e@mail.gmail.com> (raw)
In-Reply-To: <20090826192030.GA17027@b07421-ec1.am.freescale.net>

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

2009/8/27 Scott Wood <scottwood@freescale.com>

>
> > //check if we successfully store value at 0x400,0000
> >
> > lis r22, 0x400
> > ori r22,r22,0x0
> > lwz r23,0(r22)
> > cmpw r23, 30
>
> The values should not be equal, since you wrote a byte and read back a
> word.
>
> Furthermore, you are storing the constant 30, but are comparing r23 with
> the register r30 (I never liked that aspect of ppc asm syntax -- too
> error prone).  If you want to compare with the constant 30, use "cmpwi".
>
> > beq  print_equal
> >
> > 1: b 1b
> >
> > print_equal:
> >  ...
> > //code end
> >
> > I found that, print_equal was not called ,the whole code seemed  to
> > enter an  infinite loop.
>
> That's because you have an infinite loop in your code, right after "beq
> print_equal".
>
> -Scott
>



Thank you very much.

I am using a SMP E500 v2, and I want CPU0 to write some value to a physical
address, and

wait for CPU1 to read from it.

However, it seemed failed to communicate between CPUs by DRAM..  CPU1 can
not read

the correct value from the address where CPU1 wrote to.

BTW: the physical address is  at 16M .

[-- Attachment #2: Type: text/html, Size: 1746 bytes --]

  reply	other threads:[~2009-08-27 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 14:39 Can't write value into memory ?(E500 V2) wilbur.chan
2009-08-26 19:20 ` Scott Wood
2009-08-27 15:53   ` wilbur.chan [this message]
2009-08-27 15:59     ` Scott Wood
2009-08-27 16:27       ` wilbur.chan
2009-08-27 16:34         ` Scott Wood

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=e997b7420908270853i7d4058e1p8ddcfcf8df18486e@mail.gmail.com \
    --to=wilbur512@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.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).