WIP FPC-III support
[linux/fpc-iii.git] / arch / x86 / boot / compressed / cmdline.c
blobf1add5d85da9d9881e44e2316a2f0018deb364f7
1 // SPDX-License-Identifier: GPL-2.0
2 #include "misc.h"
4 static unsigned long fs;
5 static inline void set_fs(unsigned long seg)
7 fs = seg << 4; /* shift it back */
9 typedef unsigned long addr_t;
10 static inline char rdfs8(addr_t addr)
12 return *((char *)(fs + addr));
14 #include "../cmdline.c"
15 unsigned long get_cmd_line_ptr(void)
17 unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr;
19 cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32;
21 return cmd_line_ptr;
23 int cmdline_find_option(const char *option, char *buffer, int bufsize)
25 return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize);
27 int cmdline_find_option_bool(const char *option)
29 return __cmdline_find_option_bool(get_cmd_line_ptr(), option);