1 #include "misc.h" 2 3 #if CONFIG_EARLY_PRINTK || CONFIG_RANDOMIZE_BASE 4 5 static unsigned long fs; set_fs(unsigned long seg)6static inline void set_fs(unsigned long seg) 7 { 8 fs = seg << 4; /* shift it back */ 9 } 10 typedef unsigned long addr_t; rdfs8(addr_t addr)11static inline char rdfs8(addr_t addr) 12 { 13 return *((char *)(fs + addr)); 14 } 15 #include "../cmdline.c" get_cmd_line_ptr(void)16static unsigned long get_cmd_line_ptr(void) 17 { 18 unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr; 19 20 cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32; 21 22 return cmd_line_ptr; 23 } cmdline_find_option(const char * option,char * buffer,int bufsize)24int cmdline_find_option(const char *option, char *buffer, int bufsize) 25 { 26 return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize); 27 } cmdline_find_option_bool(const char * option)28int cmdline_find_option_bool(const char *option) 29 { 30 return __cmdline_find_option_bool(get_cmd_line_ptr(), option); 31 } 32 33 #endif 34