All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuri Frolov <crashing.kernel@gmail.com>
To: James Hogan <james.hogan@mips.com>
Cc: linux-mips@linux-mips.org, paul.burton@mips.com
Subject: Re: [P5600 && EVA memory caching question] PCI region
Date: Fri, 22 Dec 2017 12:37:14 +0300	[thread overview]
Message-ID: <8cdb85dc-a8e6-4837-868b-a6702a7014cb@gmail.com> (raw)
In-Reply-To: <20171221134119.GE5027@jhogan-linux.mipstec.com>

>> I'm looking at arch/mips/include/asm//mach-malta/kernel-entry-init.h and
>> there is a definition for SegCtl2:
>>
>>           /* SegCtl2 */
>>           li      t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) |      \
>>                   (6 << MIPS_SEGCFG_PA_SHIFT) |                           \
>>                   (1 << MIPS_SEGCFG_EU_SHIFT)) |                          \
>>                   (((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) |         \
>>                   (4 << MIPS_SEGCFG_PA_SHIFT) |                           \
>>                   (1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
>>
>> it defines, that kernel logical addresses from the range 0x00000000 -
>> 0x7fffffff are unmapped (no tlbs) and dictates, that in order to get a
>> physical address for any logical addresses from 0x00000000 - 0x3fffffff
>> range in kernel space, bits [31:29] of the logical address must be
>> changed to 100,
>> and (again in kernel space) for any logical addresses from 0x40000000 -
>> 0x7fffffff range, bits [31:29] of the logical address must be changed to
>> 110, right?
> yes, the Malta implementation is slightly ugly as it relies on a
> hardware physical memory alias of RAM starting at PA 0x80000000.
>
>> What physical addresses will logical addresses 0x00000000 and 0x20000000
>> be translated in kernel space?.. logical 0x00000000 --> physical
>> 0x80000000, and logical 0x20000000 --> .... 0x80000000 too?
> VA 0x20000000 -> PA 0xa0000000, since seg4 and seg5 are 1GB segments, so
> its only bits 30 and up that can be changed.
Ah, I've got it now.
>   I seem to remember the bit
> corresponding to bit 29 isn't even writable in the SegCtl2 register.
I shoulda read the actual definition of SegCtl2, my bad. I presumed the 
definitions are the same for
SegCtl0 - SegCtl2.
> Does that clarify things?
Yes, absolutely.  Thank you very much!

-- yuri

  reply	other threads:[~2017-12-22  9:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 10:36 [P5600 && EVA memory caching question] PCI region Yuri Frolov
2017-12-06 11:46 ` James Hogan
2017-12-06 11:46   ` James Hogan
2017-12-14 15:03   ` Yuri Frolov
2017-12-14 15:21     ` James Hogan
2017-12-14 15:21       ` James Hogan
2017-12-15 14:05       ` Yuri Frolov
2017-12-15 23:28         ` James Hogan
2017-12-15 23:28           ` James Hogan
2017-12-20 15:11           ` Yuri Frolov
2017-12-21 12:40             ` Yuri Frolov
2017-12-21 12:40               ` Yuri Frolov
2017-12-21 13:41             ` James Hogan
2017-12-21 13:41               ` James Hogan
2017-12-22  9:37               ` Yuri Frolov [this message]
2017-12-22 11:18               ` Yuri Frolov
2017-12-22 11:49                 ` James Hogan
2017-12-22 11:49                   ` James Hogan

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=8cdb85dc-a8e6-4837-868b-a6702a7014cb@gmail.com \
    --to=crashing.kernel@gmail.com \
    --cc=james.hogan@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@mips.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 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.