1 // SPDX-License-Identifier: GPL-2.0
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;
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
);