Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Alex Gonzalez <langabe@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: Kernel space access to 2GB of physical memory
Date: Thu, 2 Aug 2007 23:23:07 +0100	[thread overview]
Message-ID: <20070802222307.GA12056@linux-mips.org> (raw)
In-Reply-To: <c58a7a270708020647q7a0c55f4l6904e864609c7304@mail.gmail.com>

On Thu, Aug 02, 2007 at 02:47:37PM +0100, Alex Gonzalez wrote:

> I have a system booting the 2.6.12-rc3 32bits kernel on an RM9000
> processor and I am trying to get my head around how to access up to
> 2GB of physical memory with a mem=256MB command line booting
> parameter. I read that on the MIPS kernel this is split 2GB/2GB
> between kernel and user space, so the kernel should be able to access
> directly 2GB of physical memory.

No.  You assume there is nothing else in the 2GB of kernel address space.

> Kernel drivers will access the memory above 256MB using ioremaps. I
> need it this way as the memory above 256MB will be used in special
> ways.
>
> What I struggle to understand is whether it would be possible to
> access all the memory up to 2GB using the ioremap method.

Ioremap is meant to be used for MMIO regions only.

> The only way I can think of achieving this would be to use ksseg and
> dynamic TLB entries to access it in 256MB chunks. The fact that I can
> access ksseg must mean that the kernel is not clearing the TLB entries
> that the bootloader sets up before launching the kernel, so I would
> expect to be able to add/remove TLB entries dynamically without
> affecting the kernel's own memory management.
> 
> 1) Is there a simpler mechanism to achieve this?

It's called 64-bit kernel.

> 2) Any ill effect on the kernel from the method described above?

You're basically reinventing high memory in an application optimized
variant and that probably includes a similar set of problems.

  Ralf

      reply	other threads:[~2007-08-03 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02 13:47 Kernel space access to 2GB of physical memory Alex Gonzalez
2007-08-02 22:23 ` Ralf Baechle [this message]

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=20070802222307.GA12056@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=langabe@gmail.com \
    --cc=linux-mips@linux-mips.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