lkml.org 
[lkml]   [2014]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] x86: Find correct 64 bit ramdisk address for microcode early update
From
On Tue, Jun 10, 2014 at 11:08 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 06/10/2014 10:04 PM, Yinghai Lu wrote:
>> When using kexec with 64bit kernel, bzImage and ramdisk could be
>> loaded above 4G. We need this to get correct ramdisk adress.
>>
>> Make get_ramdisk_image() global and use it for early microcode
>> updating. Also make it to take boot_params pointer for different
>> usage.
>>
>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>>
>
> Have you tested this with early microcode loading on a 32-bit kernel?
>

No, I did not test that on a 32bit kernel. We did not enabled ramdisk
loading high
above 4G, right?

Do you want to me to drop changes for 32 bit path (under those MARCO)?
like:
+++ linux-2.6/arch/x86/kernel/cpu/
microcode/amd_early.c
@@ -51,12 +51,12 @@ static struct cpio_data __init find_ucod
*/
p = (struct boot_params *)__pa_nodebug(&boot_params);
path = (char *)__pa_nodebug(ucode_path);
- start = (void *)p->hdr.ramdisk_image;
- size = p->hdr.ramdisk_size;
+ start = (void *)(unsigned long)get_ramdisk_image(p);
+ size = get_ramdisk_size(p);

+++ linux-2.6/arch/x86/kernel/cpu/microcode/intel_early.c

boot_params_p = (struct boot_params *)__pa_nodebug(&boot_params);
- ramdisk_image = boot_params_p->hdr.ramdisk_
image;
- ramdisk_size = boot_params_p->hdr.ramdisk_size;
+ ramdisk_image = get_ramdisk_image(boot_params_p);
+ ramdisk_size = get_ramdisk_size(boot_params_p);
initrd_start_early = ramdisk_image;
initrd_end_early = initrd_start_early + ramdisk_size;
BTW, Is there any 32bit bootloader that could load ramdisk above 4G?

Thanks

Yinghai


\
 
 \ /
  Last update: 2014-06-11 20:21    [W:0.298 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site