[LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.

This is because it should only contain real I/O memory address ranges,
otherwise we can get false conflicts between a real I/O range and a
'pseudophysical' RAM range, causing drivers to fail to work in a domU.
Also prevent kernel code/data being requested as iomem resources --
they are not contiguous in 'io memory' space so this would not make
sense.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-08-31 03:05:40 +01:00
1 parent 8a1ca3b97e
commit 1a1adcfe49
3 files changed
+8 -6

No files matched your search

@@ -1380,8 +1380,10 @@ legacy_init_iomem_resources(struct e820entry *e820, int nr_map,
* so we try it repeatedly and let the resource manager
* test it.
*/
#ifndef CONFIG_XEN
request_resource(res, code_resource);
request_resource(res, data_resource);
#endif
#ifdef CONFIG_KEXEC
request_resource(res, &crashk_res);
#endif
@@ -1454,11 +1456,8 @@ static void __init register_memory(void)
int i;
/* Nothing to do if not running in dom0. */
if (!is_initial_xendomain()) {
legacy_init_iomem_resources(e820.map, e820.nr_map,
&code_resource, &data_resource);
if (!is_initial_xendomain())
return;
}
#ifdef CONFIG_XEN
machine_e820 = alloc_bootmem_low_pages(PAGE_SIZE);
@@ -255,8 +255,10 @@ void __init e820_reserve_resources(struct e820entry *e820, int nr_map)
* so we try it repeatedly and let the resource manager
* test it.
*/
#ifndef CONFIG_XEN
request_resource(res, &code_resource);
request_resource(res, &data_resource);
#endif
#ifdef CONFIG_KEXEC
request_resource(res, &crashk_res);
#endif
@@ -944,9 +944,10 @@ void __init setup_arch(char **cmdline_p)
BUG_ON(HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap));
e820_reserve_resources(machine_e820, memmap.nr_entries);
} else
#endif
}
#else
e820_reserve_resources(e820.map, e820.nr_map);
#endif
request_resource(&iomem_resource, &video_ram_resource);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.