Commit | Line | Data |
---|---|---|
8fee13a4 YL |
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 | |
393f203f | 10 | #undef CONFIG_KASAN |
8fee13a4 YL |
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> | |
5dcd14ec | 22 | #include <asm/bootparam_utils.h> |
8fee13a4 YL |
23 | |
24 | #define BOOT_BOOT_H | |
6238b47b | 25 | #include "../ctype.h" |
8fee13a4 | 26 | |
82fa9637 KC |
27 | #ifdef CONFIG_X86_64 |
28 | #define memptr long | |
29 | #else | |
30 | #define memptr unsigned | |
31 | #endif | |
32 | ||
8fee13a4 | 33 | /* misc.c */ |
82fa9637 KC |
34 | extern memptr free_mem_ptr; |
35 | extern memptr free_mem_end_ptr; | |
8fee13a4 | 36 | extern struct boot_params *real_mode; /* Pointer to real-mode data */ |
7aac3015 JM |
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 | |
8fee13a4 | 50 | |
8ab3820f | 51 | #if CONFIG_EARLY_PRINTK || CONFIG_RANDOMIZE_BASE |
8fee13a4 YL |
52 | /* cmdline.c */ |
53 | int cmdline_find_option(const char *option, char *buffer, int bufsize); | |
54 | int cmdline_find_option_bool(const char *option); | |
8ab3820f | 55 | #endif |
8fee13a4 | 56 | |
8fee13a4 | 57 | |
8ab3820f KC |
58 | #if CONFIG_RANDOMIZE_BASE |
59 | /* aslr.c */ | |
f47233c2 JK |
60 | unsigned char *choose_kernel_location(struct boot_params *params, |
61 | unsigned char *input, | |
8ab3820f KC |
62 | unsigned long input_size, |
63 | unsigned char *output, | |
64 | unsigned long output_size); | |
5bfce5ef KC |
65 | /* cpuflags.c */ |
66 | bool has_cpuflag(int flag); | |
cec49df9 | 67 | #else |
8ab3820f | 68 | static inline |
f47233c2 JK |
69 | unsigned char *choose_kernel_location(struct boot_params *params, |
70 | unsigned char *input, | |
8ab3820f KC |
71 | unsigned long input_size, |
72 | unsigned char *output, | |
73 | unsigned long output_size) | |
74 | { | |
75 | return output; | |
76 | } | |
77 | #endif | |
cec49df9 | 78 | |
8ab3820f | 79 | #ifdef CONFIG_EARLY_PRINTK |
bd448d4d | 80 | /* early_serial_console.c */ |
8ab3820f KC |
81 | extern int early_serial_base; |
82 | void console_init(void); | |
83 | #else | |
cec49df9 JM |
84 | static const int early_serial_base; |
85 | static inline void console_init(void) | |
86 | { } | |
cec49df9 JM |
87 | #endif |
88 | ||
8fee13a4 | 89 | #endif |