From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Sandbox question
Date: Mon, 23 Apr 2012 20:39:59 +0200 [thread overview]
Message-ID: <20120423184000.008FD200261@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ1aV723LzF1vnMOArix6DNXFHO-962Y8WQij5-G46226g@mail.gmail.com>
Dear Simon,
In message <CAPnjgZ1aV723LzF1vnMOArix6DNXFHO-962Y8WQij5-G46226g@mail.gmail.com> you wrote:
>
> I did try to start a discussion on the list about how to deal with
> this. One idea was to add a translation function in the md command
> (and potentially then in other code) that converts an effective
> address as seen by U-Boot into one that can be used by the
> architecture. The down side is that all architectures except sandbox
> would have this as a no-op.
I don't see why such a function would be needed. Other architectures
don't need it either. Yes, some architectures use a common, fixed
mapping (like PPC, where physical RAM almost always starts at address
0x0) - but others don't have such a common map- for example on ARM,
there is a wild mix where RAM starts, and basicly every SoC defines
his own mapping.
> I am pretty keen for sandbox memory to start at 0 if possible, since
> it makes test code easier to write if we can make that assumption.
On ARM you don't have this either.
> Also I don't like the idea of different people writing test code with
> different assumptions about the memory map, such that we can't run all
> the tests with the same sandbox config.
Eventually introducing two variables like ramstart and ramend would
solve 90% of the potential issues.
In any case, information returned by commands like bdinfo must be
correct.
> > currently as designed -- this is how the hardware works after all. ?it keeps
> > polling stdin forever and there is no concept of "EOF" in a serial port. ?the
> > reads are also non-blocking, so i'm not sure it's possible to tell when you've
> > got EOF vs read too fast. ?might be able to contingent on stdin being a TTY
> > though.
>
> Yes I think this captures the current situation. We could perhaps add
> some sort of hack to make this work, perhaps with a new CONFIG option
I don't see why we cannot simply read from stdin (or rathr from file
descriptor 0) as usual? You can use standard methods like select()
or poll() to wait for input, which will also inform you about events
like EOF.
> which accepts EOF on input and somehow passes it up the stack, or
> keeps the info in sandbox's state. Another option would be to create a
> special sandbox input device. In any case, it would be nice to
> implement EOF in the console layer for this. Could be related to
> serial cleanup also.
Good point.
Marek, can you please add this to the DM planning?
> It would be worth sorting out these three things. Once we have a bit
> of agreement on which way to go, I'm happy to come up with some
> patches for any that don't have volunteers.
Thanks!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of course there's no reason for it, it's just our policy.
next prev parent reply other threads:[~2012-04-23 18:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 6:41 [U-Boot] Sandbox question Wolfgang Denk
2012-04-23 15:41 ` Mike Frysinger
2012-04-23 17:32 ` Matthias Weisser
2012-04-23 17:39 ` Wolfgang Denk
2012-04-23 17:49 ` Matthias Weisser
2012-04-23 18:30 ` Wolfgang Denk
2012-04-24 9:25 ` Matthias Weißer
2012-04-23 17:58 ` Simon Glass
2012-04-23 18:39 ` Wolfgang Denk [this message]
2012-04-23 18:54 ` Mike Frysinger
2012-04-23 19:03 ` Mike Frysinger
2012-04-23 19:33 ` Wolfgang Denk
2012-04-23 20:57 ` Mike Frysinger
2012-04-23 21:16 ` Mike Frysinger
2012-04-23 21:17 ` Wolfgang Denk
2012-04-23 21:32 ` Mike Frysinger
2012-04-23 21:51 ` [U-Boot] Sandbox: auto exiting on pipe closure Mike Frysinger
2012-08-09 20:39 ` Wolfgang Denk
2012-08-10 0:47 ` Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2013-12-06 23:36 [U-Boot] [PATCH 0/8] Secure boot improvements and test on Beaglebone Black Simon Glass
2013-12-30 7:40 ` [U-Boot] sandbox question TigerLiu at viatech.com.cn
2013-12-31 0:42 ` TigerLiu at viatech.com.cn
2014-01-07 23:58 ` Simon Glass
2014-01-08 0:52 ` TigerLiu at viatech.com.cn
2014-01-08 3:46 ` Abraham Varricatt
2014-01-08 10:30 ` TigerLiu at viatech.com.cn
2011-12-01 16:35 [U-Boot] Sandbox question Andreas Bießmann
2011-12-01 18:13 ` Simon Glass
2011-12-01 19:21 ` Mike Frysinger
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=20120423184000.008FD200261@gemini.denx.de \
--to=wd@denx.de \
--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