if (md->attribute & EFI_MEMORY_RUNTIME) { md->virt_addr = (unsigned long)ioremap(md->phys_addr, md->num_pages << EFI_PAGE_SHIFT); if (!(unsigned long)md->virt_addr) { printk(KERN_ERR PFX "ioremap of 0x%lX failed\n", (unsigned long)md->phys_addr); } 
if (!(md->attribute & EFI_MEMORY_RUNTIME)) continue; 
void __init efi_enter_virtual_mode(void){	efi_memory_desc_t *md;	efi_status_t status;	int i;	efi.systab = NULL;	for (i = 0; i < memmap.nr_map; i++) {		md = &memmap.map[i];		if (md->attribute & EFI_MEMORY_RUNTIME) {			md->virt_addr =				(unsigned long)ioremap(md->phys_addr,					md->num_pages << EFI_PAGE_SHIFT);			if (!(unsigned long)md->virt_addr) {				printk(KERN_ERR PFX "ioremap of 0x%lX failed\n",					(unsigned long)md->phys_addr);			}			if (((unsigned long)md->phys_addr <=					(unsigned long)efi_phys.systab) &&				((unsigned long)efi_phys.systab <					md->phys_addr +					((unsigned long)md->num_pages <<						EFI_PAGE_SHIFT))) {				unsigned long addr;				addr = md->virt_addr - md->phys_addr +						(unsigned long)efi_phys.systab;				efi.systab = (efi_system_table_t *)addr;			}		}	}	if (!efi.systab)		BUG();	status = phys_efi_set_virtual_address_map(			sizeof(efi_memory_desc_t) * memmap.nr_map,			sizeof(efi_memory_desc_t),			memmap.desc_version,		       	memmap.phys_map);	if (status != EFI_SUCCESS) {		printk (KERN_ALERT "You are screwed! "			"Unable to switch EFI into virtual mode "			"(status=%lx)\n", status);		panic("EFI call to SetVirtualAddressMap() failed!");	}	/*	 * Now that EFI is in virtual mode, update the function	 * pointers in the runtime service table to the new virtual addresses.	 */	efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time;	efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time;	efi.get_wakeup_time = (efi_get_wakeup_time_t *)					efi.systab->runtime->get_wakeup_time;	efi.set_wakeup_time = (efi_set_wakeup_time_t *)					efi.systab->runtime->set_wakeup_time;	efi.get_variable = (efi_get_variable_t *)					efi.systab->runtime->get_variable;	efi.get_next_variable = (efi_get_next_variable_t *)					efi.systab->runtime->get_next_variable;	efi.set_variable = (efi_set_variable_t *)					efi.systab->runtime->set_variable;	efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *)					efi.systab->runtime->get_next_high_mono_count;	efi.reset_system = (efi_reset_system_t *)					efi.systab->runtime->reset_system;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/7ae65fd334232468a9d6b523a4fc141cd6ec5ea4/efi.c/clean/arch/i386/kernel/efi.c