From: Rafal Jaworowski <raj@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Pull request: u-boot-freebsd
Date: Mon, 17 Dec 2007 18:17:35 +0100 [thread overview]
Message-ID: <4766AF2F.9060204@semihalf.com> (raw)
In-Reply-To: <20071217133926.4a934c35@dhcp-252-066.norway.atmel.com>
Haavard Skinnemoen wrote:
> I'm sorry, but I really hate this stuff.
>
> * What happens if changes to the API is needed? Will be keep adding
> new "system calls" every time a new limitation with the existing
> interface is found (like Linux does)?
The API is versioned and consumer code is able to verify it. When we need to
change/extend it, the version is bumped: that's similar how many other APIs
are managed, like UNIX libs.
> * In other words, do we really _want_ a "stable API"?
Depending on the definition of "we", yes :-) Besides that we need a stable API
for FreeBSD purposes, I'm sure U-Boot as a whole benefits from improvement in
this area.
> * What's the rationale for the "syscalls" this patch exports, and are
> you absolutely sure the prototypes are sane? If you want a stable
> API, you need to get it right the first time.
Per earlier explanation given by Marcel, the main purpose of these 'syscalls'
is providing a well defined and stable interface to access services that
U-Boot implements like operations on the console, networking, storage etc. The
prototypes we have now have been thought out for a while and reviewed, and I
think they are sane.
> * Both the API core and the examples are littered with external
> declarations. Can we please put such things in header files where it
> belongs?
There's a couple of extern declarations that indeed could be placed in a
separate header, but it's usually fine balance when to put something into a
separate file (and bloat the files structure..), and in this case I decided
not to for simplicity. All other externs are for accessing existing U-Boot
objects.
> * All syscalls are implemented as vararg functions, so it's difficult
> to tell what arguments they take and whether or not they are being
> used correctly from the other side of the "syscall" line. A
> standard set of wrappers and associated header files would help, of
> course.
There is a pseudo-signature description in the comment for each syscall that
was meant to help and document. Also, the helper wrapper you mention is
already there: it's the glue layer, which implements front-end conveniency
calls the consumer can use, but it's not mandatory and syscall can be invoked
directly.
> * How is this really different from the existing jumptable stuff? It
> looks like it's just a different set of exported functions. Will
> the crufty old jumptable interface be removed at some point?
> Presumably, the new interface is superior, so it should be. Right?
>
The new interface is a similar mechanism, but it does not entangle external
application with configuration of U-Boot it happens to run upon. It's meant to
be more robust and extensible, but it is still initial implementation. This is
why it's optional so might be treated as experimental feature right now, but
my hope is after U-Boot-FreeBSD integration settles down, the old jumptable
approach can be retired (I volunteer to convert legacy standalone U-Boot apps
to the new scheme at that point).
Rafal
next prev parent reply other threads:[~2007-12-17 17:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 12:06 [U-Boot-Users] Pull request: u-boot-freebsd Rafal Jaworowski
2007-12-17 12:39 ` Haavard Skinnemoen
2007-12-17 17:17 ` Rafal Jaworowski [this message]
2007-12-17 18:03 ` Haavard Skinnemoen
2007-12-18 22:40 ` Rafal Jaworowski
2007-12-18 23:08 ` Wolfgang Denk
2007-12-19 9:32 ` Haavard Skinnemoen
2007-12-17 18:06 ` Marcel Moolenaar
2007-12-17 18:19 ` Haavard Skinnemoen
2007-12-17 19:10 ` Marcel Moolenaar
2007-12-19 9:08 ` Haavard Skinnemoen
2007-12-18 23:00 ` Rafal Jaworowski
2007-12-19 9:15 ` Haavard Skinnemoen
2007-12-27 0:05 ` Wolfgang Denk
2007-12-27 11:56 ` Rafal Jaworowski
2007-12-27 16:27 ` Ben Warren
2007-12-27 17:19 ` Rafal Jaworowski
2007-12-27 17:06 ` Wolfgang Denk
2007-12-27 17:29 ` Rafal Jaworowski
2007-12-27 19:59 ` Ben Warren
2007-12-27 20:06 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2008-02-21 11:06 Rafal Jaworowski
2008-02-22 12:01 ` Wolfgang Denk
2008-01-29 16:28 Rafal Jaworowski
2008-02-11 23:51 ` Wolfgang Denk
2008-01-09 19:04 Rafal Jaworowski
2008-01-09 22:08 ` Wolfgang Denk
2007-10-14 10:51 Rafal Jaworowski
2007-10-14 12:50 ` Wolfgang Denk
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=4766AF2F.9060204@semihalf.com \
--to=raj@semihalf.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