]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/bootstrap/server/src/koptions-def.h
update
[l4.git] / l4 / pkg / bootstrap / server / src / koptions-def.h
1 #pragma once
2
3 #include <l4/sys/types.h>
4
5 // To generate the kernel version:
6 // perl -p -e 's/l4_uint(\d+)_t/Unsigned$1/;s/^#inc.+/#include "types.h"/' koptions-def.h
7
8 namespace L4_kernel_options
9 {
10   enum Flags
11   {
12     F_wait              = 1 << 0,
13     F_serial_esc        = 1 << 1,
14     F_noserial          = 1 << 2,
15     F_noscreen          = 1 << 3,
16     F_esc               = 1 << 4,
17     F_nojdb             = 1 << 5,
18     F_nokdb             = 1 << 6,
19     F_nohlt             = 1 << 7,
20     F_apic              = 1 << 8,
21     F_loadcnt           = 1 << 9,
22     F_watchdog          = 1 << 10,
23     F_rotext            = 1 << 11,
24     F_profile           = 1 << 12,
25     F_irq0              = 1 << 13,
26     F_profstart         = 1 << 14,
27     F_nosfn             = 1 << 15,
28     F_jdb_never_stop    = 1 << 16,
29
30     F_kmemsize          = 1 << 17,
31     F_tbuf_entries      = 1 << 18,
32     F_out_buf           = 1 << 19,
33     F_uart_baud         = 1 << 20,
34     F_uart_base         = 1 << 21,
35     F_uart_irq          = 1 << 22,
36
37     F_jdb_cmd           = 1 << 23,
38   };
39
40   enum
41   {
42     Magic = 0x4C344B43,
43   };
44
45   enum Uart_types
46   {
47     Uart_type_invalid = 0,
48     Uart_type_ioport  = 1,
49     Uart_type_mmio    = 2,
50   };
51
52   struct Uart
53   {
54     l4_uint32_t  access_type;  ///< Accesstype of UART: unset, MMIO or ports
55     l4_uint32_t  baud;         ///< Baud rate
56     l4_uint32_t  irqno;        ///< (Receive) IRQ
57     l4_uint64_t  base_address; ///< Start address of UART
58   } __attribute__((packed));
59
60   struct Options
61   {
62     l4_uint32_t  magic;            ///< Magic value
63     l4_uint32_t  version;          ///< Version of this structure
64
65     l4_uint32_t  flags;            ///< Option flags
66
67     l4_uint32_t  kmemsize;         ///< Wanted kernel memory size in KiB
68
69     Uart uart;                     ///< Kernel UART
70
71     char         jdb_cmd[128];
72     l4_uint32_t  tbuf_entries;
73     l4_uint32_t  out_buf;
74
75     l4_uint32_t  opt(Flags flag) const { return flags & flag; }
76
77   } __attribute__((packed));
78 };