OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [api/] [kip.h] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Kernel Interface Page
3
 *
4
 * Copyright (C) 2007 Bahadir Balban
5
 */
6
 
7
#ifndef __KIP_H__
8
#define __KIP_H__
9
 
10
#define __YEAR__ ((((__DATE__ [7] - '0') * 10 + (__DATE__ [8] - '0')) * 10 \
11
                        + (__DATE__ [9] - '0')) * 10 + (__DATE__ [10] - '0'))
12
 
13
#define __MONTH__ (__DATE__ [2] == 'n' ? (__DATE__ [1] == 'a' ? 0 : 5) \
14
                : __DATE__ [2] == 'b' ? 1 \
15
                : __DATE__ [2] == 'r' ? (__DATE__ [0] == 'M' ? 2 : 3) \
16
                : __DATE__ [2] == 'y' ? 4 \
17
                : __DATE__ [2] == 'l' ? 6 \
18
                : __DATE__ [2] == 'g' ? 7 \
19
                : __DATE__ [2] == 'p' ? 8 \
20
                : __DATE__ [2] == 't' ? 9 \
21
                : __DATE__ [2] == 'v' ? 10 : 11)
22
 
23
#define __DAY__ ((__DATE__ [4] == ' ' ? 0 : __DATE__ [4] - '0') * 10 \
24
                + (__DATE__ [5] - '0'))
25
 
26
 
27
#define CODEZERO_VERSION                0
28
#define CODEZERO_SUBVERSION             2
29
#define KDESC_DATE_SIZE                 12
30
#define KDESC_TIME_SIZE                 9
31
 
32
struct kernel_descriptor {
33
        u32 version;
34
        u32 subversion;
35
        u32 magic;
36
        char date[KDESC_DATE_SIZE];
37
        char time[KDESC_TIME_SIZE];
38
} __attribute__((__packed__));
39
 
40
/* Experimental KIP with non-standard offsets */
41
struct kip {
42
        /* System descriptions */
43
        u32 magic;
44
        u16 version_rsrv;
45
        u8  api_subversion;
46
        u8  api_version;
47
        u32 api_flags;
48
 
49
        u32 container_control;
50
        u32 time;
51
 
52
        u32 irq_control;
53
        u32 thread_control;
54
        u32 ipc_control;
55
        u32 map;
56
        u32 ipc;
57
        u32 capability_control;
58
        u32 unmap;
59
        u32 exchange_registers;
60
        u32 thread_switch;
61
        u32 schedule;
62
        u32 getid;
63
        u32 mutex_control;
64
        u32 cache_control;
65
 
66
        u32 arch_syscall0;
67
        u32 arch_syscall1;
68
        u32 arch_syscall2;
69
 
70
        u32 utcb;
71
 
72
        struct kernel_descriptor kdesc;
73
} __attribute__((__packed__));
74
 
75
 
76
#if defined (__KERNEL__)
77
extern struct kip kip;
78
#endif /* __KERNEL__ */
79
 
80
 
81
#endif /* __KIP_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.