[Barrelfish-users] about port barrelfish on tilera platform
Andrew.Baumann at microsoft.com
Mon Nov 19 20:02:42 CET 2012
Start of day for userland is a pretty special environment on Barrelfish, and probably some of the toughest code to understand or port. The main thing you need to understand to make sense of it is the dispatch model: the crt0 code runs with the dispatcher "disabled", which means that it cannot take upcalls from the kernel. This in turn means that it cannot take a page fault, nor can it send or receive IDC messages, or use threading functionality such as mutexes. The normal printf() path uses IDC (e.g. to communicate with the serial driver), so it can't be called from this environment. Instead, the debugging facilities available boil down to a debugging system call sys_print(). You can see examples of this in lib/barrelfish/dispatcher.c for things like disp_assert_fail() etc. Also, beware that you have a very small stack at this point.
Once you get onto a thread (i.e. once threads_init_disabled() completes and uses disp_resume() to start the thread) then most of these restrictions go away, and normal printf() calls should work.
Hope this helps,
From: Robert Radkiewicz [mailto:rrad at kth.se]
Sent: Monday, 19 November 2012 09:58
Cc: barrelfish-users at lists.inf.ethz.ch
Subject: Re: [Barrelfish-users] about port barrelfish on tilera platform
The whole process feels like making baby steps. Every small step we are
stepping over new peculiarities.
At the moment we are able to jump into user-code and call the
dispatcher, which will call init later (actually crt0.S calls the
dispatcher). We are trying to find out what is happening, and what we
need to provide. Trying to understand the structure of all the init.c's,
dispatcher_shared_generic, dispatcher_generic, dispatcher_<arch> and
which special registers have which values, where to set them, why to set
them and what to set to them.
Additionally we need to find out the requirements to have a printf() in
user-code. Is the implementation in the newlib (provided by barrelfish)
enough? Do we need a syscall or provide one of the
[vs]f?i?printf-functions? Is it normal that we run into a endless-loop
when we just put a printf()-statement in some of the dispatcher-code and
everything will be fine after we got to the real process or do we need
to do something special?
That's the point were we are at the moment, so maybe it can be solved
very fast and we are into the next step.
Is that the kind of information you wanted or what is the purpose of
On 16.11.2012 02:00, Wangjintang wrote:
> Hi Mats,
> --It's going quite slow and we are not really near completion yet. They would need help from someone who has done porting for other architectures.
> What's problem you're resolving? Port newlib ? port init? Or something else.
> Please show your problem in detail.
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
More information about the Barrelfish-users