diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2021-06-15 13:57:44 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2021-06-15 13:57:44 +0000 |
commit | 37406caaad26e30ddddd24ad746dabbb2fbe9856 (patch) | |
tree | a5073e7d6ffc7975037796b69c8806413a147922 /xserver/hw/xfree86 | |
parent | a044a4e5f1c0bce890720179a9263eeee61067b1 (diff) |
Initial attempt to build xserver for riscv64
ok matthieu@
Diffstat (limited to 'xserver/hw/xfree86')
-rw-r--r-- | xserver/hw/xfree86/os-support/bsd/Makefile.am | 5 | ||||
-rw-r--r-- | xserver/hw/xfree86/os-support/bsd/Makefile.in | 24 | ||||
-rw-r--r-- | xserver/hw/xfree86/os-support/bsd/riscv64_video.c | 58 |
3 files changed, 78 insertions, 9 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.am b/xserver/hw/xfree86/os-support/bsd/Makefile.am index eb208962b..9667b9611 100644 --- a/xserver/hw/xfree86/os-support/bsd/Makefile.am +++ b/xserver/hw/xfree86/os-support/bsd/Makefile.am @@ -58,6 +58,11 @@ ARCH_SOURCES = ppc_video.c \ $(srcdir)/../shared/ioperm_noop.c endif +if RISCV64_VIDEO +ARCH_SOURCES = riscv64_video.c \ + $(srcdir)/../shared/ioperm_noop.c +endif + if SGI_VIDEO ARCH_SOURCES = sgi_video.c \ $(srcdir)/../shared/ioperm_noop.c diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.in b/xserver/hw/xfree86/os-support/bsd/Makefile.in index f31d4eb11..385a71443 100644 --- a/xserver/hw/xfree86/os-support/bsd/Makefile.in +++ b/xserver/hw/xfree86/os-support/bsd/Makefile.in @@ -78,16 +78,19 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c bsd_init.c bsd_bell.c alpha_video.c arm64_video.c \ $(srcdir)/../shared/ioperm_noop.c arm_video.c hppa_video.c \ - i386_video.c luna88k_video.c ppc_video.c sgi_video.c \ - sparc64_video.c bsd_sbus.c $(srcdir)/../shared/agp_noop.c \ - bsd_agp.c $(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \ + i386_video.c luna88k_video.c ppc_video.c riscv64_video.c \ + sgi_video.c sparc64_video.c bsd_sbus.c \ + $(srcdir)/../shared/agp_noop.c bsd_agp.c \ + $(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \ $(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \ bsd_kmod.c -@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ -@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ bsd_sbus.lo \ -@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo -@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SGI_VIDEO_TRUE@am__objects_1 = sgi_video.lo \ -@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SGI_VIDEO_TRUE@ ioperm_noop.lo +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ bsd_sbus.lo \ +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_FALSE@@SGI_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_FALSE@@SGI_VIDEO_TRUE@am__objects_1 = sgi_video.lo \ +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_FALSE@@SGI_VIDEO_TRUE@ ioperm_noop.lo +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_TRUE@am__objects_1 = riscv64_video.lo \ +@ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_FALSE@@RISCV64_VIDEO_TRUE@ ioperm_noop.lo @ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_TRUE@am__objects_1 = ppc_video.lo \ @ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_FALSE@@PPC_VIDEO_TRUE@ ioperm_noop.lo @ALPHA_VIDEO_FALSE@@ARM64_VIDEO_FALSE@@ARM_VIDEO_FALSE@@HPPA_VIDEO_FALSE@@I386_VIDEO_FALSE@@LUNA88K_VIDEO_TRUE@am__objects_1 = luna88k_video.lo \ @@ -506,7 +509,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ @@ -549,6 +551,9 @@ noinst_LTLIBRARIES = libbsd.la @PPC_VIDEO_TRUE@ARCH_SOURCES = ppc_video.c \ @PPC_VIDEO_TRUE@ $(srcdir)/../shared/ioperm_noop.c +@RISCV64_VIDEO_TRUE@ARCH_SOURCES = riscv64_video.c \ +@RISCV64_VIDEO_TRUE@ $(srcdir)/../shared/ioperm_noop.c + @SGI_VIDEO_TRUE@ARCH_SOURCES = sgi_video.c \ @SGI_VIDEO_TRUE@ $(srcdir)/../shared/ioperm_noop.c @@ -657,6 +662,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_video.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv64_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgi_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc64_video.Plo@am__quote@ diff --git a/xserver/hw/xfree86/os-support/bsd/riscv64_video.c b/xserver/hw/xfree86/os-support/bsd/riscv64_video.c new file mode 100644 index 000000000..f57eb8e1c --- /dev/null +++ b/xserver/hw/xfree86/os-support/bsd/riscv64_video.c @@ -0,0 +1,58 @@ +/* $OpenBSD: riscv64_video.c,v 1.1 2021/06/15 13:57:43 drahn Exp $ */ +/* + * Copyright 1992 by Rich Murphey <Rich@Rice.edu> + * Copyright 1993 by David Wexelblat <dwex@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 names of Rich Murphey and David Wexelblat + * not be used in advertising or publicity pertaining to distribution of + * the software without specific, written prior permission. Rich Murphey and + * David Wexelblat make no representations about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + * + * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR 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" +#include "xf86OSpriv.h" + +/***************************************************************************/ +/* Video Memory Mapping section */ +/***************************************************************************/ + +void +xf86OSInitVidMem(VidMemInfoPtr pVidMem) +{ + pVidMem->initialised = TRUE; +} + +#ifdef X_PRIVSEP +/* + * Do all initialisation that need root privileges + */ +_X_EXPORT void +xf86PrivilegedInit(void) +{ + pci_system_init(); + xf86OpenConsole(); +} +#endif |