From: Max Filippov <jcmvbkbc@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/8] xtensa: add support for the xtensa processor architecture [1/2]
Date: Fri, 15 Jul 2016 00:55:05 +0300 [thread overview]
Message-ID: <20160714215505.GA31001@octofox.metropolis> (raw)
In-Reply-To: <CAPnjgZ15zjy6g96CEzy2vyFDCFDB73gtupkwN7TGO2GnSF8-0Q@mail.gmail.com>
Hi Simon,
On Tue, Jul 12, 2016 at 03:56:01PM -0600, Simon Glass wrote:
> On 8 July 2016 at 09:41, Max Filippov <jcmvbkbc@gmail.com> wrote:
> > From: Chris Zankel <chris@zankel.net>
> >
> > The Xtensa processor architecture is a configurable, extensible,
> > and synthesizable 32-bit RISC processor core provided by Cadence.
> >
> > This is the first part of the basic architecture port with changes to
> > common files. The 'arch/xtensa' directory, and boards and additional
> > drivers will be in separate commits.
> >
> > Signed-off-by: Chris Zankel <chris@zankel.net>
> > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> > ---
> > MAINTAINERS | 5 +++
> > MAKEALL | 6 +++
> > Makefile | 10 ++++-
> > cmd/bdinfo.c | 22 ++++++++++
> > common/board_f.c | 7 ++--
> > common/image.c | 1 +
> > doc/README.xtensa | 100 ++++++++++++++++++++++++++++++++++++++++++++
> > examples/standalone/stubs.c | 47 +++++++++++++++++++++
> > include/image.h | 1 +
> > include/linux/stat.h | 4 +-
> > 10 files changed, 197 insertions(+), 6 deletions(-)
> > create mode 100644 doc/README.xtensa
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Thanks for the review.
[...]
> > diff --git a/MAKEALL b/MAKEALL
> > index 7e42f10..e669aa9 100755
> > --- a/MAKEALL
> > +++ b/MAKEALL
>
> This is deprecated and will be removed soon, so you don't need to
> update it. See buildman.
Ok.
[...]
> > diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> > index 1c4bed9..076b950 100644
> > --- a/cmd/bdinfo.c
> > +++ b/cmd/bdinfo.c
> > @@ -563,6 +563,28 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> > return 0;
> > }
> >
> > +#elif defined(CONFIG_XTENSA)
> > +
> > +int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> > +{
> > + bd_t *bd = gd->bd;
> > +
> > + print_num("boot_params", (ulong)bd->bi_boot_params);
> > + print_num("memstart", (ulong)bd->bi_memstart);
> > + print_lnum("memsize", (u64)bd->bi_memsize);
> > + print_num("flashstart", (ulong)bd->bi_flashstart);
> > + print_num("flashsize", (ulong)bd->bi_flashsize);
> > + print_num("flashoffset", (ulong)bd->bi_flashoffset);
> > +
> > +#if defined(CONFIG_CMD_NET)
> > + print_eth(0);
> > + printf("ip_addr = %s\n", getenv("ipaddr"));
> > +#endif
> > + printf("baudrate = %d bps\n", gd->baudrate);
>
> It would be great if you could put this in a common function so that
> other archs can call it. There is a lot of duplication in this file.
Ok, let me look at that.
[...]
> > diff --git a/doc/README.xtensa b/doc/README.xtensa
> > new file mode 100644
> > index 0000000..a461714
> > --- /dev/null
> > +++ b/doc/README.xtensa
[...]
> > +The header files for one particular processor configuration are inside
> > +a variant specific directory located in the arch/xtensa/include/asm
>
> variant-specific
Ok.
[...]
> > +Windowed ABI presents unique difficulties with the approach based on
> > +keeping global data pointer in dedicated register. Because the register
> > +window rotates during a call, there is no register that is constantly
> > +available for the gd pointer. Therefore, a global variable is used in
> > +the same manner as i386.
>
> Or you could make gd a simple global variable. It you keep it in the
> data section that should work.
gd is a simple global variable on xtensa, I haven't actually checked
what 'in the same manner as i386' means now. Will fix wording.
[...]
> > +U-Boot for Xtensa provides a special memory exception handler to prevent
> > +hanging. The memory exception handler simply skips over the offending
> > +instruction. It is called for all memory exception causes that might
> > +be triggered by bad user input. While this is simplistic, it's better
> > +than hanging in most cases, while keeping U-Boot small and simple.
>
> Wouldn't it be better to print an exception message? See for example
> ARM's do_prefetch_abort().
I see that on ARM such errors result in panic and reset. Sure I can do
that if that's the preferred way of dealing with such errors.
--
Thanks.
-- Max
next prev parent reply other threads:[~2016-07-14 21:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 15:41 [U-Boot] [PATCH v2 0/8] U-Boot port to Xtensa architecture Max Filippov
2016-07-08 15:41 ` [U-Boot] [PATCH 1/8] xtensa: add support for the xtensa processor architecture [1/2] Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 21:55 ` Max Filippov [this message]
2016-07-08 15:42 ` [U-Boot] [PATCH 2/8] xtensa: add support for the xtensa processor architecture [2/2] Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 22:58 ` Max Filippov
2016-07-15 0:20 ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 3/8] xtensa: add core information for the dc232b processor Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 23:15 ` Max Filippov
2016-07-15 0:20 ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 4/8] xtensa: add core information for the dc233c processor Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 23:19 ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 5/8] xtensa: add core information for the de212 processor Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 23:20 ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 6/8] net/ethoc: support private memory configurations Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 23:34 ` Max Filippov
2016-07-15 0:20 ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 7/8] net/ethoc: don't advertise gigabit on the connected PHY Max Filippov
2016-07-12 21:56 ` Simon Glass
2016-07-14 23:41 ` Max Filippov
2016-07-13 6:28 ` Michal Simek
2016-07-14 23:51 ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 8/8] xtensa: add support for the 'xtfpga' evaluation board Max Filippov
2016-07-12 21:57 ` Simon Glass
2016-07-15 0:13 ` Max Filippov
2016-07-13 6:35 ` Michal Simek
2016-07-15 0:04 ` Max Filippov
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=20160714215505.GA31001@octofox.metropolis \
--to=jcmvbkbc@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