<div dir="ltr"><div><br>ping :-)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 6:13 PM Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
 freebsd/sys/dev/fb/fb.c              | 762 ---------------------------<br>
 libbsd.py                            |   1 -<br>
 rtemsbsd/include/bsp/nexus-devices.h |   2 -<br>
 3 files changed, 765 deletions(-)<br>
 delete mode 100644 freebsd/sys/dev/fb/fb.c<br>
<br>
diff --git a/freebsd/sys/dev/fb/fb.c b/freebsd/sys/dev/fb/fb.c<br>
deleted file mode 100644<br>
index a3263c91..00000000<br>
--- a/freebsd/sys/dev/fb/fb.c<br>
+++ /dev/null<br>
@@ -1,762 +0,0 @@<br>
-#include <machine/rtems-bsd-kernel-space.h><br>
-<br>
-/*-<br>
- * SPDX-License-Identifier: BSD-3-Clause<br>
- *<br>
- * Copyright (c) 1999 Kazutaka YOKOTA <<a href="mailto:yokota@zodiac.mech.utsunomiya-u.ac.jp" target="_blank">yokota@zodiac.mech.utsunomiya-u.ac.jp</a>><br>
- * All rights reserved.<br>
- *<br>
- * Redistribution and use in source and binary forms, with or without<br>
- * modification, are permitted provided that the following conditions<br>
- * are met:<br>
- * 1. Redistributions of source code must retain the above copyright<br>
- *    notice, this list of conditions and the following disclaimer as<br>
- *    the first lines of this file unmodified.<br>
- * 2. Redistributions in binary form must reproduce the above copyright<br>
- *    notice, this list of conditions and the following disclaimer in the<br>
- *    documentation and/or other materials provided with the distribution.<br>
- * 3. The name of the author may not be used to endorse or promote products<br>
- *    derived from this software without specific prior written permission.<br>
- *<br>
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR<br>
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES<br>
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.<br>
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,<br>
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT<br>
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,<br>
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY<br>
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT<br>
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF<br>
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
- */<br>
-<br>
-#include <sys/cdefs.h><br>
-__FBSDID("$FreeBSD$");<br>
-<br>
-#include <rtems/bsd/local/opt_fb.h><br>
-<br>
-#include <sys/param.h><br>
-#include <sys/systm.h><br>
-#include <sys/conf.h><br>
-#include <sys/bus.h><br>
-#include <sys/kernel.h><br>
-#include <sys/malloc.h><br>
-#include <sys/module.h><br>
-#include <sys/uio.h><br>
-#include <sys/fbio.h><br>
-#include <sys/linker_set.h><br>
-<br>
-#include <vm/vm.h><br>
-#include <vm/pmap.h><br>
-<br>
-#include <dev/fb/fbreg.h><br>
-<br>
-SET_DECLARE(videodriver_set, const video_driver_t);<br>
-<br>
-/* local arrays */<br>
-<br>
-/*<br>
- * We need at least one entry each in order to initialize a video card<br>
- * for the kernel console.  The arrays will be increased dynamically<br>
- * when necessary.<br>
- */<br>
-<br>
-static int             vid_malloc;<br>
-static int             adapters = 1;<br>
-static video_adapter_t *adp_ini;<br>
-static video_adapter_t **adapter = &adp_ini;<br>
-static video_switch_t  *vidsw_ini;<br>
-       video_switch_t  **vidsw = &vidsw_ini;<br>
-<br>
-#ifdef FB_INSTALL_CDEV<br>
-static struct cdevsw   *vidcdevsw_ini;<br>
-static struct cdevsw   **vidcdevsw = &vidcdevsw_ini;<br>
-#endif<br>
-<br>
-#define ARRAY_DELTA    4<br>
-<br>
-static int<br>
-vid_realloc_array(void)<br>
-{<br>
-       video_adapter_t **new_adp;<br>
-       video_switch_t **new_vidsw;<br>
-#ifdef FB_INSTALL_CDEV<br>
-       struct cdevsw **new_cdevsw;<br>
-#endif<br>
-       int newsize;<br>
-       int s;<br>
-<br>
-       if (!vid_malloc)<br>
-               return ENOMEM;<br>
-<br>
-       s = spltty();<br>
-       newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA);<br>
-       new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO);<br>
-       new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,<br>
-           M_WAITOK | M_ZERO);<br>
-#ifdef FB_INSTALL_CDEV<br>
-       new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,<br>
-           M_WAITOK | M_ZERO);<br>
-#endif<br>
-       bcopy(adapter, new_adp, sizeof(*adapter)*adapters);<br>
-       bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);<br>
-#ifdef FB_INSTALL_CDEV<br>
-       bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters);<br>
-#endif<br>
-       if (adapters > 1) {<br>
-               free(adapter, M_DEVBUF);<br>
-               free(vidsw, M_DEVBUF);<br>
-#ifdef FB_INSTALL_CDEV<br>
-               free(vidcdevsw, M_DEVBUF);<br>
-#endif<br>
-       }<br>
-       adapter = new_adp;<br>
-       vidsw = new_vidsw;<br>
-#ifdef FB_INSTALL_CDEV<br>
-       vidcdevsw = new_cdevsw;<br>
-#endif<br>
-       adapters = newsize;<br>
-       splx(s);<br>
-<br>
-       if (bootverbose)<br>
-               printf("fb: new array size %d\n", adapters);<br>
-<br>
-       return 0;<br>
-}<br>
-<br>
-static void<br>
-vid_malloc_init(void *arg)<br>
-{<br>
-       vid_malloc = TRUE;<br>
-}<br>
-<br>
-SYSINIT(vid_mem, SI_SUB_KMEM, SI_ORDER_ANY, vid_malloc_init, NULL);<br>
-<br>
-/*<br>
- * Low-level frame buffer driver functions<br>
- * frame buffer subdrivers, such as the VGA driver, call these functions<br>
- * to initialize the video_adapter structure and register it to the virtual<br>
- * frame buffer driver `fb'.<br>
- */<br>
-<br>
-/* initialize the video_adapter_t structure */<br>
-void<br>
-vid_init_struct(video_adapter_t *adp, char *name, int type, int unit)<br>
-{<br>
-       adp->va_flags = 0;<br>
-       adp->va_name = name;<br>
-       adp->va_type = type;<br>
-       adp->va_unit = unit;<br>
-}<br>
-<br>
-/* Register a video adapter */<br>
-int<br>
-vid_register(video_adapter_t *adp)<br>
-{<br>
-       const video_driver_t **list;<br>
-       const video_driver_t *p;<br>
-       int index;<br>
-<br>
-       for (index = 0; index < adapters; ++index) {<br>
-               if (adapter[index] == NULL)<br>
-                       break;<br>
-       }<br>
-       if (index >= adapters) {<br>
-               if (vid_realloc_array())<br>
-                       return -1;<br>
-       }<br>
-<br>
-       adp->va_index = index;<br>
-       adp->va_token = NULL;<br>
-       SET_FOREACH(list, videodriver_set) {<br>
-               p = *list;<br>
-               if (strcmp(p->name, adp->va_name) == 0) {<br>
-                       adapter[index] = adp;<br>
-                       vidsw[index] = p->vidsw;<br>
-                       return index;<br>
-               }<br>
-       }<br>
-<br>
-       return -1;<br>
-}<br>
-<br>
-int<br>
-vid_unregister(video_adapter_t *adp)<br>
-{<br>
-       if ((adp->va_index < 0) || (adp->va_index >= adapters))<br>
-               return ENOENT;<br>
-       if (adapter[adp->va_index] != adp)<br>
-               return ENOENT;<br>
-<br>
-       adapter[adp->va_index] = NULL;<br>
-       vidsw[adp->va_index] = NULL;<br>
-       return 0;<br>
-}<br>
-<br>
-/* Get video I/O function table */<br>
-video_switch_t<br>
-*vid_get_switch(char *name)<br>
-{<br>
-       const video_driver_t **list;<br>
-       const video_driver_t *p;<br>
-<br>
-       SET_FOREACH(list, videodriver_set) {<br>
-               p = *list;<br>
-               if (strcmp(p->name, name) == 0)<br>
-                       return p->vidsw;<br>
-       }<br>
-<br>
-       return NULL;<br>
-}<br>
-<br>
-/*<br>
- * Video card client functions<br>
- * Video card clients, such as the console driver `syscons' and the frame<br>
- * buffer cdev driver, use these functions to claim and release a card for<br>
- * exclusive use.<br>
- */<br>
-<br>
-/* find the video card specified by a driver name and a unit number */<br>
-int<br>
-vid_find_adapter(char *driver, int unit)<br>
-{<br>
-       int i;<br>
-<br>
-       for (i = 0; i < adapters; ++i) {<br>
-               if (adapter[i] == NULL)<br>
-                       continue;<br>
-               if (strcmp("*", driver) && strcmp(adapter[i]->va_name, driver))<br>
-                       continue;<br>
-               if ((unit != -1) && (adapter[i]->va_unit != unit))<br>
-                       continue;<br>
-               return i;<br>
-       }<br>
-       return -1;<br>
-}<br>
-<br>
-/* allocate a video card */<br>
-int<br>
-vid_allocate(char *driver, int unit, void *id)<br>
-{<br>
-       int index;<br>
-       int s;<br>
-<br>
-       s = spltty();<br>
-       index = vid_find_adapter(driver, unit);<br>
-       if (index >= 0) {<br>
-               if (adapter[index]->va_token) {<br>
-                       splx(s);<br>
-                       return -1;<br>
-               }<br>
-               adapter[index]->va_token = id;<br>
-       }<br>
-       splx(s);<br>
-       return index;<br>
-}<br>
-<br>
-int<br>
-vid_release(video_adapter_t *adp, void *id)<br>
-{<br>
-       int error;<br>
-       int s;<br>
-<br>
-       s = spltty();<br>
-       if (adp->va_token == NULL) {<br>
-               error = EINVAL;<br>
-       } else if (adp->va_token != id) {<br>
-               error = EPERM;<br>
-       } else {<br>
-               adp->va_token = NULL;<br>
-               error = 0;<br>
-       }<br>
-       splx(s);<br>
-       return error;<br>
-}<br>
-<br>
-/* Get a video adapter structure */<br>
-video_adapter_t<br>
-*vid_get_adapter(int index)<br>
-{<br>
-       if ((index < 0) || (index >= adapters))<br>
-               return NULL;<br>
-       return adapter[index];<br>
-}<br>
-<br>
-/* Configure drivers: this is a backdoor for the console driver XXX */<br>
-int<br>
-vid_configure(int flags)<br>
-{<br>
-       const video_driver_t **list;<br>
-       const video_driver_t *p;<br>
-<br>
-       SET_FOREACH(list, videodriver_set) {<br>
-               p = *list;<br>
-               if (p->configure != NULL)<br>
-                       (*p->configure)(flags);<br>
-       }<br>
-<br>
-       return 0;<br>
-}<br>
-<br>
-/*<br>
- * Virtual frame buffer cdev driver functions<br>
- * The virtual frame buffer driver dispatches driver functions to<br>
- * appropriate subdrivers.<br>
- */<br>
-<br>
-#define FB_DRIVER_NAME "fb"<br>
-<br>
-#ifdef FB_INSTALL_CDEV<br>
-<br>
-#if 0 /* experimental */<br>
-<br>
-static devclass_t      fb_devclass;<br>
-<br>
-static int             fbprobe(device_t dev);<br>
-static int             fbattach(device_t dev);<br>
-<br>
-static device_method_t fb_methods[] = {<br>
-       DEVMETHOD(device_probe,         fbprobe),<br>
-       DEVMETHOD(device_attach,        fbattach),<br>
-<br>
-       DEVMETHOD_END<br>
-};<br>
-<br>
-static driver_t fb_driver = {<br>
-       FB_DRIVER_NAME,<br>
-       fb_methods,<br>
-       0,<br>
-};<br>
-<br>
-static int<br>
-fbprobe(device_t dev)<br>
-{<br>
-       int unit;<br>
-<br>
-       unit = device_get_unit(dev);<br>
-       if (unit >= adapters)<br>
-               return ENXIO;<br>
-       if (adapter[unit] == NULL)<br>
-               return ENXIO;<br>
-<br>
-       device_set_desc(dev, "generic frame buffer");<br>
-       return 0;<br>
-}<br>
-<br>
-static int<br>
-fbattach(device_t dev)<br>
-{<br>
-       printf("fbattach: about to attach children\n");<br>
-       bus_generic_attach(dev);<br>
-       return 0;<br>
-}<br>
-<br>
-#endif<br>
-<br>
-#define FB_UNIT(dev)   dev2unit(dev)<br>
-#define FB_MKMINOR(unit) (u)<br>
-<br>
-#if 0 /* experimental */<br>
-static d_open_t                fbopen;<br>
-static d_close_t       fbclose;<br>
-static d_read_t                fbread;<br>
-static d_write_t       fbwrite;<br>
-static d_ioctl_t       fbioctl;<br>
-static d_mmap_t                fbmmap;<br>
-<br>
-<br>
-static struct cdevsw fb_cdevsw = {<br>
-       .d_version =    D_VERSION,<br>
-       .d_flags =      D_NEEDGIANT,<br>
-       .d_open =       fbopen,<br>
-       .d_close =      fbclose,<br>
-       .d_read =       fbread,<br>
-       .d_write =      fbwrite,<br>
-       .d_ioctl =      fbioctl,<br>
-       .d_mmap =       fbmmap,<br>
-       .d_name =       FB_DRIVER_NAME,<br>
-};<br>
-#endif<br>
-<br>
-<br>
-static int<br>
-fb_modevent(module_t mod, int type, void *data) <br>
-{ <br>
-<br>
-       switch (type) { <br>
-       case MOD_LOAD: <br>
-               break; <br>
-       case MOD_UNLOAD: <br>
-               printf("fb module unload - not possible for this module type\n"); <br>
-               return EINVAL; <br>
-       default:<br>
-               return EOPNOTSUPP;<br>
-       } <br>
-       return 0; <br>
-} <br>
-<br>
-static moduledata_t fb_mod = { <br>
-       "fb", <br>
-       fb_modevent, <br>
-       NULL<br>
-}; <br>
-<br>
-DECLARE_MODULE(fb, fb_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);<br>
-<br>
-int<br>
-fb_attach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)<br>
-{<br>
-       int s;<br>
-<br>
-       if (adp->va_index >= adapters)<br>
-               return EINVAL;<br>
-       if (adapter[adp->va_index] != adp)<br>
-               return EINVAL;<br>
-<br>
-       s = spltty();<br>
-       adp->va_minor = unit;<br>
-       vidcdevsw[adp->va_index] = cdevsw;<br>
-       splx(s);<br>
-<br>
-       printf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit);<br>
-       return 0;<br>
-}<br>
-<br>
-int<br>
-fb_detach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)<br>
-{<br>
-       int s;<br>
-<br>
-       if (adp->va_index >= adapters)<br>
-               return EINVAL;<br>
-       if (adapter[adp->va_index] != adp)<br>
-               return EINVAL;<br>
-       if (vidcdevsw[adp->va_index] != cdevsw)<br>
-               return EINVAL;<br>
-<br>
-       s = spltty();<br>
-       vidcdevsw[adp->va_index] = NULL;<br>
-       splx(s);<br>
-       return 0;<br>
-}<br>
-<br>
-/*<br>
- * Generic frame buffer cdev driver functions<br>
- * Frame buffer subdrivers may call these functions to implement common<br>
- * driver functions.<br>
- */<br>
-<br>
-int genfbopen(genfb_softc_t *sc, video_adapter_t *adp, int flag, int mode,<br>
-             struct thread *td)<br>
-{<br>
-       int s;<br>
-<br>
-       s = spltty();<br>
-       if (!(sc->gfb_flags & FB_OPEN))<br>
-               sc->gfb_flags |= FB_OPEN;<br>
-       splx(s);<br>
-       return 0;<br>
-}<br>
-<br>
-int genfbclose(genfb_softc_t *sc, video_adapter_t *adp, int flag, int mode,<br>
-              struct thread *td)<br>
-{<br>
-       int s;<br>
-<br>
-       s = spltty();<br>
-       sc->gfb_flags &= ~FB_OPEN;<br>
-       splx(s);<br>
-       return 0;<br>
-}<br>
-<br>
-int genfbread(genfb_softc_t *sc, video_adapter_t *adp, struct uio *uio,<br>
-             int flag)<br>
-{<br>
-       int size;<br>
-       int offset;<br>
-       int error;<br>
-       int len;<br>
-<br>
-       error = 0;<br>
-       size = adp->va_buffer_size/adp->va_info.vi_planes;<br>
-       while (uio->uio_resid > 0) {<br>
-               if (uio->uio_offset >= size)<br>
-                       break;<br>
-               offset = uio->uio_offset%adp->va_window_size;<br>
-               len = imin(uio->uio_resid, size - uio->uio_offset);<br>
-               len = imin(len, adp->va_window_size - offset);<br>
-               if (len <= 0)<br>
-                       break;<br>
-               vidd_set_win_org(adp, uio->uio_offset);<br>
-               error = uiomove((caddr_t)(adp->va_window + offset), len, uio);<br>
-               if (error)<br>
-                       break;<br>
-       }<br>
-       return error;<br>
-}<br>
-<br>
-int genfbwrite(genfb_softc_t *sc, video_adapter_t *adp, struct uio *uio,<br>
-              int flag)<br>
-{<br>
-       return ENODEV;<br>
-}<br>
-<br>
-int genfbioctl(genfb_softc_t *sc, video_adapter_t *adp, u_long cmd,<br>
-              caddr_t arg, int flag, struct thread *td)<br>
-{<br>
-       int error;<br>
-<br>
-       if (adp == NULL)        /* XXX */<br>
-               return ENXIO;<br>
-       error = vidd_ioctl(adp, cmd, arg);<br>
-       if (error == ENOIOCTL)<br>
-               error = ENODEV;<br>
-       return error;<br>
-}<br>
-<br>
-int genfbmmap(genfb_softc_t *sc, video_adapter_t *adp, vm_ooffset_t offset,<br>
-             vm_offset_t *paddr, int prot, vm_memattr_t *memattr)<br>
-{<br>
-       return vidd_mmap(adp, offset, paddr, prot, memattr);<br>
-}<br>
-<br>
-#endif /* FB_INSTALL_CDEV */<br>
-<br>
-static char<br>
-*adapter_name(int type)<br>
-{<br>
-    static struct {<br>
-       int type;<br>
-       char *name;<br>
-    } names[] = {<br>
-       { KD_MONO,      "MDA" },<br>
-       { KD_HERCULES,  "Hercules" },<br>
-       { KD_CGA,       "CGA" },<br>
-       { KD_EGA,       "EGA" },<br>
-       { KD_VGA,       "VGA" },<br>
-       { KD_TGA,       "TGA" },<br>
-       { -1,           "Unknown" },<br>
-    };<br>
-    int i;<br>
-<br>
-    for (i = 0; names[i].type != -1; ++i)<br>
-       if (names[i].type == type)<br>
-           break;<br>
-    return names[i].name;<br>
-}<br>
-<br>
-/*<br>
- * Generic low-level frame buffer functions<br>
- * The low-level functions in the frame buffer subdriver may use these<br>
- * functions.<br>
- */<br>
-<br>
-void<br>
-fb_dump_adp_info(char *driver, video_adapter_t *adp, int level)<br>
-{<br>
-    if (level <= 0)<br>
-       return;<br>
-<br>
-    printf("%s%d: %s%d, %s, type:%s (%d), flags:0x%x\n", <br>
-          FB_DRIVER_NAME, adp->va_index, driver, adp->va_unit, adp->va_name,<br>
-          adapter_name(adp->va_type), adp->va_type, adp->va_flags);<br>
-    printf("%s%d: port:0x%lx-0x%lx, crtc:0x%lx, mem:0x%lx 0x%x\n",<br>
-          FB_DRIVER_NAME, adp->va_index, (u_long)adp->va_io_base, <br>
-          (u_long)adp->va_io_base + adp->va_io_size - 1,<br>
-          (u_long)adp->va_crtc_addr, (u_long)adp->va_mem_base, <br>
-          adp->va_mem_size);<br>
-    printf("%s%d: init mode:%d, bios mode:%d, current mode:%d\n",<br>
-          FB_DRIVER_NAME, adp->va_index,<br>
-          adp->va_initial_mode, adp->va_initial_bios_mode, adp->va_mode);<br>
-    printf("%s%d: window:%p size:%dk gran:%dk, buf:%p size:%dk\n",<br>
-          FB_DRIVER_NAME, adp->va_index, <br>
-          (void *)adp->va_window, (int)adp->va_window_size/1024,<br>
-          (int)adp->va_window_gran/1024, (void *)adp->va_buffer,<br>
-          (int)adp->va_buffer_size/1024);<br>
-}<br>
-<br>
-void<br>
-fb_dump_mode_info(char *driver, video_adapter_t *adp, video_info_t *info,<br>
-                 int level)<br>
-{<br>
-    if (level <= 0)<br>
-       return;<br>
-<br>
-    printf("%s%d: %s, mode:%d, flags:0x%x ", <br>
-          driver, adp->va_unit, adp->va_name, info->vi_mode, info->vi_flags);<br>
-    if (info->vi_flags & V_INFO_GRAPHICS)<br>
-       printf("G %dx%dx%d, %d plane(s), font:%dx%d, ",<br>
-              info->vi_width, info->vi_height, <br>
-              info->vi_depth, info->vi_planes, <br>
-              info->vi_cwidth, info->vi_cheight); <br>
-    else<br>
-       printf("T %dx%d, font:%dx%d, ",<br>
-              info->vi_width, info->vi_height, <br>
-              info->vi_cwidth, info->vi_cheight); <br>
-    printf("win:0x%lx\n", (u_long)info->vi_window);<br>
-}<br>
-<br>
-int<br>
-fb_type(int adp_type)<br>
-{<br>
-       static struct {<br>
-               int     fb_type;<br>
-               int     va_type;<br>
-       } types[] = {<br>
-               { FBTYPE_MDA,           KD_MONO },<br>
-               { FBTYPE_HERCULES,      KD_HERCULES },<br>
-               { FBTYPE_CGA,           KD_CGA },<br>
-               { FBTYPE_EGA,           KD_EGA },<br>
-               { FBTYPE_VGA,           KD_VGA },<br>
-               { FBTYPE_TGA,           KD_TGA },<br>
-       };<br>
-       int i;<br>
-<br>
-       for (i = 0; i < nitems(types); ++i) {<br>
-               if (types[i].va_type == adp_type)<br>
-                       return types[i].fb_type;<br>
-       }<br>
-       return -1;<br>
-}<br>
-<br>
-int<br>
-fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)<br>
-{<br>
-       int error;<br>
-       int s;<br>
-<br>
-       /* assert(adp != NULL) */<br>
-<br>
-       error = 0;<br>
-       s = spltty();<br>
-<br>
-       switch (cmd) {<br>
-<br>
-       case FBIO_ADAPTER:      /* get video adapter index */<br>
-               *(int *)arg = adp->va_index;<br>
-               break;<br>
-<br>
-       case FBIO_ADPTYPE:      /* get video adapter type */<br>
-               *(int *)arg = adp->va_type;<br>
-               break;<br>
-<br>
-       case FBIO_ADPINFO:      /* get video adapter info */<br>
-               ((video_adapter_info_t *)arg)->va_index = adp->va_index;<br>
-               ((video_adapter_info_t *)arg)->va_type = adp->va_type;<br>
-               bcopy(adp->va_name, ((video_adapter_info_t *)arg)->va_name,<br>
-                     imin(strlen(adp->va_name) + 1,<br>
-                          sizeof(((video_adapter_info_t *)arg)->va_name))); <br>
-               ((video_adapter_info_t *)arg)->va_unit = adp->va_unit;<br>
-               ((video_adapter_info_t *)arg)->va_flags = adp->va_flags;<br>
-               ((video_adapter_info_t *)arg)->va_io_base = adp->va_io_base;<br>
-               ((video_adapter_info_t *)arg)->va_io_size = adp->va_io_size;<br>
-               ((video_adapter_info_t *)arg)->va_crtc_addr = adp->va_crtc_addr;<br>
-               ((video_adapter_info_t *)arg)->va_mem_base = adp->va_mem_base;<br>
-               ((video_adapter_info_t *)arg)->va_mem_size = adp->va_mem_size;<br>
-               ((video_adapter_info_t *)arg)->va_window<br>
-#if defined(__amd64__) || defined(__i386__)<br>
-                       = vtophys(adp->va_window);<br>
-#else<br>
-                       = adp->va_window;<br>
-#endif<br>
-               ((video_adapter_info_t *)arg)->va_window_size<br>
-                       = adp->va_window_size;<br>
-               ((video_adapter_info_t *)arg)->va_window_gran<br>
-                       = adp->va_window_gran;<br>
-               ((video_adapter_info_t *)arg)->va_window_orig<br>
-                       = adp->va_window_orig;<br>
-               ((video_adapter_info_t *)arg)->va_unused0<br>
-#if defined(__amd64__) || defined(__i386__)<br>
-                       = adp->va_buffer != 0 ? vtophys(adp->va_buffer) : 0;<br>
-#else<br>
-                       = adp->va_buffer;<br>
-#endif<br>
-               ((video_adapter_info_t *)arg)->va_buffer_size<br>
-                       = adp->va_buffer_size;<br>
-               ((video_adapter_info_t *)arg)->va_mode = adp->va_mode;<br>
-               ((video_adapter_info_t *)arg)->va_initial_mode<br>
-                       = adp->va_initial_mode;<br>
-               ((video_adapter_info_t *)arg)->va_initial_bios_mode<br>
-                       = adp->va_initial_bios_mode;<br>
-               ((video_adapter_info_t *)arg)->va_line_width<br>
-                       = adp->va_line_width;<br>
-               ((video_adapter_info_t *)arg)->va_disp_start.x<br>
-                       = adp->va_disp_start.x;<br>
-               ((video_adapter_info_t *)arg)->va_disp_start.y<br>
-                       = adp->va_disp_start.y;<br>
-               break;<br>
-<br>
-       case FBIO_MODEINFO:     /* get mode information */<br>
-               error = vidd_get_info(adp,<br>
-                   ((video_info_t *)arg)->vi_mode,<br>
-                   (video_info_t *)arg);<br>
-               if (error)<br>
-                       error = ENODEV;<br>
-               break;<br>
-<br>
-       case FBIO_FINDMODE:     /* find a matching video mode */<br>
-               error = vidd_query_mode(adp, (video_info_t *)arg);<br>
-               break;<br>
-<br>
-       case FBIO_GETMODE:      /* get video mode */<br>
-               *(int *)arg = adp->va_mode;<br>
-               break;<br>
-<br>
-       case FBIO_SETMODE:      /* set video mode */<br>
-               error = vidd_set_mode(adp, *(int *)arg);<br>
-               if (error)<br>
-                       error = ENODEV; /* EINVAL? */<br>
-               break;<br>
-<br>
-       case FBIO_GETWINORG:    /* get frame buffer window origin */<br>
-               *(u_int *)arg = adp->va_window_orig;<br>
-               break;<br>
-<br>
-       case FBIO_GETDISPSTART: /* get display start address */<br>
-               ((video_display_start_t *)arg)->x = adp->va_disp_start.x;<br>
-               ((video_display_start_t *)arg)->y = adp->va_disp_start.y;<br>
-               break;<br>
-<br>
-       case FBIO_GETLINEWIDTH: /* get scan line width in bytes */<br>
-               *(u_int *)arg = adp->va_line_width;<br>
-               break;<br>
-<br>
-       case FBIO_BLANK:        /* blank display */<br>
-               error = vidd_blank_display(adp, *(int *)arg);<br>
-               break;<br>
-<br>
-       case FBIO_GETPALETTE:   /* get color palette */<br>
-       case FBIO_SETPALETTE:   /* set color palette */<br>
-               /* XXX */<br>
-<br>
-       case FBIOPUTCMAP:<br>
-       case FBIOGETCMAP:<br>
-       case FBIOPUTCMAPI:<br>
-       case FBIOGETCMAPI:<br>
-               /* XXX */<br>
-<br>
-       case FBIO_SETWINORG:    /* set frame buffer window origin */<br>
-       case FBIO_SETDISPSTART: /* set display start address */<br>
-       case FBIO_SETLINEWIDTH: /* set scan line width in pixel */<br>
-<br>
-       case FBIOGTYPE:<br>
-       case FBIOGATTR:<br>
-       case FBIOSVIDEO:<br>
-       case FBIOGVIDEO:<br>
-       case FBIOVERTICAL:<br>
-       case FBIOSCURSOR:<br>
-       case FBIOGCURSOR:<br>
-       case FBIOSCURPOS:<br>
-       case FBIOGCURPOS:<br>
-       case FBIOGCURMAX:<br>
-       case FBIOMONINFO:<br>
-       case FBIOGXINFO:<br>
-<br>
-       default:<br>
-               error = ENODEV;<br>
-               break;<br>
-       }<br>
-<br>
-       splx(s);<br>
-       return error;<br>
-}<br>
diff --git a/libbsd.py b/libbsd.py<br>
index f128961b..bd8963ef 100644<br>
--- a/libbsd.py<br>
+++ b/libbsd.py<br>
@@ -815,7 +815,6 @@ class display(builder.Module):<br>
                 'sys/dev/videomode/edid.c',<br>
                 'sys/dev/videomode/vesagtf.c',<br>
                 'sys/dev/videomode/videomode.c',<br>
-                'sys/dev/fb/fb.c',<br>
                 'sys/dev/fb/fbd.c',<br>
                 'sys/arm/ti/am335x/am335x_lcd.c',<br>
                 'sys/arm/ti/am335x/am335x_pwmss.c',<br>
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h<br>
index e9da3be1..ac9afbce 100644<br>
--- a/rtemsbsd/include/bsp/nexus-devices.h<br>
+++ b/rtemsbsd/include/bsp/nexus-devices.h<br>
@@ -70,8 +70,6 @@ SYSINIT_DRIVER_REFERENCE(iic, iicbus);<br>
 SYSINIT_DRIVER_REFERENCE(tda, iicbus);<br>
 SYSINIT_DRIVER_REFERENCE(iicbus, rtems_i2c);<br>
 SYSINIT_DRIVER_REFERENCE(fbd, fb);<br>
-SYSINIT_DRIVER_REFERENCE(fb, fb_mod);<br>
-SYSINIT_MODULE_REFERENCE(fb_mod);<br>
 #ifdef RTEMS_BSD_MODULE_NET80211<br>
 SYSINIT_DRIVER_REFERENCE(rtwn_usb, uhub);<br>
 SYSINIT_MODULE_REFERENCE(wlan_ratectl_none);<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div></div>