[PATCH 05/12] xfree86: Remove xf86ReadBIOS

Adam Jackson ajax at redhat.com
Tue Jul 29 12:00:12 PDT 2014


Not being used externally or internally anymore.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/os-support/bsd/alpha_video.c   |  44 ----------
 hw/xfree86/os-support/bsd/arm_video.c     |  43 ----------
 hw/xfree86/os-support/bsd/i386_video.c    |  48 -----------
 hw/xfree86/os-support/bsd/ppc_video.c     |  24 ------
 hw/xfree86/os-support/bsd/sparc64_video.c |   8 --
 hw/xfree86/os-support/hurd/Makefile.am    |   2 +-
 hw/xfree86/os-support/hurd/hurd_mmap.c    |  94 ---------------------
 hw/xfree86/os-support/linux/Makefile.am   |   1 -
 hw/xfree86/os-support/shared/bios_mmap.c  | 135 ------------------------------
 hw/xfree86/os-support/solaris/sun_vid.c   |  84 -------------------
 hw/xfree86/os-support/stub/Makefile.am    |   1 -
 hw/xfree86/os-support/stub/stub_bios.c    |  12 ---
 hw/xfree86/os-support/xf86_OSproc.h       |   2 -
 13 files changed, 1 insertion(+), 497 deletions(-)
 delete mode 100644 hw/xfree86/os-support/hurd/hurd_mmap.c
 delete mode 100644 hw/xfree86/os-support/shared/bios_mmap.c
 delete mode 100644 hw/xfree86/os-support/stub/stub_bios.c

diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index faa3a07..b65b762 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -231,50 +231,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
     pVidMem->initialised = TRUE;
 }
 
-/*
- * Read BIOS via mmap()ing DEV_MEM
- */
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    unsigned char *ptr;
-    int psize;
-    int mlen;
-
-    checkDevMem(TRUE);
-    if (devMemFd == -1) {
-        return -1;
-    }
-
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-    ptr = (unsigned char *) mmap((caddr_t) 0, mlen, PROT_READ,
-                                 MAP_SHARED, devMemFd, (off_t) Base + BUS_BASE);
-    if ((long) ptr == -1) {
-        xf86Msg(X_WARNING,
-                "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
-                DEV_MEM, Len, Base, Offset, strerror(errno));
-        return -1;
-    }
-#ifdef DEBUG
-    xf86MsgVerb(X_INFO, 3,
-                "xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", Base,
-                ptr[0] | (ptr[1] << 8));
-#endif
-    (void) memcpy(Buf, (void *) (ptr + Offset), Len);
-    (void) munmap((caddr_t) ptr, mlen);
-#ifdef DEBUG
-    xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS(%x, %x, Buf, %x)"
-                "-> %02x %02x %02x %02x...\n",
-                Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
-#endif
-    return Len;
-}
-
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
 
 extern int ioperm(unsigned long from, unsigned long num, int on);
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 60f5bca..3a639b8 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -130,49 +130,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
     pVidMem->initialised = TRUE;
 }
 
-/*
- * Read BIOS via mmap()ing DEV_MEM
- */
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    unsigned char *ptr;
-    int psize;
-    int mlen;
-
-    checkDevMem(TRUE);
-    if (devMemFd == -1) {
-        return -1;
-    }
-
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-    ptr = (unsigned char *) mmap((caddr_t) 0, mlen, PROT_READ,
-                                 MAP_SHARED, devMemFd, (off_t) Base + BUS_BASE);
-    if ((long) ptr == -1) {
-        xf86Msg(X_WARNING,
-                "xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
-                DEV_MEM, Len, Base, Offset, strerror(errno));
-        return -1;
-    }
-#ifdef DEBUG
-    ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
-           Base, ptr[0] | (ptr[1] << 8));
-#endif
-    (void) memcpy(Buf, (void *) (ptr + Offset), Len);
-    (void) munmap((caddr_t) ptr, mlen);
-#ifdef DEBUG
-    xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS(%x, %x, Buf, %x)"
-                "-> %02x %02x %02x %02x...\n",
-                Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
-#endif
-    return Len;
-}
-
 #ifdef USE_DEV_IO
 static int IoFd = -1;
 
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 2b2c2a3..dae3555 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -187,54 +187,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
     pVidMem->initialised = TRUE;
 }
 
-/*
- * Read BIOS via mmap()ing DEV_MEM
- */
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    unsigned char *ptr;
-    int psize;
-    int mlen;
-
-    checkDevMem(TRUE);
-    if (devMemFd == -1) {
-        return -1;
-    }
-
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-    ptr = (unsigned char *) mmap((caddr_t) 0, mlen, PROT_READ,
-                                 MAP_SHARED, devMemFd, (off_t) Base);
-    if ((long) ptr == -1) {
-        xf86Msg(X_WARNING,
-                "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
-                DEV_MEM, Len, Base, Offset, strerror(errno));
-#ifdef __OpenBSD__
-        if (Base < 0xa0000) {
-            xf86Msg(X_WARNING, SYSCTL_MSG2);
-        }
-#endif
-        return -1;
-    }
-#ifdef DEBUG
-    ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
-           Base, ptr[0] | (ptr[1] << 8));
-#endif
-    (void) memcpy(Buf, (void *) (ptr + Offset), Len);
-    (void) munmap((caddr_t) ptr, mlen);
-#ifdef DEBUG
-    xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS(%x, %x, Buf, %x)"
-                "-> %02x %02x %02x %02x...\n",
-                Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);
-#endif
-    return Len;
-}
-
 #ifdef USE_I386_IOPL
 /***************************************************************************/
 /* I/O Permissions section                                                 */
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index 0cecd48..b1cf7eb 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -56,30 +56,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 
 volatile unsigned char *ioBase = MAP_FAILED;
 
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    int rv;
-    static int kmem = -1;
-
-    if (kmem == -1) {
-        kmem = open(DEV_MEM, 2);
-        if (kmem == -1) {
-            FatalError("xf86ReadBIOS: open %s", DEV_MEM);
-        }
-    }
-
-#ifdef DEBUG
-    xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS() %lx %lx, %x\n", Base, Offset, Len);
-#endif
-
-    lseek(kmem, Base + Offset, 0);
-    rv = read(kmem, Buf, Len);
-
-    return rv;
-}
-
 Bool
 xf86EnableIO()
 {
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index b87afc1..5bed017 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -43,11 +43,3 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 {
     pVidMem->initialised = TRUE;
 }
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-
-    return 0;
-}
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index f228c1c..3866054 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -1,6 +1,6 @@
 noinst_LTLIBRARIES = libhurd.la
 
-libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \
+libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		hurd_video.c \
 		$(srcdir)/../shared/VTsw_noop.c \
 		$(srcdir)/../shared/posix_tty.c \
diff --git a/hw/xfree86/os-support/hurd/hurd_mmap.c b/hw/xfree86/os-support/hurd/hurd_mmap.c
deleted file mode 100644
index 8e089ca..0000000
--- a/hw/xfree86/os-support/hurd/hurd_mmap.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1997 by UCHIYAMA Yasushi
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of UCHIYAMA Yasushi not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include<mach.h>
-#include<device/device.h>
-#include<mach/machine/mach_i386.h>
-#include <hurd.h>
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-#define BIOS_SIZE 0x20000
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    mach_port_t device, mem_dev;
-    memory_object_t mem_obj;
-    vm_address_t addr = (vm_address_t) 0;       /* serach starting address */
-    kern_return_t err;
-
-    err = get_privileged_ports(NULL, &device);
-    if (err) {
-        errno = err;
-        FatalError("xf86ReadBIOS() can't get_privileged_ports. (%s)\n",
-                   strerror(errno));
-    }
-    err = device_open(device, D_READ | D_WRITE, "mem", &mem_dev);
-    mach_port_deallocate(mach_task_self(), device);
-    if (err) {
-        errno = err;
-        FatalError("xf86ReadBIOS() can't device_open. (%s)\n", strerror(errno));
-    }
-    err =
-        device_map(mem_dev, VM_PROT_READ | VM_PROT_WRITE, Base, BIOS_SIZE,
-                   &mem_obj, 0);
-    if (err) {
-        errno = err;
-        FatalError("xf86ReadBIOS() can't device_map. (%s)\n", strerror(errno));
-    }
-    err = vm_map(mach_task_self(),
-                 &addr,
-                 BIOS_SIZE,
-                 0,
-                 TRUE,
-                 mem_obj,
-                 Base,
-                 FALSE,
-                 VM_PROT_READ | VM_PROT_WRITE,
-                 VM_PROT_READ | VM_PROT_WRITE, VM_INHERIT_SHARE);
-    mach_port_deallocate(mach_task_self(), mem_obj);
-    if (err) {
-        errno = err;
-        FatalError("xf86ReadBIOS() can't vm_map. (%s)\n", strerror(errno));
-    }
-
-    memcpy(Buf, (void *) ((int) addr + Offset), Len);
-
-    err = vm_deallocate(mach_task_self(), addr, BIOS_SIZE);
-    if (err) {
-        errno = err;
-        FatalError("xf86ReadBIOS() can't vm_deallocate. (%s)\n",
-                   strerror(errno));
-    }
-
-    return Len;
-}
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 1686dc2..6fd317a 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -28,7 +28,6 @@ endif
 
 liblinux_la_SOURCES = lnx_init.c lnx_video.c \
                      lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
-                     $(srcdir)/../shared/bios_mmap.c \
 		     $(srcdir)/../shared/VTsw_usl.c \
 		     $(srcdir)/../shared/posix_tty.c \
                      $(srcdir)/../shared/vidmem.c \
diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c
deleted file mode 100644
index e000dc9..0000000
--- a/hw/xfree86/os-support/shared/bios_mmap.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex at goblin.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  David Wexelblat makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Read BIOS via mmap()ing DEV_MEM
- */
-
-#ifndef __alpha__
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    int fd;
-    unsigned char *ptr;
-    int psize;
-    int mlen;
-
-    if ((fd = open(DEV_MEM, O_RDONLY)) < 0) {
-        xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n",
-                DEV_MEM, strerror(errno));
-        return -1;
-    }
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-    ptr = (unsigned char *) mmap((caddr_t) 0, mlen, PROT_READ,
-                                 MAP_SHARED, fd, (off_t) Base);
-    if (ptr == MAP_FAILED) {
-        xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed (%s)\n",
-                DEV_MEM, strerror(errno));
-        close(fd);
-        return -1;
-    }
-    DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n",
-           Base, ptr[0] | (ptr[1] << 8));
-    (void) memcpy(Buf, (void *) (ptr + Offset), Len);
-    (void) munmap((caddr_t) ptr, mlen);
-    (void) close(fd);
-    return Len;
-}
-
-#else                           /* __alpha__ */
-
-  /*
-   *  We trick "mmap" into mapping BUS memory for us via BUS_BASE,
-   *  which is the KSEG address of the start of the DENSE memory
-   *  area.
-   */
-
-  /*
-   * NOTE: there prolly ought to be more validity checks and all
-   *  re: boundaries and sizes and such...
-   */
-
-#ifdef linux
-
-extern unsigned long _bus_base(void);
-
-#define BUS_BASE _bus_base()
-
-#else
-
-extern u_int64_t dense_base(void);
-
-#define BUS_BASE dense_base()
-
-#endif
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    caddr_t base;
-    int fd;
-    int psize;
-    int mlen;
-
-    if ((fd = open(DEV_MEM, O_RDONLY)) < 0) {
-        xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n",
-                DEV_MEM, strerror(errno));
-        return -1;
-    }
-
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-    base = mmap((caddr_t) 0, mlen, PROT_READ,
-                MAP_SHARED, fd, (off_t) (Base + BUS_BASE));
-
-    if (base == MAP_FAILED) {
-        xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to mmap %s (%s)\n",
-                DEV_MEM, strerror(errno));
-        return -1;
-    }
-
-    xf86SlowBCopyFromBus((unsigned char *) (base + Offset), Buf, Len);
-
-    munmap((caddr_t) base, mlen);
-    close(fd);
-    return Len;
-}
-
-#endif                          /* __alpha__ */
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index bab449d..25f7618 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -63,96 +63,12 @@
 /* Video Memory Mapping section 					   */
 /***************************************************************************/
 
-static char *apertureDevName = NULL;
-static int apertureDevFD_ro = -1;
-static int apertureDevFD_rw = -1;
-
-static Bool
-solOpenAperture(void)
-{
-    if (apertureDevName == NULL) {
-        apertureDevName = "/dev/xsvc";
-        if ((apertureDevFD_rw = open(apertureDevName, O_RDWR)) < 0) {
-            xf86MsgVerb(X_WARNING, 0,
-                        "solOpenAperture: failed to open %s (%s)\n",
-                        apertureDevName, strerror(errno));
-            apertureDevName = "/dev/fbs/aperture";
-            apertureDevFD_rw = open(apertureDevName, O_RDWR);
-        }
-        apertureDevFD_ro = open(apertureDevName, O_RDONLY);
-
-        if ((apertureDevFD_rw < 0) || (apertureDevFD_ro < 0)) {
-            xf86MsgVerb(X_WARNING, 0,
-                        "solOpenAperture: failed to open %s (%s)\n",
-                        apertureDevName, strerror(errno));
-            xf86MsgVerb(X_WARNING, 0,
-                        "solOpenAperture: either /dev/fbs/aperture"
-                        " or /dev/xsvc required\n");
-
-            apertureDevName = NULL;
-
-            if (apertureDevFD_rw >= 0) {
-                close(apertureDevFD_rw);
-            }
-            apertureDevFD_rw = -1;
-
-            if (apertureDevFD_ro >= 0) {
-                close(apertureDevFD_ro);
-            }
-            apertureDevFD_ro = -1;
-
-            return FALSE;
-        }
-    }
-    return TRUE;
-}
-
 _X_HIDDEN void
 xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 {
     pVidMem->initialised = TRUE;
 }
 
-/*
- * Read BIOS via mmap()ing physical memory.
- */
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    unsigned char *ptr;
-    int psize;
-    int mlen;
-
-    psize = getpagesize();
-    Offset += Base & (psize - 1);
-    Base &= ~(psize - 1);
-    mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-
-    if (solOpenAperture() == FALSE) {
-        xf86Msg(X_WARNING,
-                "xf86ReadBIOS: Failed to open aperture to read BIOS\n");
-        return -1;
-    }
-
-    ptr = (unsigned char *) mmap(NULL, mlen, PROT_READ,
-                                 MAP_SHARED, apertureDevFD_ro, (off_t) Base);
-    if (ptr == MAP_FAILED) {
-        xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed [0x%08lx, 0x%04x]\n",
-                apertureDevName, Base, mlen);
-        return -1;
-    }
-
-    (void) memcpy(Buf, (void *) (ptr + Offset), Len);
-    if (munmap((caddr_t) ptr, mlen) != 0) {
-        xf86MsgVerb(X_WARNING, 0,
-                    "xf86ReadBIOS: failed to unmap %s (0x%p,0x%x) (%s)\n",
-                    apertureDevName, ptr, mlen, strerror(errno));
-    }
-
-    return Len;
-}
-
 /***************************************************************************/
 /* I/O Permissions section						   */
 /***************************************************************************/
diff --git a/hw/xfree86/os-support/stub/Makefile.am b/hw/xfree86/os-support/stub/Makefile.am
index a39e17d..19468c6 100644
--- a/hw/xfree86/os-support/stub/Makefile.am
+++ b/hw/xfree86/os-support/stub/Makefile.am
@@ -14,6 +14,5 @@ libstub_la_SOURCES = \
 	$(srcdir)/../shared/posix_tty.c \
 	$(srcdir)/../shared/sigio.c \
 	stub_bell.c \
-	stub_bios.c \
 	stub_init.c \
 	stub_video.c
diff --git a/hw/xfree86/os-support/stub/stub_bios.c b/hw/xfree86/os-support/stub/stub_bios.c
deleted file mode 100644
index dbc92fc..0000000
--- a/hw/xfree86/os-support/stub/stub_bios.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86_OSlib.h"
-
-int
-xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
-             int Len)
-{
-    return -1;
-}
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 5337d7b..1c1cc5e 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -113,8 +113,6 @@ _XFUNCPROTOBEGIN
 
 /* public functions */
 extern _X_EXPORT _X_DEPRECATED Bool xf86CheckMTRR(int);
-extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *,
-                                  int);
 extern _X_EXPORT Bool xf86EnableIO(void);
 extern _X_EXPORT void xf86DisableIO(void);
 
-- 
1.9.3



More information about the xorg-devel mailing list