We port Xhyp on your hardware, we port your
OS or application on Xhyp
read more
Howto: Running X-hyp binaries demo.
...read more
Howto: Run your own RTOS in X-hyp.
...read more
Howto use the X-hyp configurator.
...read more
FAQ: Frequently Asked Questions on Licensing.
...read more
Howto use the X-Hyp framework to port an RTOS to X-Hyp.
...read more
Source code example: a hello world domain for X-Hyp.
...read more
Binary testing: using X-Hyp ARINC like scheduling.
...read more
IST Project: OCERA, Open components for realtime applications.
...read more
A realtime hypervisor for embedded systems on ARM-9 and Cortex ready with paravirtualized FreeRTOS. |
X-Hyp for ARM defines 54 hypercalls allowing a domain to ask for X-Hyp services.
This hypercall is used in a domain having at least two internal functional modes, like we usualy have in GPOS and some RTOS, when the unpriviledge code inside the domain wants to ask services to the priviledged code of the same domain.
Typically, a system call from an intra domain application.
The priviledged code of the domain must have define an entry to be called on system calls using the _HYP_syscall_requesthypercall.
#define _HYP_syscall 0
This hypercall is used when a domain requests debug information to be print immediatly by the hypervisor.
This hypercall is redirected to the standard console hypercall, see _HYP_io_write, if the hypervisor is not in debug mode.
#define _HYP_console 1
Register | Usage |
---|---|
R0 | a character or a pointer to a string. or a caracter in low byte if R1 is 0. |
R1 | if 0 R0 holds a caracter, else it is the string length |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
Using this hypercall, a domain can relinquish the processor. Depending of the hypervisor scheduler in use it may induce a domain switch or lead to a CPU idle state until next domain is to be scheduled.
#define _HYP_yield 2
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
These hypercalls are not available in the current version. They are reserved for a later version of Xhyp with extended memory management capabilities.
#define _HYP_getpage 3 #define _HYP_freepage 4
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
The _HYP_irq_request hypercall allows a domain to define an entry to receive interrupts.
#define _HYP_irq_request 5
Register | Usage |
---|---|
R0 | a pointer to the interrupt routine |
R1 | a pointer to the stack for interrupt |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
Enable IRQ for the domain.
In the shared page, both v_irq_enabled or v_cpsr may be modified.
#define _HYP_irq_enable 6
Register | Usage |
---|---|
R0 | IRQ mask. If 0 enable virtual CPU IRQ |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
Disable IRQ for the domain.
In the shared page, both v_irq_enabled or v_cpsr may be modified.
#define _HYP_irq_disable 7
Register | Usage |
---|---|
R0 | IRQ mask. If 0 disable virtual CPU IRQ |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
This hypercall must be used by the domain to return from interrupt.
It is called when the guest finished his IRQ handler set the context back from the shared page where the domain could have changed it for context switch purpose for exemple.
#define _HYP_irq_return 8
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
- | The call does not return. |
This hypercall is used to terminate the domain. The domain state will be DSTATE_ZOMBIE and depending on XHYP configuration an event will be sent to the controlling domain signaling the death.
The DSTATE_ZOMBIE will lead to DSTATE_DEAD if a controlling domain retrieves the domain status, see _HYP_hyp.
#define _HYP_exit 9
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
- | The call does not return. |
This hypercall is processor dependant and is used to bring back to the domain processor specific informations like processor version or type.
#define _HYP_cpuctrl 10
Register | Usage |
---|---|
R0 |
The Virtual Coprocessor register to query
0: Coprocessor register 0 (mrc p15, 0, r0, c0, c0, 0) 1: Coprocessor register 1 (mrc p15, 0, r0, c1, c0, 0) |
Register | Usage |
---|---|
R0 | The value of the coprocessor register |
Just like for interrupt management the _HYP_syscall_request hypercall allows a domain to define an entry point for system calls.
#define _HYP_syscall_request 11
Register | Usage |
---|---|
R0 | a pointer to the syscall routine |
R1 | a pointer to the stack for syscall |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
- | The call does not return. |
This hypercall is used to define an entry point for handling page faults.
#define _HYP_pgfault_request 13
Register | Usage |
---|---|
R0 | a pointer to the pagefault routine |
R1 | a pointer to the stack for pagefault |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
This hypercalls is used to define an entry point for handling undefined instructions.
#define _HYP_undef_request 14
Register | Usage |
---|---|
R0 | a pointer to the undefined instruction routine |
R1 | a pointer to the stack for undefined instruction |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
The _HYP_enable_mmu hypercall allows a domain to change the virtual MMU mode
#define _HYP_enable_mmu 15
Register | Usage |
---|---|
R0 | 1: enable MMU - 0: disable MMU |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
#define _HYP_setmode 16
This hypercall is used for ARM implementations.
In the case the domain handle two mode of operation, this hypercall is used to change the ARM domain.
In a ARM processor we can define 16 different domains controling the way memory is accessed. In X-Hyp we restrict the number of domains to a maximum of 2 ARM-domains per X-Hyp domain.
#define _HYP_set_domain 17
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercall allows a domain to disable the cache associated to itself.
#define _HYP_disable_cache 18
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercalls is a demand to the hypervisor for a hot reset. The hot reset is done by calling the first address available for code in the domain (usually 0x02100000)
#define _HYP_reset 19
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercall ask the hypervisor to put this domain in idle state. That is it do not process instructions anymore but wait for an interrupt.
#define _HYP_idle 20
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercalls asks the hypervisor to flush or clean the domain associated cache. See X-hyp cache handling documentation.
#define _HYP_flush_cache 21
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
The following hypercalls are no longer used and are replaced with specific register values in _HYP_flush_cache hypercall.
#define _HYP_flush_icache 22 #define _HYP_flush_user_cache_range 23 #define _HYP_coherent_user_rang 24 #define _HYP_flush_kern_dcache_area 25 #define _HYP_dma_inv_range 26 #define _HYP_dma_clean_range 27 #define _HYP_dma_flush_range 28 #define _HYP_dchache_clean_area 29
Use this hypercall to change the page table associated with the domain.
#define _HYP_switch_mm 30
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
Use this hypercall to modify a single page table entry inside a known page table.
#define _HYP_set_pte 31
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
The following hypercalls are no longer used and are replaced with specific register values in _HYP_flush_cache hypercall.
#define _HYP_tlb_flush 32 #define _HYP_enable_cache 33
Allows to copy data inside the domain memory without to trigger a page fault. In case of error, i.e. the address is not inside the domain R0 will hold the error value or 0 for success.
#define _HYP_probe 34
Register | Usage |
---|---|
R0 | Destination address |
R1 | Source address |
R2 | length |
Register | Usage |
---|---|
R0 |
On success: 0 On error: A negative number indicating the cause of error. |
The following hypercalls are no longer used.
#define _HYP_switch_task 35 #define _HYP_copy_page 36 #define _HYP_clear_page 37 #define _HYP_new_pgd 38 #define _HYP_set_pmd 39 #define _HYP_set_pte_ext 40 #define _HYP_get_pmdval 41
returns timer informations in R0.
#define _HYP_get_timer 42
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
XHYP defines IO operations as event operations on qports. Each domain has 3 pre-defined opened channels: 0 read, 1 write and 2 error. (Like in Unix).
You can use IO channels for inter domain communications. These channels are implemented using qports. See Xhyp Documentation on qports implementation and qport user's guide.
The return value is a positive number indicating the local channel to be used for further IO or a negative value indicating the cause of the error.
#define _HYP_io_open 43
Register | Usage |
---|---|
R0 | high word holds domain number. Low word is the channel number. |
R1 | address of the buffer |
R2 | buffer len |
Register | Usage |
---|---|
R0 |
On success: Channel number On error: A negative number indicating the cause of error. |
XHYP defines read, write, ioctl and close using POSIX syntax.
#define _HYP_io_read 44 #define _HYP_io_write 45 #define _HYP_io_ioctl 46 #define _HYP_io_close 47
A domain can send an event to another domain sampling port.
#define _HYP_event_send 48
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
The following hypercalls are no longer used.
#define _HYP_preempt_disable 49 #define _HYP_preempt_enable 50
XHYP implement tracing facilities. Event's data is logged in a circular buffer on specific events like scheduling events, interrupt, errors and hypercalls.
A controlling domain can usr this hypercall to retrieve the events.
#define _HYP_hyp 51
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercall must be used by the domain to return from abort.
#define _HYP_abt_return 52
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
This hypercall must be used by the domain to switch to user mode.
#define _HYP_usr_return 53
Register | Usage |
---|---|
- | No register used |
Register | Usage |
---|---|
R0 |
On success: the number of bytes successfully copied On error: A negative number indicating the cause of error. |
Howto use the X-Hyp framework to port an RTOS to X-Hyp.
...read more
Howto use the X-Hyp Assemblor Hypercall API.
...read more
Binary testing: using X-Hyp ARINC like scheduling.
...read more
Howto: Running X-hyp binaries demo.
...read more
Howto: Run your own RTOS in X-hyp.
...read more
Howto use the X-Hyp C hypercall API.
...read more
IST Project: OCERA, Open components for realtime applications.
...read more
Source code example: a hello world domain for X-Hyp.
...read more
Designed and built by M.N.I.S.
Using Bootstrap licensed under Apache V2 and Glyphicons Free licensed under CC BY 3.0.