mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 11:03:37 +00:00
xloadflags bit 1 indicates that we can load the kernel and all data structures above 4G; it is set if kernel is relocatable and 64bit. bootloader will check if xloadflags bit 1 is set to decide if it could load ramdisk and kernel high above 4G. bootloader will fill value to ext_ramdisk_image/size for high 32bits when it load ramdisk above 4G. kernel use get_ramdisk_image/size to use ext_ramdisk_image/size to get right positon for ramdisk. Signed-off-by: Yinghai Lu <[email protected]> Cc: Rob Landley <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Gokul Caushik <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Joe Millenbach <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
34 lines
750 B
C
34 lines
750 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;
|
|
|
|
cmd_line_ptr |= (u64)real_mode->ext_cmd_line_ptr << 32;
|
|
|
|
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
|