aboutsummaryrefslogtreecommitdiff
path: root/pci-arbiter/pci_access.c
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-11-03 21:35:57 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-11-03 21:37:57 +0100
commitb160d6f3b3cdcd6a293c33cd89dcc46ab54c3264 (patch)
treebabcc0b5db069672277131e914beef6d6b4dddc5 /pci-arbiter/pci_access.c
parent084e5a86e5eca77cec49e08e0d83fe8266eca91b (diff)
downloadhurd-b160d6f3b3cdcd6a293c33cd89dcc46ab54c3264.tar.gz
hurd-b160d6f3b3cdcd6a293c33cd89dcc46ab54c3264.tar.bz2
hurd-b160d6f3b3cdcd6a293c33cd89dcc46ab54c3264.zip
pci-arbiter: Use libpciaccess instead of embedding it
This patch removes all embedded pciaccess code from the arbiter and instead uses the external pciaccess library. * pci-arbiter/Makefile: * Remove pci_access.c and x86_pci.c from the sources. * pci-arbiter/func_files.c: * io_config_file: Use a harcoded PCI config size. * read_rom_file: Grab the full rom first, then return the requested amount. * pci-arbiter/main.c: * main: Call create_fs_tree() w/o pci_sys. Since it's not part of the translator anymore. * pci-arbiter/netfs_impl.c: * netfs_attempt_read: Send pci_device_cfg_read() as the read op. * netfs_attempt_write: Send pci_device_cfg_write() as the write op. * pci-arbiter/pci-ops.c: * S_pci_conf_read: Call libpciaccess' pci_device_cfg_read(). * S_pci_conf_write: Call libpciaccess' pci_device_cfg_write(). * S_pci_get_dev_rom: Set rom.base_addr to zero for the moment, until libpciaccess esposes it properly. * pci-arbiter/pci_access.c: Deleted * pci-arbiter/pci_access.h: Deleted * pci-arbiter/pcifs.c: * create_fs_tree: Remove the pci_sys parameter. Use libpciaccess' iterator. Use a hardcoded config space size. * pci-arbiter/pcifs.h: Definitions for changes in pcifs.c. * pci-arbiter/x86_pci.c: Deleted. * pci-arbiter/x86_pci.h: Deleted.
Diffstat (limited to 'pci-arbiter/pci_access.c')
-rw-r--r--pci-arbiter/pci_access.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/pci-arbiter/pci_access.c b/pci-arbiter/pci_access.c
deleted file mode 100644
index 4d7fc68f..00000000
--- a/pci-arbiter/pci_access.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * PCI access general header.
- *
- * Following code is borrowed from libpciaccess:
- * https://cgit.freedesktop.org/xorg/lib/libpciaccess/
- */
-
-#include "pci_access.h"
-
-#include <errno.h>
-
-#include "x86_pci.h"
-
-/* Configure PCI parameters */
-int
-pci_system_init (void)
-{
- int err = ENOSYS;
-
-#ifdef __GNU__
- err = pci_system_x86_create ();
-#else
-#error "Unsupported OS"
-#endif
-
- return err;
-}