From 8fee13a48e4879fba57725f6d9513df4bfa8e9f3 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Mon, 2 Aug 2010 16:21:22 -0700 Subject: x86, setup: enable early console output from the decompressor This enables the decompressor output to be seen on the serial console. Most of the code is shared with the regular boot code. We could add printf to the decompressor if needed, but currently there is no sufficiently compelling user. -v2: define BOOT_BOOT_H to avoid include boot.h -v3: early_serial_base need to be static in misc.c ? -v4: create seperate string.c printf.c cmdline.c early_serial_console.c after hpa's patch that allow global variables in compressed/misc stage -v5: remove printf.c related Signed-off-by: Yinghai Lu Signed-off-by: H. Peter Anvin --- arch/x86/boot/compressed/cmdline.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 arch/x86/boot/compressed/cmdline.c (limited to 'arch/x86/boot/compressed/cmdline.c') diff --git a/arch/x86/boot/compressed/cmdline.c b/arch/x86/boot/compressed/cmdline.c new file mode 100644 index 00000000000..cb62f786990 --- /dev/null +++ b/arch/x86/boot/compressed/cmdline.c @@ -0,0 +1,21 @@ +#include "misc.h" + +static unsigned long fs; +static inline void set_fs(unsigned long seg) +{ + fs = seg << 4; /* shift it back */ +} +typedef unsigned long addr_t; +static inline char rdfs8(addr_t addr) +{ + return *((char *)(fs + addr)); +} +#include "../cmdline.c" +int cmdline_find_option(const char *option, char *buffer, int bufsize) +{ + return __cmdline_find_option(real_mode->hdr.cmd_line_ptr, option, buffer, bufsize); +} +int cmdline_find_option_bool(const char *option) +{ + return __cmdline_find_option_bool(real_mode->hdr.cmd_line_ptr, option); +} -- cgit v1.2.3-70-g09d2