diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-15 20:13:22 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-16 20:38:31 -0400 |
commit | 30c826451d3e5bbc6e11bba0e7fee5d2f49d9b75 (patch) | |
tree | 61abd11d1703673ff21227d42ed4b07d85dd0290 /arch/x86/kernel/efi_32.c | |
parent | 2b0460b534f383eca744eb8fff66ec9f57e702b9 (diff) |
[x86] remove uses of magic macros for boot_params access
Instead of using magic macros for boot_params access, simply use the
boot_params structure.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/efi_32.c')
-rw-r--r-- | arch/x86/kernel/efi_32.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c index 2452c6fbe992..b42558c48e9d 100644 --- a/arch/x86/kernel/efi_32.c +++ b/arch/x86/kernel/efi_32.c | |||
@@ -331,11 +331,13 @@ void __init efi_init(void) | |||
331 | memset(&efi, 0, sizeof(efi) ); | 331 | memset(&efi, 0, sizeof(efi) ); |
332 | memset(&efi_phys, 0, sizeof(efi_phys)); | 332 | memset(&efi_phys, 0, sizeof(efi_phys)); |
333 | 333 | ||
334 | efi_phys.systab = EFI_SYSTAB; | 334 | efi_phys.systab = |
335 | memmap.phys_map = EFI_MEMMAP; | 335 | (efi_system_table_t *)boot_params.efi_info.efi_systab; |
336 | memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; | 336 | memmap.phys_map = (void *)boot_params.efi_info.efi_memmap; |
337 | memmap.desc_version = EFI_MEMDESC_VERSION; | 337 | memmap.nr_map = boot_params.efi_info.efi_memmap_size/ |
338 | memmap.desc_size = EFI_MEMDESC_SIZE; | 338 | boot_params.efi_info.efi_memdesc_size; |
339 | memmap.desc_version = boot_params.efi_info.efi_memdesc_version; | ||
340 | memmap.desc_size = boot_params.efi_info.efi_memdesc_size; | ||
339 | 341 | ||
340 | efi.systab = (efi_system_table_t *) | 342 | efi.systab = (efi_system_table_t *) |
341 | boot_ioremap((unsigned long) efi_phys.systab, | 343 | boot_ioremap((unsigned long) efi_phys.systab, |
@@ -446,7 +448,8 @@ void __init efi_init(void) | |||
446 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); | 448 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); |
447 | 449 | ||
448 | /* Map the EFI memory map for use until paging_init() */ | 450 | /* Map the EFI memory map for use until paging_init() */ |
449 | memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); | 451 | memmap.map = boot_ioremap(boot_params.efi_info.efi_memmap, |
452 | boot_params.efi_info.efi_memmap_size); | ||
450 | if (memmap.map == NULL) | 453 | if (memmap.map == NULL) |
451 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); | 454 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); |
452 | 455 | ||