Loading...
Searching...
No Matches
Kernel Factory

The kernel factory is a kernel object that provides the ability to create new kernel objects dynamically.

The kernel factory enforces a memory quota. This quota defines the maximum amount of kernel memory the factory service can use to construct the requested objects. When the quota is depleted, the factory refuses the creation of new objects.

The quota may be higher than the amount of available kernel memory; ultimately, the amount of available kernel memory is the strict limit for the factory to remain operational.

The kernel factory creates the following kinds of objects:

- DMA space
- L4::Factory
- L4::Ipc_gate (L4_PROTO_NONE, L4_PROTO_KOBJECT)
- L4::Irq (L4_PROTO_IRQ_SENDER)
- L4::Semaphore
- L4::Task
- L4::Thread
- L4::Vm
- L4::Vcpu_context

The protocol IDs for objects in this list are given in L4_msgtag_protocol. Kernel objects whose protocol ID is not immediately clear from the documentation of L4_msgtag_protocol have their protocol IDs stated within parenthesis. As an exception, L4::Ipc_gate can be identified by more than one protocol IDs. The protocol ID shall be used as the second argument for L4::Factory.create(Cap<void>, long, l4_utcb_t *).

For the C++ interface see L4::Factory, for the C interface see Factory.

# Passing parameters for the create stream

L4::Factory.create() returns a create stream that allows arguments to be forwarded to the constructor of the object to be created.

Objects that support additional parameters on their creation are presented with a non-empty list of parameters. The parameters are listed in the order they should be provided to a create stream returned by L4::Factory.create().

- Dmar_space()
- L4::Factory(l4_umword_t)
  - Argument: factory quota (in bytes).
  - See L4::Factory.create_factory() for details.
- L4::Ipc_gate()
  - Creates an unbound IPC gate.
  - Alternatively, an IPC gate can be immediately bound to a thread upon creation using L4::Factory.create_gate().
- L4::Irq()
- L4::Semaphore()
- L4::Task(l4_fpage_t)
  - Argument: utcb_area
  - See L4::Factory.create_task() for details.
- L4::Thread()
- L4::Vm()
- L4::Vcpu_context()