linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul White <pwhite@networkrobots.com>
To: "Justin (Gus) Hurwitz" <ghurwitz@dyndns.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: (allocating non-cachable memory) (or More on the i82596)
Date: Fri, 29 Jun 2001 10:53:35 -0700	[thread overview]
Message-ID: <200106291749.f5THnQ810464@stimpy.networkrobots.com> (raw)
In-Reply-To: <Pine.LNX.3.95.1010629042746.5292E-100000@november.bhjjh.er ols.com>


Justin,

I seen in a previous e-mail that you are using a 4xx proccessor.  I'm assuming
that this processor only has 16 bytes cache lines.  When you went through the
code I sent you, did you change it to only zero out 16 bytes instead of 32?

Also, Make sure in your CPU book that dcbz is the only instruction that
can't be done when data cache is disabled.

You also may want to check arch/ppc/kernel/align.c to make sure it still
simply "returns" from an alignment excepetion caused by a dcbz.  My
tree (base line 2.4.4) has it.  Otherwise, you may want to grep your
code (in the arch/ppc/*, and in include/asm/*) for any other occurences
of dcbz.  Any at bootup time must be replaced with assembly instructions
to zero out the memory locations,  but ones that will happen during runtime
should be OK if your alignment handler ignores them.

Again, be sure to check your CPU manual.  Maybe the 4xx CPU handles
the data cache instructions differently from the 7410.

Also..  Make absolutely sure you made the right changes in the
arch/ppc/mm/init.c file as well.

SInce its crapping out uncompressing the ramdisk, I am assuming
that the copy_pages or copy_tofrom_user stuff isn't working right
(Maybe you still have it zero'ing out 32 bytes instead of 16?)

Paul W.


At 05:16 AM 6/29/2001 -0400, Justin (Gus) Hurwitz wrote:
>On Thu, 28 Jun 2001, Paul White wrote:
>
>>
>> Justin,
>>
>> I was able to get Data cache disabled today, after playing around with it
>> for a while.
>>
>> There were several things I had to do.  Now, I don't recall what CPU you
>> are using, so I'll just tell you what I found with mine.
>>
>> First off, I'm using the 7410, which has 32 byte cache lines.  Note that
the
>> 8xx and such have 16 byte cache lines.  In my manual, under "Enabling
>> and Disabling Data Cache", it states that the dcbz instruction will
cause an
>> alignment exception, and that all others are nop'd.  So the first thing
I did,
>> was search for dcbz throughout my code, and I found two files that had
>> several matches:
>
>I went through and made the same set of changes that you did- I am on a
>603e, so I would expect the L1 cache behaviour to be about the same.
>Indeed, the kernel does boot properly, up until id decompresses the
>ramdisk. I am getting a crc error decompressing the ramdisk, however-
>presumably because of a problem with the caches. I'd like to set the MMU
>to caching inhibited to tighten up the processor's load and store
>ordering. I think that I only need to set this in the pte entries- the
>errors are only occuring after the MMU has been brought up. Irony of
>ironies, I know how to do this with the BATs, but not in the PTEs. It
>looks like there is a field in the PTE struct (in asm/mmu.h), but I can't
>find where that structure is initialised. It looks like, from my
>meandering through the kernel's memory management code that this might wee
>be a good step towards allowing chunks of non cachable memory to be
>allocated.
>
>Thoughts?
>
>--Gus
>
-------------------------------------------------------------
Network Robots, Inc.         /--\               Paul H. White
                           / ____ \
4695 Chabot Dr. #200      / ( oo ) \       Software Developer
Pleasanton, CA 94588     /   ----   \             Engineering
(925) 924-8600           \   ----   /          (925) 580-4883
                          \  V--V  /
                           \      /
                             \--/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2001-06-29 17:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200106281622.f5SGMW810376@stimpy.networkrobots.com>
2001-06-28 10:43 ` (allocating non-cachable memory) (or More on the i82596) Justin (Gus) Hurwitz
     [not found] ` <Pine.LNX.3.95.1010628062229.5112E-100000@november.bhjjh.er ols.com>
2001-06-29  0:13   ` Paul White
2001-06-29  9:16     ` Justin (Gus) Hurwitz
     [not found]     ` <Pine.LNX.3.95.1010629042746.5292E-100000@november.bhjjh.er ols.com>
2001-06-29 17:53       ` Paul White [this message]
2001-06-29 12:11         ` Justin (Gus) Hurwitz
2001-07-01  5:17           ` Dan Malek
2001-06-28 16:28 Paul White
  -- strict thread matches above, loose matches on Subject: below --
2001-06-26 10:22 Justin (Gus) Hurwitz
2001-06-26 21:08 ` jtm
2001-06-28  8:52   ` Justin (Gus) Hurwitz
2001-06-29  7:39   ` Dan Malek
2001-06-29  5:21     ` Justin (Gus) Hurwitz
2001-06-29  6:58     ` Justin (Gus) Hurwitz
2001-07-01  5:04       ` Dan Malek
2001-06-29 16:30     ` jtm
2001-06-29 17:55       ` Paul White
2001-06-29 17:45     ` Paul White
2001-06-29 17:48     ` Paul White
2001-06-29 15:41       ` Matt Porter
2001-07-01  5:07         ` Dan Malek
2001-07-05 10:11         ` Justin (Gus) Hurwitz
2001-07-05 20:00           ` Dan Malek
2001-07-01  5:09       ` Dan Malek
2001-07-01  6:45         ` Paul White

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=200106291749.f5THnQ810464@stimpy.networkrobots.com \
    --to=pwhite@networkrobots.com \
    --cc=ghurwitz@dyndns.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /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).