mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-11 06:05:18 +07:00
f1da834cd9
Add an accessor function for the command line address. Later we will add support for holding a 64-bit address via ext_cmd_line_ptr. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-17-git-send-email-yinghai@kernel.org Cc: Gokul Caushik <caushik1@gmail.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Joe Millenbach <jmillenbach@gmail.com> Cc: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
32 lines
692 B
C
32 lines
692 B
C
#include "misc.h"
|
|
|
|
#ifdef CONFIG_EARLY_PRINTK
|
|
|
|
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"
|
|
static unsigned long get_cmd_line_ptr(void)
|
|
{
|
|
unsigned long cmd_line_ptr = real_mode->hdr.cmd_line_ptr;
|
|
|
|
return cmd_line_ptr;
|
|
}
|
|
int cmdline_find_option(const char *option, char *buffer, int bufsize)
|
|
{
|
|
return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize);
|
|
}
|
|
int cmdline_find_option_bool(const char *option)
|
|
{
|
|
return __cmdline_find_option_bool(get_cmd_line_ptr(), option);
|
|
}
|
|
|
|
#endif
|