All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Multiboot physical and virtual addresses
Date: Wed, 21 Apr 2010 11:33:21 +0200	[thread overview]
Message-ID: <4BCEC661.7040909@gmail.com> (raw)

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

Hello, all. On i386 multiboot requires for paging to be disabled and on
amd64 it will be required to map P=V so physical and virtual adresses
are the same. However on MIPS it's inadequate to ask for bootloader to
set such a mode because to do so one would need to go into mode with TLB
activated and have TLB refill routines. It's much easier to run payload
in "kernel mode" which is easy to use but is not P=V. I suppose on some
platforms it's even not possible to have such an easy mapping at all
(especially openfirmware ones). So we have to decide which values will
be used. I think that it should be virtual for a simple reason that it
allows early startup to directly access the data even if it has no way
of knowing what the v2p map is or before it setup its own paging table.
Then when OS is initialising its own v2p map it should be able to remap
virtual addresses to physical ones. The only problem is that some coders
prefer to create a new v2p map in asm code and coding v2p converter in
asm may be painful.
I think the same applies for MMIO too.
Possible alternatives:
- supply physical addresses
- supply both virtual and physical addresses. OS is able to choose the
one it wants

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

                 reply	other threads:[~2010-04-21  9:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4BCEC661.7040909@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.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 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.