diff options
Diffstat (limited to 'kexec/arch/i386')
-rw-r--r-- | kexec/arch/i386/include/arch/options.h | 2 | ||||
-rw-r--r-- | kexec/arch/i386/kexec-x86.h | 1 | ||||
-rw-r--r-- | kexec/arch/i386/x86-linux-setup.c | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/kexec/arch/i386/include/arch/options.h b/kexec/arch/i386/include/arch/options.h index c113a83..0e57951 100644 --- a/kexec/arch/i386/include/arch/options.h +++ b/kexec/arch/i386/include/arch/options.h @@ -32,6 +32,7 @@ #define OPT_ENTRY_32BIT (OPT_ARCH_MAX+10) #define OPT_PASS_MEMMAP_CMDLINE (OPT_ARCH_MAX+11) #define OPT_NOEFI (OPT_ARCH_MAX+12) +#define OPT_REUSE_VIDEO_TYPE (OPT_ARCH_MAX+13) /* Options relevant to the architecture (excluding loader-specific ones): */ #define KEXEC_ARCH_OPTIONS \ @@ -45,6 +46,7 @@ { "elf64-core-headers", 0, 0, OPT_ELF64_CORE }, \ { "pass-memmap-cmdline", 0, 0, OPT_PASS_MEMMAP_CMDLINE }, \ { "noefi", 0, 0, OPT_NOEFI}, \ + { "reuse-video-type", 0, 0, OPT_REUSE_VIDEO_TYPE }, \ #define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR "" diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h index 51855f8..c2bcd37 100644 --- a/kexec/arch/i386/kexec-x86.h +++ b/kexec/arch/i386/kexec-x86.h @@ -52,6 +52,7 @@ struct arch_options_t { enum coretype core_header_type; uint8_t pass_memmap_cmdline; uint8_t noefi; + uint8_t reuse_video_type; }; int multiboot_x86_probe(const char *buf, off_t len); diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c index 1bd408b..8fad115 100644 --- a/kexec/arch/i386/x86-linux-setup.c +++ b/kexec/arch/i386/x86-linux-setup.c @@ -144,7 +144,7 @@ static int setup_linux_vesafb(struct x86_linux_param_header *real_mode) } else if (0 == strcmp(fix.id, "EFI VGA")) { /* VIDEO_TYPE_EFI */ real_mode->orig_video_isVGA = 0x70; - } else { + } else if (arch_options.reuse_video_type) { int err; off_t offset = offsetof(typeof(*real_mode), orig_video_isVGA); @@ -152,6 +152,10 @@ static int setup_linux_vesafb(struct x86_linux_param_header *real_mode) err = get_bootparam(&real_mode->orig_video_isVGA, offset, 1); if (err) goto out; + } else { + real_mode->orig_video_isVGA = 0; + close(fd); + return 0; } close(fd); @@ -844,7 +848,7 @@ void setup_linux_system_parameters(struct kexec_info *info, setup_subarch(real_mode); if (bzImage_support_efi_boot && !arch_options.noefi) setup_efi_info(info, real_mode); - + /* Default screen size */ real_mode->orig_x = 0; real_mode->orig_y = 0; |