]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/x86/boot/compressed/misc.h
Merge tag 'mmc-v4.1' of git://git.linaro.org/people/ulf.hansson/mmc
[karo-tx-linux.git] / arch / x86 / boot / compressed / misc.h
1 #ifndef BOOT_COMPRESSED_MISC_H
2 #define BOOT_COMPRESSED_MISC_H
3
4 /*
5  * we have to be careful, because no indirections are allowed here, and
6  * paravirt_ops is a kind of one. As it will only run in baremetal anyway,
7  * we just keep it from happening
8  */
9 #undef CONFIG_PARAVIRT
10 #undef CONFIG_KASAN
11 #ifdef CONFIG_X86_32
12 #define _ASM_X86_DESC_H 1
13 #endif
14
15 #include <linux/linkage.h>
16 #include <linux/screen_info.h>
17 #include <linux/elf.h>
18 #include <linux/io.h>
19 #include <asm/page.h>
20 #include <asm/boot.h>
21 #include <asm/bootparam.h>
22 #include <asm/bootparam_utils.h>
23
24 #define BOOT_BOOT_H
25 #include "../ctype.h"
26
27 #ifdef CONFIG_X86_64
28 #define memptr long
29 #else
30 #define memptr unsigned
31 #endif
32
33 /* misc.c */
34 extern memptr free_mem_ptr;
35 extern memptr free_mem_end_ptr;
36 extern struct boot_params *real_mode;           /* Pointer to real-mode data */
37 void __putstr(const char *s);
38 #define error_putstr(__x)  __putstr(__x)
39
40 #ifdef CONFIG_X86_VERBOSE_BOOTUP
41
42 #define debug_putstr(__x)  __putstr(__x)
43
44 #else
45
46 static inline void debug_putstr(const char *s)
47 { }
48
49 #endif
50
51 #if CONFIG_EARLY_PRINTK || CONFIG_RANDOMIZE_BASE
52 /* cmdline.c */
53 int cmdline_find_option(const char *option, char *buffer, int bufsize);
54 int cmdline_find_option_bool(const char *option);
55 #endif
56
57
58 #if CONFIG_RANDOMIZE_BASE
59 /* aslr.c */
60 unsigned char *choose_kernel_location(struct boot_params *boot_params,
61                                       unsigned char *input,
62                                       unsigned long input_size,
63                                       unsigned char *output,
64                                       unsigned long output_size);
65 /* cpuflags.c */
66 bool has_cpuflag(int flag);
67 #else
68 static inline
69 unsigned char *choose_kernel_location(struct boot_params *boot_params,
70                                       unsigned char *input,
71                                       unsigned long input_size,
72                                       unsigned char *output,
73                                       unsigned long output_size)
74 {
75         return output;
76 }
77 #endif
78
79 #ifdef CONFIG_EARLY_PRINTK
80 /* early_serial_console.c */
81 extern int early_serial_base;
82 void console_init(void);
83 #else
84 static const int early_serial_base;
85 static inline void console_init(void)
86 { }
87 #endif
88
89 #endif