mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH] ARM: Add support for semihosting
Date: Wed, 21 Oct 2015 09:26:43 +0200	[thread overview]
Message-ID: <20151021072643.GA14476@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqH=X8gACCkY5rnmg+y46za1zRD6bjk9j2x8PoWC+0LJjA@mail.gmail.com>

On Tue, Oct 20, 2015 at 06:14:19PM -0700, Andrey Smirnov wrote:
> >> +Not all of the I/O primitives neccessary to implement a full
> >> +filesystem are exposed in ARM semihosting API and because of that some
> >> +aspects of filesystem funcionality are missing. Implementation does
> >> +not have support for listing directories. This means a
> >> +:ref:`command_ls` to a SMHFS-mounted path will show an empty
> >> +directory. Nevertheless, the files are there.
> >
> > Is adding ls support a matter of implementing it? Does the semihosting
> > protocol support ls?
> 
> Unfortunately the protocol doesn't support any directory related
> operations.

What a pitty.

> It is possible to implement custom semihosting "syscalls"
> and it wouldn't be that hard to add support of those to OpenOCD, but
> that would leave out other debugging tools.

Would be nice to have, but not worth the hassle of creating custom
extensions to the spec.

> 
> 
> >
> >> +
> >> +Example::
> >> +
> >> +  mount -t smhfs /dev/null /mnt/smhfs
> >
> > Are actions on the host required to do that? Maybe some example for
> > using this with openocd would be useful.
> 
> I completely forgot to add that to the documentation. Will fix that in
> the next version of the patch.
> 
> >> +
> >> +     if (semihosting_remove(pathname) != 0)
> >> +             return semihosting_errno();
> >
> > Are the errnos semihosting returns compatible with the barebox errnos?
> 
> I can't speak for any implementation other that OpenOCD's, but what
> that tool does is it returns the value of host's 'errno' after
> executing a corresponding syscall.

Ok, then we should be able to reuse it as error code.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-10-21  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19  5:33 Andrey Smirnov
2015-10-19  7:26 ` Antony Pavlov
2015-10-19 17:48   ` Andrey Smirnov
2015-10-19  7:36 ` Sascha Hauer
2015-10-21  1:14   ` Andrey Smirnov
2015-10-21  7:26     ` Sascha Hauer [this message]

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=20151021072643.GA14476@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox