1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00
This commit is contained in:
Bas Wijnen
2009-05-22 22:48:49 +02:00
parent 60ea570aaa
commit 12637f5695
18 changed files with 567 additions and 386 deletions

57
boot-programs/sos.h Normal file
View File

@@ -0,0 +1,57 @@
#ifndef __SOS_H
#define __SOS_H
#ifdef __cplusplus
extern "C" {
#endif
#define KERNEL_MASK 0xfff
#define CAPTYPE_MASK 0xe00
#define CAPTYPE_ADMIN 0x000
#define CAPTYPE_RECEIVER 0x200
#define CAPTYPE_MEMORY 0x400
#define CAPTYPE_THREAD 0x600
#define CAPTYPE_PAGE 0x800
#define CAPTYPE_CAPABILITY 0xa00
#define CAPTYPE_CAPPAGE 0xc00
/*#define CAPTYPE_??? 0xe00*/
/* This works on all kernel capabilities. */
#define CAP_DEGRADE 0
/* Operations */
#define CAP_ADMIN_SCHEDULE 1
/* TODO: add priviledged operations. */
#define CAP_RECEIVER_SET_OWNER 1
#define CAP_RECEIVER_CREATE_CAPABILITY 2
#define CAP_RECEIVER_CREATE_CALL_CAPABILITY 3
#define CAP_MEMORY_CREATE 1
#define CAP_MEMORY_DESTROY 2
#define CAP_MEMORY_LIST 3
#define CAP_MEMORY_MAPPING 4
#define CAP_MEMORY_DROP 5
#define CAP_THREAD_RUN 1
#define CAP_THREAD_RUN_CONDITIONAL 2
#define CAP_THREAD_SLEEP 3
#define CAP_THREAD_GET_INFO 4 /* Details of this are arch-specific. */
#define CAP_THREAD_SET_INFO 5 /* Details of this are arch-specific. */
#define CAP_PAGE_MAP 1
#define CAP_PAGE_SHARE 2
#define CAP_PAGE_SHARE_COW 3
#define CAP_PAGE_FORGET 4
#define CAP_CAPABILITY_GET 1
#define CAP_CAPABILITY_SET_DEATH_NOTIFY 2
#define CAP_CAPPAGE_SET 1
#define CAP_CAPPAGE_GET 2
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,6 @@
#pypp 0
#include "sos.h"
int main ():
while true:
__asm__ volatile ("move $v0, $zero; move $a0, $zero ; move $a1, $zero ; move $a2, $zero ; syscall")

View File

@@ -0,0 +1,6 @@
#pypp 0
#include "sos.h"
int main ():
while true:
__asm__ volatile ("move $v0, $zero; li $a0, 1 ; move $a1, $a0 ; move $a2, $a0 ; syscall")