mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-27 23:34:51 +00:00
ce21efa858
- Pull in fixes for TSC calibration driver preference (prefer pmtimer over PIT) to boot on Apollo Lake systems with no PIT - Fix pmtimer calibration to not take forever to fail on kvm. Signed-off-by: Peter Jones <pjones@redhat.com>
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 3019712d45a7934a2bf21de8e2745c03701b05cc Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Tue, 30 May 2017 14:16:07 -0400
|
|
Subject: [PATCH 120/123] Fix up linux params usage...
|
|
|
|
Related: rhbz#1310763
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
---
|
|
grub-core/loader/i386/linux.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
|
index b1335f9ed..763863abe 100644
|
|
--- a/grub-core/loader/i386/linux.c
|
|
+++ b/grub-core/loader/i386/linux.c
|
|
@@ -680,6 +680,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|
{
|
|
grub_file_t file = 0;
|
|
struct linux_kernel_header lh;
|
|
+ grub_uint8_t *linux_params_ptr;
|
|
grub_uint8_t setup_sects;
|
|
grub_size_t real_size, prot_size, prot_file_size, kernel_offset;
|
|
grub_ssize_t len;
|
|
@@ -811,6 +812,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|
preferred_address))
|
|
goto fail;
|
|
|
|
+
|
|
grub_memset (&linux_params, 0, sizeof (linux_params));
|
|
grub_memcpy (&linux_params.setup_sects, &lh.setup_sects, sizeof (lh) - 0x1F1);
|
|
|
|
@@ -820,7 +822,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|
|
|
len = sizeof (linux_params) - sizeof (lh);
|
|
|
|
- grub_memcpy (&linux_params + sizeof (lh), kernel + kernel_offset, len);
|
|
+ linux_params_ptr = (void *)&linux_params;
|
|
+ grub_memcpy (linux_params_ptr + sizeof (lh), kernel + kernel_offset, len);
|
|
kernel_offset += len;
|
|
|
|
linux_params.type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
|
|
--
|
|
2.14.3
|
|
|