Contents 6.1 Overview 6.2 Configuration parameters 6.3 Alpha calls
6.1 Overview [up]
Root-task is initial application in L4 based operation system. Root-task is privileged application and can do privileged system calls. For example only root-task (and root-pager) can create/delete/modify address spaces, threads. In WrmOS root-rask is called Alpha.
The following actions must be doing by Alpha:
- read Alpha runtime configuration with description of system resources and application list;
- create address space and thread for each application from application list and run it;
- process pagefault requests from applications in runtime;
- process alpha's requests from applications.
6.2 Configuration parameters [up]
Alpha has the next configuration parameters:
Name | Location | Description |
---|---|---|
usr_app_dbg | cfg/prj/<project-name>.prj | Applications debug flag. My be 0 or 1. It allows to use debug configuration with asserts, additional debug outputs and other (for 1) or use release configuration (for 0). |
6.3 Alpha calls [up]
As mentioned above, only Alpha can create/delete/modify address spaces and threads, and do other privileged system calls. Also at Alpha startup it gets all system resources (memory, devices, IRQs, ...) and control access to them.
To control access of user applications to OS resources (address spaces, threads, system devices, ...) Alpha supports Alpha calls — IPC messages with certain label and format. Alpha calls are used by WrmOS API to do some actions. The description of Alpha calls is listed below:
Alpha call | WrmOS API | Description |
---|---|---|
Map IO | wrm_dev_map_io() | Map memory mapped device area to caller address space. |
Attach interrupt | wrm_dev_attach_int() | Set caller thread as interrupt handler. |
Detach interrupt | wrm_dev_detach_int() | Remove caller thread from interrupt handlers. |
Get usual memory | wrm_mem_get_usual() | Get from Alpha usual memory allowed for caller application. |
Get named memory | wrm_mem_get_named() | Get from Alpha named memory allowed for caller application. |
Create thread | wrm_thread_create() | Create thread. |
Create task | wrm_task_create() | Create task (address space). |
Register named thread | wrm_nthread_register() | Register thread by name. It allows other application get thread ID by registered name. |
Get named thread ID | wrm_nthread_get_id() | Get named thread ID by name. |
Get app thread IDs | wrm_app_threads() | Get thread IDs range for required application. |