summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/boot.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-08-02 11:17:31 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2010-08-03 00:51:56 +0200
commitf4ed2877b16e8146427306aea8819adac5c88374 (patch)
tree9451d9e5bb300634b00c25bd0ab155a1854e4223 /arch/x86/boot/boot.h
parentx86, setup: Allow global variables and functions in the decompressor (diff)
downloadlinux-f4ed2877b16e8146427306aea8819adac5c88374.tar.xz
linux-f4ed2877b16e8146427306aea8819adac5c88374.zip
x86, setup: reorganize the early console setup
Separate early_serial_console from tty.c This allows for reuse of early_serial_console.c/string.c/printf.c/cmdline.c in boot/compressed/. -v2: according to hpa, don't include string.c etc -v3: compressed/misc.c must have early_serial_base as static, so move it back to tty.c for setup code Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4C568D2B.205@kernel.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot/boot.h')
-rw-r--r--arch/x86/boot/boot.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 46c4c5c71af7..00cf51cfc2e6 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -200,21 +200,7 @@ static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
return diff;
}
-static inline int isdigit(int ch)
-{
- return (ch >= '0') && (ch <= '9');
-}
-
-static inline int isxdigit(int ch)
-{
- if (isdigit(ch))
- return true;
-
- if ((ch >= 'a') && (ch <= 'f'))
- return true;
-
- return (ch >= 'A') && (ch <= 'F');
-}
+#include "isdigit.h"
/* Heap -- available for dynamic lists. */
extern char _end[];
@@ -300,8 +286,18 @@ struct biosregs {
void intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg);
/* cmdline.c */
-int cmdline_find_option(const char *option, char *buffer, int bufsize);
-int cmdline_find_option_bool(const char *option);
+int __cmdline_find_option(u32 cmdline_ptr, const char *option, char *buffer, int bufsize);
+int __cmdline_find_option_bool(u32 cmdline_ptr, const char *option);
+static inline int cmdline_find_option(const char *option, char *buffer, int bufsize)
+{
+ return __cmdline_find_option(boot_params.hdr.cmd_line_ptr, option, buffer, bufsize);
+}
+
+static inline int cmdline_find_option_bool(const char *option)
+{
+ return __cmdline_find_option_bool(boot_params.hdr.cmd_line_ptr, option);
+}
+
/* cpu.c, cpucheck.c */
struct cpu_features {
@@ -313,6 +309,10 @@ extern struct cpu_features cpu;
int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr);
int validate_cpu(void);
+/* early_serial_console.c */
+extern int early_serial_base;
+void console_init(void);
+
/* edd.c */
void query_edd(void);
@@ -348,7 +348,6 @@ unsigned int atou(const char *s);
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
/* tty.c */
-void console_init(void);
void puts(const char *);
void putchar(int);
int getchar(void);