From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Need input: Use Virtual address in commands; add translation/physical
Date: Wed, 26 Nov 2008 20:39:29 -0500 [thread overview]
Message-ID: <492DFA51.4020003@gmail.com> (raw)
In-Reply-To: <20081126231827.83148834B020@gemini.denx.de>
Wolfgang Denk wrote:
> Dear Jerry,
>
> In message <492DD314.7070700@gmail.com> you wrote:
>> How would xlat know which direction it is to translate?
>
> From the argument that is passed to it:
>
> xlat 1234
> or
> xlat 0x1234
>
> are taken as VA's (see discussion about default address
> interpretation), so "xlat" will print the PA.
>
> xlat 1234.p
> or
> xlat 0x1234.p
>
> has a PA as argument, so it prints the VA.
>
> Multiple arguments (even mixed) might be allowed, too, for example:
>
> xlat 1234 1234.p 5678 5678.p
Ooo, I think the answer to that xlat would make my head hurt.
>> Thoughts:
>> vtop(virtual) returns physical
>> ptov(physical) returns virtual
>> or (see below thought on 0v / 0p)
>> xlat(0p1234) returns virtual
>> xlat(0v1234) returns physical
>> xlat(0x1234) returns physical (per convention from snipped discussion)
>
> Seems too complex for a simple mind like mine ;-)
Ah, we are on the same page here with xlat except I had spurious
parenthesis (brain was working in C mode, not bash mode) and I used
0v/0p instead of .v .p.
[snip]
>> Thought:
>> 0v6789ABCD is a virtual address (the value is interpreted as hex)
>> 0p6789ABCD is a physical address
>>
>> Of course "v" and "p" should be accepted in either case.
>>
>> Kinda ugly, but fits into the 0x style conventions.
>
> I tend to allow for suffixes, i. e. "6789ABCD" or "6789ABCD.v" are
> VAs, while "6789ABCD.p" is a PA.
>
> To me, that is easier to read.
Agreed. The .[0-9a-z] suffix is a convention already used by u-boot and
is much more readable than my 0v and 0p proposal.
[snip]
> Best regards,
>
> Wolfgang Denk
Thanks,
gvb
next prev parent reply other threads:[~2008-11-27 1:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 22:11 [U-Boot] Need input: Use Virtual address in commands; add translation/physical Becky Bruce
2008-11-26 22:52 ` Jerry Van Baren
2008-11-26 23:18 ` Wolfgang Denk
2008-11-27 1:39 ` Jerry Van Baren [this message]
2008-11-26 23:12 ` Andrew Dyer
2008-11-26 23:22 ` Wolfgang Denk
2008-11-27 17:06 ` Andrew Dyer
2008-11-27 22:15 ` Wolfgang Denk
2008-11-27 6:31 ` Stefan Roese
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=492DFA51.4020003@gmail.com \
--to=gvb.uboot@gmail.com \
--cc=u-boot@lists.denx.de \
/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