summaryrefslogtreecommitdiffstats
path: root/kexec/arch/ia64/kexec-iomem.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:56:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:56:35 +0000
commiteba0cfa6b0bef4f2e73c8630a7efa3944df8b0f8 (patch)
tree74c37eede1f0634cc5de1c63c934edaa1630c6bc /kexec/arch/ia64/kexec-iomem.c
parentInitial commit. (diff)
downloadkexec-tools-upstream/1%2.0.27.tar.xz
kexec-tools-upstream/1%2.0.27.zip
Adding upstream version 1:2.0.27.upstream/1%2.0.27upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kexec/arch/ia64/kexec-iomem.c')
-rw-r--r--kexec/arch/ia64/kexec-iomem.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/kexec/arch/ia64/kexec-iomem.c b/kexec/arch/ia64/kexec-iomem.c
new file mode 100644
index 0000000..7fd50cd
--- /dev/null
+++ b/kexec/arch/ia64/kexec-iomem.c
@@ -0,0 +1,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 used.
+ */
+const char *proc_iomem(void)
+{
+ if (xen_present())
+ return proc_iomem_machine_str;
+ return proc_iomem_str;
+}