public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Need input: Use Virtual address in commands; add translation/physical
@ 2008-11-26 22:11 Becky Bruce
  2008-11-26 22:52 ` Jerry Van Baren
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Becky Bruce @ 2008-11-26 22:11 UTC (permalink / raw)
  To: u-boot

Folks,

We're going to be seeing more platforms with larger physical addresses  
(PA) than virtual addresses (VA) supported in u-boot, and this kind of  
ruins the current assumption inherent in much of u-boot that VA ==  
PA.  On ppc, we've begin implementing the ability to actually  
translate VAs to PAs and vice-versa.  But this brings up the question  
of, when I type an address on the command line, what exactly am I  
specifying?  Is that a virtual address, or a physical address?

Wolfgang and I talked about this on IRC a bit earlier, and what we're  
proposing is this:

- The addresses taken as arguments to and printed out by current  
commands will be interpreted as virtual addresses.  This will minimize  
the changes required to uboot to get this working, and allows command  
code to dereference the address given directly as a pointer - poking  
around the code, I believe this to be the more common case.  This  
could really go either way - we could specify the physical address  
here, but I think that is more counter to the assumptions of the  
existing code.  Having a VA is slightly awkward in some of the code -  
the flash code comes to mind, but the particular flash code I've  
looked at is so confused with VA vs PA that I don't think it really  
matters which way we go.

- Initially, a xlat (or insert better name here) command-line command  
will be added to give you a PA given a VA, and vice-versa.

- Going forward, commands will be extended to take either a VA or PA  
at the command line, with the syntax for this TBD and per argument  
(i.e. if a command takes multiple addresses, each one can be either a  
va or pa, and they can be intermingled).  The default will remain VA  
if no modifier is specified.

Note that unless your platform actually has enabled configs with VA !=  
PA (which is just MPC8641D at the moment, as far as I know), things  
will look exactly the same as they always have.

Comments? I'm looking for some consensus here before I spend my  
weekend writing a whole bunch of code.

Cheers,
Becky

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-11-27 22:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox