[Barrelfish-users] Stacks in Barrelfish

Robert Radkiewicz rrad at kth.se
Tue Nov 20 20:01:51 CET 2012


Hi Andrew,

thanks for pointing that out. For the stack created in the ARM-code 
there is a counter-part for that in the x86-code. In startup_arch.c 
"disabled_save_area.edi = DISPATCHER_BASE;" and this one is set to esp 
in crt0.S
So this seems to be a temporary stack, for dispatch until it is running. 
No problem, but maybe a little confusing.

Regards,
Robert

On 19.11.2012 19:38, Andrew Baumann wrote:
> Hi Robert,
>
> Barrelfish uses:
> * one stack for the kernel (on each core), statically allocated
>   * one stack for each user thread
>     - usually this is allocated from the heap, however there is one special thread used at bootstrap time whose stack is statically allocated (look for "staticthread" in threads.c)
>   * two stacks for the dispatcher, allocated in the dispatcher structure, and used only while the dispatcher is disabled
>    - one for handling traps and disabled page faults
>    - one for handling all other upcalls
>
> It looks like ARM's crt0 allocates another stack statically. This should be harmless, but it's not immediately obvious to me why it's necessary -- usually the start of day crt0 code runs on the dispatcher stack while it is disabled.
>
> Hope this helps,
> Andrew
>
> -----Original Message-----
> From: Robert Radkiewicz [mailto:rrad at kth.se]
> Sent: Monday, 19 November 2012 09:50
> To: barrelfish-users at lists.inf.ethz.ch
> Subject: [Barrelfish-users] Stacks in Barrelfish
>
> Hello,
>
> working on the port for the TilePro64 I am encountering a question:
> How many different stacks are there in Barrelfish?
> At the moment I have one initial stack used from the initial code, some
> extra stack, which is/will be used by the interrupts and a stack for
> every process / dispatcher.
>
> I can't find a real pattern about all the stack-initializations. For
> example in the crt0.S for arm there is a stack defined with
> crt0_temp_stack_base:
>           .space  8192
> crt0_temp_stack:
>
> which seems to be special, but I don't understand to which component it
> belongs and how long it will live.
>
> Thanks,
> Robert
>
> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>
>
>
>    




More information about the Barrelfish-users mailing list