summaryrefslogtreecommitdiff
path: root/kexec/arch/ia64/kexec-iomem.c
blob: 97f7730341bc4129e41c6e4a943f3c66d322e310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdint.h>
#include <stdio.h>
#include "../../kexec.h"
#include "../../crashdump.h"

static const char proc_iomem_str[]= "/proc/iomem";
static const char proc_iomem_machine_str[]= "/proc/iomem_machine";

/*
 * On IA64 XEN the EFI tables are virtualised.
 * For this reason on such systems /proc/iomem_machine is provided,
 * which is based on the hypervisor's (machine's) EFI tables.
 * If Xen is in use, then /proc/iomem is used for memory regions relating
 * to the currently running dom0 kernel, and /proc/iomem_machine is used
 * for regions relating to the machine itself or the hypervisor.
 * If Xen is not in used, then /proc/iomem is always used.
 */
const char *proc_iomem(int machine)
{
	if (machine && xen_present())
		return proc_iomem_machine_str;
	return proc_iomem_str;
}