summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/efi_32.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-16 02:13:22 +0200
committerH. Peter Anvin <hpa@zytor.com>2007-10-17 02:38:31 +0200
commit30c826451d3e5bbc6e11bba0e7fee5d2f49d9b75 (patch)
tree61abd11d1703673ff21227d42ed4b07d85dd0290 /arch/x86/kernel/efi_32.c
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 (diff)
downloadlinux-30c826451d3e5bbc6e11bba0e7fee5d2f49d9b75.tar.xz
linux-30c826451d3e5bbc6e11bba0e7fee5d2f49d9b75.zip
[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.c15
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)
memset(&efi, 0, sizeof(efi) );
memset(&efi_phys, 0, sizeof(efi_phys));
- efi_phys.systab = EFI_SYSTAB;
- memmap.phys_map = EFI_MEMMAP;
- memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE;
- memmap.desc_version = EFI_MEMDESC_VERSION;
- memmap.desc_size = EFI_MEMDESC_SIZE;
+ efi_phys.systab =
+ (efi_system_table_t *)boot_params.efi_info.efi_systab;
+ memmap.phys_map = (void *)boot_params.efi_info.efi_memmap;
+ memmap.nr_map = boot_params.efi_info.efi_memmap_size/
+ boot_params.efi_info.efi_memdesc_size;
+ memmap.desc_version = boot_params.efi_info.efi_memdesc_version;
+ memmap.desc_size = boot_params.efi_info.efi_memdesc_size;
efi.systab = (efi_system_table_t *)
boot_ioremap((unsigned long) efi_phys.systab,
@@ -446,7 +448,8 @@ void __init efi_init(void)
printk(KERN_ERR PFX "Could not map the runtime service table!\n");
/* Map the EFI memory map for use until paging_init() */
- memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE);
+ memmap.map = boot_ioremap(boot_params.efi_info.efi_memmap,
+ boot_params.efi_info.efi_memmap_size);
if (memmap.map == NULL)
printk(KERN_ERR PFX "Could not map the EFI memory map!\n");