summaryrefslogtreecommitdiffstats
path: root/include/grub/i386/xen
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:29:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:29:51 +0000
commit6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e (patch)
tree32451fa3cdd9321fb2591fada9891b2cb70a9cd1 /include/grub/i386/xen
parentInitial commit. (diff)
downloadgrub2-3e86199209a10ed6555e30b8b71884cb7cc45ed2.tar.xz
grub2-3e86199209a10ed6555e30b8b71884cb7cc45ed2.zip
Adding upstream version 2.06.upstream/2.06upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--include/grub/i386/xen/hypercall.h88
-rw-r--r--include/grub/i386/xen/kernel.h0
-rw-r--r--include/grub/i386/xen/memory.h0
-rw-r--r--include/grub/i386/xen_pvh/boot.h1
-rw-r--r--include/grub/i386/xen_pvh/console.h1
-rw-r--r--include/grub/i386/xen_pvh/int.h1
-rw-r--r--include/grub/i386/xen_pvh/kernel.h30
-rw-r--r--include/grub/i386/xen_pvh/memory.h1
-rw-r--r--include/grub/i386/xen_pvh/time.h1
9 files changed, 123 insertions, 0 deletions
diff --git a/include/grub/i386/xen/hypercall.h b/include/grub/i386/xen/hypercall.h
new file mode 100644
index 0000000..4e4c12a
--- /dev/null
+++ b/include/grub/i386/xen/hypercall.h
@@ -0,0 +1,88 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2013 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_XEN_CPU_HYPERCALL_HEADER
+#define GRUB_XEN_CPU_HYPERCALL_HEADER 1
+
+#include <grub/types.h>
+
+int
+EXPORT_FUNC (grub_xen_hypercall) (grub_uint32_t callno, grub_uint32_t a0,
+ grub_uint32_t a1, grub_uint32_t a2,
+ grub_uint32_t a3, grub_uint32_t a4,
+ grub_uint32_t a5)
+#ifdef GRUB_MACHINE_XEN
+ __attribute__ ((regparm (3), cdecl))
+#endif
+ ;
+
+static inline int
+grub_xen_sched_op (int cmd, void *arg)
+{
+ return grub_xen_hypercall (__HYPERVISOR_sched_op, cmd, (grub_uint32_t) arg,
+ 0, 0, 0, 0);
+}
+
+static inline int
+grub_xen_mmu_update (const struct mmu_update *reqs,
+ unsigned count, unsigned *done_out, unsigned foreigndom)
+{
+ return grub_xen_hypercall (__HYPERVISOR_mmu_update, (grub_uint32_t) reqs,
+ (grub_uint32_t) count, (grub_uint32_t) done_out,
+ (grub_uint32_t) foreigndom, 0, 0);
+}
+
+static inline int
+grub_xen_mmuext_op (mmuext_op_t * ops,
+ unsigned int count,
+ unsigned int *pdone, unsigned int foreigndom)
+{
+ return grub_xen_hypercall (__HYPERVISOR_mmuext_op, (grub_uint32_t) ops,
+ count, (grub_uint32_t) pdone, foreigndom, 0, 0);
+}
+
+static inline int
+grub_xen_event_channel_op (int op, void *arg)
+{
+ return grub_xen_hypercall (__HYPERVISOR_event_channel_op, op,
+ (grub_uint32_t) arg, 0, 0, 0, 0);
+}
+
+
+static inline int
+grub_xen_update_va_mapping (void *addr, uint64_t pte, uint32_t flags)
+{
+ return grub_xen_hypercall (__HYPERVISOR_update_va_mapping,
+ (grub_uint32_t) addr, pte, pte >> 32, flags, 0,
+ 0);
+}
+
+static inline int
+grub_xen_grant_table_op (int a, void *b, int c)
+{
+ return grub_xen_hypercall (__HYPERVISOR_grant_table_op, a,
+ (grub_uint32_t) b, c, 0, 0, 0);
+}
+
+static inline int
+grub_xen_vm_assist (int cmd, int type)
+{
+ return grub_xen_hypercall (__HYPERVISOR_vm_assist, cmd, type, 0, 0, 0, 0);
+}
+
+#endif
diff --git a/include/grub/i386/xen/kernel.h b/include/grub/i386/xen/kernel.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/grub/i386/xen/kernel.h
diff --git a/include/grub/i386/xen/memory.h b/include/grub/i386/xen/memory.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/grub/i386/xen/memory.h
diff --git a/include/grub/i386/xen_pvh/boot.h b/include/grub/i386/xen_pvh/boot.h
new file mode 100644
index 0000000..6cd23aa
--- /dev/null
+++ b/include/grub/i386/xen_pvh/boot.h
@@ -0,0 +1 @@
+#include <grub/i386/pc/boot.h>
diff --git a/include/grub/i386/xen_pvh/console.h b/include/grub/i386/xen_pvh/console.h
new file mode 100644
index 0000000..305a46d
--- /dev/null
+++ b/include/grub/i386/xen_pvh/console.h
@@ -0,0 +1 @@
+#include <grub/i386/pc/console.h>
diff --git a/include/grub/i386/xen_pvh/int.h b/include/grub/i386/xen_pvh/int.h
new file mode 100644
index 0000000..0f1f9ee
--- /dev/null
+++ b/include/grub/i386/xen_pvh/int.h
@@ -0,0 +1 @@
+#include <grub/i386/pc/int_types.h>
diff --git a/include/grub/i386/xen_pvh/kernel.h b/include/grub/i386/xen_pvh/kernel.h
new file mode 100644
index 0000000..2b7b8a1
--- /dev/null
+++ b/include/grub/i386/xen_pvh/kernel.h
@@ -0,0 +1,30 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2018 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_KERNEL_MACHINE_HEADER
+#define GRUB_KERNEL_MACHINE_HEADER 1
+
+#ifndef ASM_FILE
+
+#define GRUB_KERNEL_USE_RSDP_ADDR 1
+
+extern grub_uint64_t EXPORT_VAR(grub_rsdp_addr);
+
+#endif /* ! ASM_FILE */
+
+#endif /* GRUB_KERNEL_MACHINE_HEADER */
diff --git a/include/grub/i386/xen_pvh/memory.h b/include/grub/i386/xen_pvh/memory.h
new file mode 100644
index 0000000..8dd6f7c
--- /dev/null
+++ b/include/grub/i386/xen_pvh/memory.h
@@ -0,0 +1 @@
+#include <grub/i386/coreboot/memory.h>
diff --git a/include/grub/i386/xen_pvh/time.h b/include/grub/i386/xen_pvh/time.h
new file mode 100644
index 0000000..2298ee8
--- /dev/null
+++ b/include/grub/i386/xen_pvh/time.h
@@ -0,0 +1 @@
+#include <grub/i386/pc/time.h>