summaryrefslogtreecommitdiffstats
path: root/lib/physmem.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:30:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:30:56 +0000
commitd3114e0edc60508fc1e44e6cd2733fb2a97cdaca (patch)
tree82d66db664dea6ee75010455b98b04f47fcc4a90 /lib/physmem.h
parentInitial commit. (diff)
downloadpciutils-d3114e0edc60508fc1e44e6cd2733fb2a97cdaca.tar.xz
pciutils-d3114e0edc60508fc1e44e6cd2733fb2a97cdaca.zip
Adding upstream version 1:3.11.1.upstream/1%3.11.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/physmem.h')
-rw-r--r--lib/physmem.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/physmem.h b/lib/physmem.h
new file mode 100644
index 0000000..46ee021
--- /dev/null
+++ b/lib/physmem.h
@@ -0,0 +1,19 @@
+/*
+ * The PCI Library -- Physical memory mapping API
+ *
+ * Copyright (c) 2023 Pali Rohár <pali@kernel.org>
+ *
+ * Can be freely distributed and used under the terms of the GNU GPL v2+
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+struct physmem;
+
+void physmem_init_config(struct pci_access *a);
+int physmem_access(struct pci_access *a, int w);
+struct physmem *physmem_open(struct pci_access *a, int w);
+void physmem_close(struct physmem *physmem);
+long physmem_get_pagesize(struct physmem *physmem);
+void *physmem_map(struct physmem *physmem, u64 addr, size_t length, int w);
+int physmem_unmap(struct physmem *physmem, void *ptr, size_t length);