]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/koptions-def.h
update
[l4.git] / kernel / fiasco / src / kern / koptions-def.h
1 #pragma once
2
3 #include "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_keymap_de         = 1 << 11,
24     F_irq0              = 1 << 13,
25     F_nosfn             = 1 << 15,
26     F_jdb_never_stop    = 1 << 16,
27
28     F_kmemsize          = 1 << 17,
29     F_tbuf_entries      = 1 << 18,
30     F_out_buf           = 1 << 19,
31     F_uart_baud         = 1 << 20,
32     F_uart_base         = 1 << 21,
33     F_uart_irq          = 1 << 22,
34
35     F_jdb_cmd           = 1 << 23,
36   };
37
38   enum
39   {
40     Magic = 0x4C344B43,
41   };
42
43   enum Uart_type
44   {
45     Uart_type_invalid = 0,
46     Uart_type_ioport  = 1,
47     Uart_type_mmio    = 2,
48   };
49
50   struct Uart
51   {
52     Unsigned32  access_type;  ///< Accesstype of UART: unset, MMIO or ports
53     Unsigned32  baud;         ///< Baud rate
54     Unsigned32  irqno;        ///< (Receive) IRQ
55     Unsigned64  base_address; ///< Start address of UART
56   } __attribute__((packed));
57
58   struct Options
59   {
60     Unsigned32  magic;            ///< Magic value
61     Unsigned32  version;          ///< Version of this structure
62
63     Unsigned32  flags;            ///< Option flags
64
65     Unsigned32  kmemsize;         ///< Wanted kernel memory size in KiB
66
67     Uart uart;                     ///< Kernel UART
68
69     char         jdb_cmd[128];
70     Unsigned32  tbuf_entries;
71     Unsigned32  out_buf;
72
73     Unsigned32  opt(Flags flag) const { return flags & flag; }
74
75   } __attribute__((packed));
76 };