2 * Copyright (c) 2012 Andriy Gapon <avg@FreeBSD.org>
5 * Redistribution and use in source and binary forms are freely
6 * permitted provided that the above copyright notice and this
7 * paragraph and the following disclaimer are duplicated in all
10 * This software is provided "AS IS" and without any express or
11 * implied warranties, including, without limitation, the implied
12 * warranties of merchantability and fitness for a particular
18 #ifndef _BOOT_I386_ARGS_H_
19 #define _BOOT_I386_ARGS_H_
21 #define KARGS_FLAGS_CD 0x1
22 #define KARGS_FLAGS_PXE 0x2
23 #define KARGS_FLAGS_ZFS 0x4
24 #define KARGS_FLAGS_EXTARG 0x8 /* variably sized extended argument */
26 #define BOOTARGS_SIZE 24 /* sizeof(struct bootargs) */
27 #define BA_BOOTFLAGS 8 /* offsetof(struct bootargs, bootflags) */
28 #define BA_BOOTINFO 20 /* offsetof(struct bootargs, bootinfo) */
29 #define BI_SIZE 48 /* offsetof(struct bootinfo, bi_size) */
32 * We reserve some space above BTX allocated stack for the arguments
33 * and certain data that could hang off them. Currently only struct bootinfo
34 * is supported in that category. The bootinfo is placed at the top
35 * of the arguments area and the actual arguments are placed at ARGOFF offset
36 * from the top and grow towards the top. Hopefully we have enough space
37 * for bootinfo and the arguments to not run into each other.
38 * Arguments area below ARGOFF is reserved for future use.
40 #define ARGSPACE 0x1000 /* total size of the BTX args area */
41 #define ARGOFF 0x800 /* actual args offset within the args area */
42 #define ARGADJ (ARGSPACE - ARGOFF)
61 * If KARGS_FLAGS_EXTARG is set in bootflags, then the above fields
62 * are followed by a uint32_t field that specifies a size of the
63 * extended arguments (including the size field).
67 #ifdef LOADER_GELI_SUPPORT
68 #include <crypto/intake.h>
78 * single null byte to stop keybuf
79 * being interpreted as a password
81 uint32_t keybuf_sentinel;
82 #ifdef LOADER_GELI_SUPPORT
83 struct keybuf *keybuf;
91 #endif /*__ASSEMBLER__*/
93 #endif /* !_BOOT_I386_ARGS_H_ */