]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/abi/ia32/kip-ia32.cpp
52bc31eb8693ec2b7c9cf2c30bd774df90cf7a74
[l4.git] / kernel / fiasco / src / abi / ia32 / kip-ia32.cpp
1 /*
2  * IA-32 Kernel-Info Page
3  */
4
5 INTERFACE [ux]:
6
7 #include "vhw.h"
8
9 INTERFACE [ia32 || ux]:
10
11 #include "types.h"
12
13 EXTENSION class Kip
14 {
15 public:
16
17   /* 00 */
18   Mword      magic;
19   Mword      version;
20   Unsigned8  offset_version_strings;
21   Unsigned8  fill0[3];
22   Unsigned8  kip_sys_calls;
23   Unsigned8  fill1[3];
24
25   /* the following stuff is undocumented; we assume that the kernel
26      info page is located at offset 0x1000 into the L4 kernel boot
27      image so that these declarations are consistent with section 2.9
28      of the L4 Reference Manual */
29
30   /* 10 */
31   Mword      init_default_kdebug;
32   Mword      default_kdebug_exception;
33   Mword      sched_granularity;
34   Mword      default_kdebug_end;
35
36   /* 20 */
37   Mword      sigma0_sp, sigma0_ip;
38   Mword      _res2[2];
39
40   /* 30 */
41   Mword      sigma1_sp, sigma1_ip;
42   Mword      _res3[2];
43
44   /* 40 */
45   Mword      root_sp, root_ip;
46   Mword      _res4[2];
47
48   /* 50 */
49   Mword      l4_config;
50   Mword      _mem_info;
51   Mword      kdebug_config;
52   Mword      kdebug_permission;
53
54   /* 60 */
55   Mword      total_ram;
56   Mword      processor_info;
57   Mword      _res6[14];
58
59   /* A0 */
60   volatile Cpu_time clock;
61   volatile Cpu_time switch_time;
62
63   /* B0 */
64   Mword      frequency_cpu;
65   Mword      frequency_bus;
66   volatile Cpu_time thread_time;
67
68   /* C0 */
69   Mword      _res8[4];
70
71   /* D0 */
72   Mword      _res9[4];
73
74   /* E0 */
75   Mword      user_ptr;
76   Mword      vhw_offset;
77   char       __pad[8];
78
79   /* F0 */
80   Kernel_uart_info  kernel_uart_info;
81   Platform_info     platform_info;
82 };
83
84 //---------------------------------------------------------------------------
85 IMPLEMENTATION [ux]:
86
87 PUBLIC
88 Vhw_descriptor *
89 Kip::vhw() const
90 {
91   return reinterpret_cast<Vhw_descriptor*>(((unsigned long)this) + vhw_offset);
92 }