History log of /barrelfish-master/lib/spawndomain/spawn.c
Revision Date Author Comments
# 9bd8d1d5 03-Apr-2019 Reto Achermann <reto.achermann@inf.ethz.ch>

replacing umlaute and fixing address in headers Haldeneggsteig -> Universitaetsstrasse

Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>


# 6f1b5f71 19-Dec-2018 Simon Gerber <simon.gerber@inf.ethz.ch>

dispatcher: remove DISPATCHER_FRAME_BITS, and redefine DISPATCHER_FRAME_SIZE as 512kB.

This is necessary with the new contents struct dispatcher_<arch> when
using array-based pmap on larger machines, as we otherwise run out of
room for LMP channel receive buffers in the SKB.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 8ff0486c 13-Nov-2018 Simon Gerber <simon.gerber@inf.ethz.ch>

Remove invoke_frame_identify, replaced with frame_identify().

This commit fully removes the Frame_Identify invocation and replaces the
calls with frame_identify().
Additionally, because the KCB is special, this commit introduces a new
invocation kcb_identify() which translates the lvaddr in the KCB
capability into the pysical address of the kernel control block.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 1bd35ffc 08-Nov-2018 Simon Gerber <simon.gerber@inf.ethz.ch>

Early cnode allocation: only provide 64 16kB RAM caps per domain for early cnode allocator

This allows us to decrease CORE_DATA_PAGES to 1100 (from 2200), because
we don't need to allocate as many 16kB regions for the monitor on each
core.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# b62040d2 08-Dec-2017 Simon Gerber <simon.gerber@inf.ethz.ch>

T384: x86_64: change shadow page tables to have dedicated cnodes for mapping caps

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 4213f5b8 15-Mar-2018 Reto Achermann <reto.achermann@inf.ethz.ch>

caps: adding endpoint cap type for UMP endpoints

Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>


# a2f1e286 23-Mar-2015 Simon Gerber <simon.gerber@inf.ethz.ch>

T82: checkpoint. Guest domain up. Need to implement hypervisor service.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 9a7d2f5b 11-May-2018 Adam Turowski <adam.turowski@inf.ethz.ch>

fpu: unifing the fpu's context switching
x86_64: fixing the stack's alignment

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>


# df7a10ce 11-May-2018 Adam Turowski <adam.turowski@inf.ethz.ch>

fpu: unifing the fpu's context switching
x86_64: fixing the stack's alignment

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>


# 7f2d9c0d 19-Jun-2017 Adam Turowski <adam.turowski@inf.ethz.ch>

spawn: fixing creation of an environment, empty string could be insterted on non-x86

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>


# 06f04c77 21-Sep-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T288: Remove references to DEFAULT_CNODE_BITS and derived values.

Closes T288.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 53f350e7 16-Aug-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T258: refactor creation of new cspaces to make it cleaner

This removes the need for manual updating of cnoderefs in libspawndomain. We
introduce a new function cnode_create_l1() for creating new L1 cnodes in L2
slots in our cspace, and rewrite cnode_create_foreign() to
cnode_create_foreign_l2() which takes a capref to an L1 cnode and a slot in
the L1 cnode for where to put the new L2 cnode.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# fe329ca9 26-Jul-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T258: Fix domain spanning dispatcher creation

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 17948f60 22-Jul-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T258, T264, T270: Implement two-level cspace layout using L1/L2 CNode objects.

distops functionality is NYI.

This commit also makes the root cnodes explicit for sys_map(), closes T270.

Notable changes:
* LRPC LMP endpoints are regular capabilities in L2 cnode, no longer in root
cnode.
* Capability operations take a capability address for the root cnode relative
to which capability addresses are to be resolved. The root cnode capability
address must be resolvable in the current domains cspace.

Closes T264.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# d74324f8 08-Jul-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T268: Mint inherit cnode into root cnode so we can copy caps into new process's cspace

Closes T268.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 01321ce4 07-Jul-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T258: libspawndomain: fix segment cnode and page cnode creation to work in two-level cspace

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 36753238 07-Jul-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T258: rewrite domain creation to stay inside two level cspace layout

* kernel/startup.c: create CNodes that match two level cspace layout for
initial domain.
* lib/spawndomain: create two-level CSpace for new domain, and keep CN caps
in slots where we can edit the CNode contents (e.g. put L1 CNode of new
domain into L1 CNode of spawning domain.
* lib/barrelfish & KPI: edit caprefs and #defines for Root CNode and other
well-defined CNodes to reflect new sizes.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 27701384 28-Jun-2016 David Cock <david.cock@inf.ethz.ch>

ARM: Removed traces of ARMv7-M and ARMv5 code.

Signed-off-by: David Cock <david.cock@inf.ethz.ch>


# 69ff3387 15-Jun-2016 Moritz Hoffmann <moritz.hoffmann@hpe.com>

aarch64: Use VNode_AARCH64_l0 as initial page table level.

Signed-off-by: Moritz Hoffmann <moritz.hoffmann@hpe.com>


# be54ebeb 29-Apr-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T191: x86_64: refactor retype2 back to retype

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 75b789f7 20-Apr-2016 Simon Gerber <simon.gerber@inf.ethz.ch>

T191: change all of user space to call new retype directly; turn off count = 0 behaviour in kernel

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# 8a499577 20-Nov-2015 Simon Gerber <simon.gerber@inf.ethz.ch>

T187: armv7: migrate to mapping caps.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# aefc456c 18-Nov-2015 Simon Gerber <simon.gerber@inf.ethz.ch>

T187: remove cap_copy() calls when mapping same frame multiple times

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>


# f747554f 17-Nov-2015 Moritz Hoffmann <moritz.hoffmann@inf.ethz.ch>

T24: remove remaining SCC code

Signed-off-by: Moritz Hoffmann <moritz.hoffmann@inf.ethz.ch>


# 146e4e08 16-Nov-2015 David Cock <david.cock@inf.ethz.ch>

Clean merge of HP's ARMv8 code

This adds support for an ARMv8 core running in the GEM5 simulator

Signed-off-by: David Cock <david.cock@inf.ethz.ch>


# e505fb1c 10-Nov-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Cleaned up page cn and physaddr cn creation code.


# b9af8f7e 28-Aug-2014 Reto Achermann <acreto@student.ethz.ch>

spawn: added handling of spawn flags

Added a spawnflags parameter to the command line and forwarding of
spawnflags to spawnd

Added a spawn flag SPAWN_FLAGS_OMP for parsing openMP functions.


# a51cf0a8 13-Aug-2014 Reto Achermann <acreto@student.ethz.ch>

libcxx: exception handling

added missing code to enable exception handling of C++ programs on
barrelfish:

+ adding .eh_frame and .eh_frame_hdr section information to the
dispatcher when the new domain is spawned.

+ adding two new functions to obtain the eh_frame and eh_frame_hdr
information from userspace (used by libcxx for exception handling)


# aea86ae3 27-Jun-2014 Stefan Kaestle <stefan.kaestle@inf.ethz.ch>

Fix: vregions are only valid on x86


# df57367a 27-Jun-2014 Reto Achermann <acreto@student.ethz.ch>

Kernel: Added a new field to the dispatcher struct for K1OM architecutre

Addition of xeon_phi_id information to the dispatcher generic struct
Adding of a new function to obtain this structure
Adding of new fields to multiboot and coredata structures
(xeon_phi_info)
Adapted lib spawndomain to forward the own xeon phi id when spawning
kernel: shows message on which Xeon Phi we are running on.


# 74006ab1 26-Feb-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Fixed missing CPU_ARM5 in spawn_setup_vspace.


# a68b7848 25-Feb-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Split CPU_ARM into CPU_ARM5 and CPU_ARM7


# 9503ab3f 14-Apr-2014 Reto Achermann <acreto@student.ethz.ch>

Added: Switches for K1OM to libspawndomain


# d2d9862d 20-Mar-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

turn off monitor and spawn client debugging.


# 25b83541 17-Mar-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

monitor debug stuff + other debug msgs.


# 62c38457 05-Mar-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Mark's capabilities merged with upstream.

Test Plan: Run all harness tests

Reviewers: zgerd

Differential Revision: https://code.systems.ethz.ch/D1


# de906f69 28-Feb-2014 Simon Peter <simpeter@cs.washington.edu>

The Arrakis backport to Barrelfish.

Here are the macro changes:
* Made lwIP an optional network stack
* Moved lwIP headers out of the general include directory
* Parallel hake
* CPU-virtualized ("arrakis") applications
* libarrakis is a new libOS that uses CPU features directly
* arrakismon is a new monitor for Arrakis apps
* QEMU Multiboot support instead of GRUB (enables KVM)
* e10k virtual function driver
* Software virtual->physical mapping (substitutes IOMMU)
* To be replaced soon with an Intel IOMMU driver
* Better GDB and stack tracing support
* New POSIX support
* pthreads, inet_*(), usleep(), syslimits.h, sigaction(), mman.h,
* resource.h, sendmsg(), recvmsg(), mkfifo(), syslog.h, sysexits.h,
* fcntl(), getegid(), getgid(), pipe(), rlimits
* epoll support
* Separate waitset for interrupts
* Thread TLS key and ID support
* Moved PCRE headers to include/, where they usually are
* Intel performance counters support
* Handle boot-time RAM overflow (for machines with >=64GB RAM)
* Arranet network stack
* Fix for build of lib/barrelfish/arch/x86_64/dispatch.c without -O2
* New comandline options to pci daemon:
* maxvfs=x, x is number of virtual functions to create for each
* device supporting it
* skb_bridge_program=x, x is SKB bridge programming script to use
* bridge_bios is a script that uses the BIOS pre-set values, like Linux
* Correctly build machine-optimized newlib parts
* Library versions of e1000 and e10k drivers
* Support for virtualization in e10k driver
* e10k datacenter control plane daemon
* Modified hellotest to be both a Barrelfish and an Arrakis application

I've decided not to include the lwIP 1.4.1 code, as the port is
not finished and who wants to use lwIP anyway with the Arrakis
network stack and mTCP being released soon. If you want this,
let me know (it's hugely superior to lwIP 1.3.1).

I've made the code backwards-compatible with Barrelfish. The
default should do what Barrelfish does. One can specify
commandline options to the PCI daemon and e10k driver to
configure I/O virtualization and the optional arrakismon allows
loading CPU-virtualized "arrakis" programs.

There are more pending changes, such as support for hardware
rate limiting and weighted round robin packet scheduling, but
I'd like these to go in first, before I push the rest.


# d04b2e0c 26-Feb-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Fixed missing CPU_ARM5 in spawn_setup_vspace.


# 4d675a00 25-Feb-2014 Simon Gerber <simon.gerber@inf.ethz.ch>

Split CPU_ARM into CPU_ARM5 and CPU_ARM7


# b6a6c208 22-Oct-2013 Gerd Zellweger <mail@gerdzellweger.com>

Generic function for inheritcn cap copy.

Instead of a spawn_setup_* function for each slot in inheritcn
we a more generic function that gives inherticn slot and destination cnode and
slot as an argument.


# 428ac6fd 02-Apr-2013 Kornilios Kourtis <kkourt@inf.ethz.ch>

fix buflen when calling single_slot_alloc_raw()

Here's my understanding (this is from reading the code):
- single_slot_alloc manages slots for a single cnode using a list of
free nodes. The list is maintained starting with ->head, and each node
represents a range of slots (slot, space). The list is initialized
with a single node with {slot=0, space=nslots}

- The worst case scenario for the size of the list is when only the odd
(or even) slots are free. This is the worst case because for all nodes
in the list space=1. Adding nodes should result in smaller number of
nodes but with higher ->space values.

- The list nodes are allocated/freed using a (simple) slab allocator.
Hence, the slab allocator should be initialized so that it contains
nslots/2 objects to accommodate for the worst case.

The problem is that this does not happen: the slab allocator requires some
additional memory for adding headers to objects which is not accounted for.
This is why in your case the allocator does not have additional objects to
provide in slab_alloc().

This commit allocates appropriately sized buffers for the slab allocator and
hopefully fixes your problem.

Many thanks to Georgios Varisteas <yorgos@kth.se> for reporting the bug and
help us debug the problem.


# 54e7593f 22-Nov-2012 Simon Gerber <simugerber@student.ethz.ch>

Barrelfish (standard config) boots with 1 mapping per cap copy.


# ed27dfea 22-Jun-2012 Raphael Fuchs <raphaelfuchs@student.ethz.ch>

Adding functionality to inherit capabilities and pass capabilities as arguments.

The function 'spawn_domain_with_fdcap' was used to spawn a domain and
inherit the file descriptors of the current domain. A similar inheritance
mechanism is needed for session capabilities.

To this end, the function was renamed to 'spawn_domain_with_caps'. It no longer
expects an fdcap as one of the arguments but a CNode containing all the
capabilities, that should be inherited by the newly spawned domain. The layout
of this CNode is convention an defined in include/barrelfish/spawn_client.h.
Spawnd knows about these capabilities and copies them to the appropriate places.
For example, if the fdcap is present in the inherit CNode, spawnd copies it to
the corresponding slot in the task CNode.

Moreover, we need the ability to pass arbitrary capabilities to a domain at
startup for example to start a device driver. Spawnd does not have to know about
these capabilities. Which capabilities are passed in which order is an agreement
between spawner and spawnee. To this end, this patch adds another CNode argument
to the function 'spawn_domain_with_caps'. If a domain wants to pass certain
capabilites to another domain it therefore creates a CNode and places the
capabilities in this Cnode and the passes this CNode as an argument to
'spawn_domain_with_caps'. Spawnd makes this CNode available to the spawnee in
the ARGCN slot of the root CNode as either a CNode (if spawner and spawnee are
on the same core) or a ForeignCNode (if on different cores).

The first method of inheriting capabilities and the second method of passing
capabilities are intentionally kept as two arguments because of the following
reasons:
* To account for the difference in their handling. Spawnd knows about the
inherited capabilities and places each of them to appropriate places in the
spawnee's CSpace. As a result they are available early-on, i.e. before the
library initialization code for this domain runs.
* Putting both kinds of capabilities in a single flat CNode, would require
recompilation of the whole OS after adding a new capability, that should be
inherited.


# 54356472 09-Feb-2012 Mark Nevill <nevillm@ethz.ch>

Fixed uninitialized argspg when spanning domains.


# 70c30847 23-Jan-2012 Andrew Baumann <andrew.baumann@microsoft.com>

remove support for Beehive

see the mailing list discussion at the end of December 2011 for motivation


# 77761397 16-Sep-2011 Jana Giceva <gicevaj@inf.ethz.ch>

Reverted problematic size change to network stack, along with several debug changes.


# 70392223 16-Sep-2011 Simon Peter <speter@inf.ethz.ch>

Finalized socket inheritance with pause and reverted unrelated changes from
last commit.


# 28bb11d1 16-Sep-2011 Simon Peter <speter@inf.ethz.ch>

Checkpoint: Socket inheritance with pause.


# 9965756a 14-Sep-2011 Jana Giceva <gicevaj@inf.ethz.ch>

snapshot cont.


# 559955b4 02-Aug-2011 Simon Peter <speter@inf.ethz.ch>

Merge from ASPLOS tree.


# 9299dcef 08-Jul-2011 Stefan Kästle <stefan.kaestle@inf.ethz.ch>

Initial version of public stable barrelfish repository.