Commit Graph

17 Commits

Author SHA1 Message Date
Enji Cooper
193d9e768b sys/modules: normalize .CURDIR-relative paths to SRCTOP
This simplifies make output/logic

Tested with:	`cd sys/modules; make ALL_MODULES=` on amd64
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-04 10:10:17 +00:00
Jung-uk Kim
3219f535d9 Rewrite x86bios and update its dependent drivers.
- Do not map entire real mode memory (1MB).  Instead, we map IVT/BDA and
ROM area separately.  Most notably, ROM area is mapped as device memory
(uncacheable) as it should be.  User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9).  Remove now redundant and
potentially dangerous x86bios_alloc.c.  If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c.  Currently, non-PC hardware is not
supported.  We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs().  This function also initializes DS and SS properly.
- Add x86bios_get_intr().  This function checks if the interrupt vector is
available for the platform.  It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them.  They may or may not be accessible always.  Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4).  This function calls VGA
BIOS POST code from the current VGA option ROM.  Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported.  Usually the symptom is blank display after resuming from suspend
state.  If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state.  Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS.  This is very useful for multi-display
adapter setup.  By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number.  You may override it from loader but it is very unlikely
to be necessary.  Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function.  The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0.  If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).
2009-10-19 20:58:10 +00:00
Xin LI
ee5e90dab2 - Teach vesa(4) and dpms(4) about x86emu. [1]
- Add vesa kernel options for amd64.
 - Connect libvgl library and splash kernel modules to amd64 build.
 - Connect manual page dpms(4) to amd64 build.
 - Remove old vesa/dpms files.

Submitted by:	paradox <ddkprog yahoo com> [1], swell k at gmail.com
		(with some minor tweaks)
2009-09-09 09:50:31 +00:00
Ruslan Ermilov
17d6c63672 Drop <bsd.man.mk> support from <bsd.kmod.mk>.
Not objected to by:	-current
2002-01-11 15:49:02 +00:00
David E. O'Brien
c68159a6d8 Use a consistent style and one much closer to the rest of /usr/src 2001-01-06 14:00:42 +00:00
John Baldwin
3ed78c6696 - Include opt_vesa.h in vesa.c so that the VESA_DEBUG option is actually
propagated from the kernel config file to the source.
- Add some more debug messages to list each mode that is rejected or found.
2000-10-06 01:43:59 +00:00
Peter Wemm
64db83a8ab Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead of
encoding the relative path.
2000-05-27 01:14:33 +00:00
Peter Wemm
56ca39961b Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.
This means that the kernel can be totally self contained now and is not
dependent on the last buildworld to update /usr/share/mk.  This might
also make it easier to build 5.x kernels on 4.0 boxes etc, assuming
gensetdefs and config(8) are updated.
2000-05-04 12:08:52 +00:00
Peter Wemm
8f8e587948 Use config's conditional compilation rather than using #ifdefs that make
modular compilation harder.  I'm doing this because people seem to like
cut/pasting examples of bad practices in existing code.
2000-01-29 15:08:56 +00:00
Bruce Evans
6f940b3847 Removed special rules for building and cleaning device interface files
and empty options files.  The rules are now generated automatically in
bsd.kmod.mk.  Cleaned up related things ($S and ${CLEANFILES}).
1999-11-28 18:53:47 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Jonathan Lemon
eb9d435ae7 Unifdef VM86.
Reviewed by:	silence on on -current
1999-06-01 18:20:36 +00:00
Kazutaka YOKOTA
2ad872c579 The first stage of console driver reorganization: activate new
keyboard and video card drivers.

Because of the changes, you are required to update your kernel
configuration file now!

The files in sys/dev/syscons are still i386-specific (but less so than
before), and won't compile for alpha and PC98 yet.

syscons still directly accesses the video card registers here and
there; this will be rectified in the later stages.
1999-01-11 03:18:56 +00:00
Kazutaka YOKOTA
13e05026dd Make the VESA KLD module work! 1998-12-30 11:21:08 +00:00
Peter Wemm
a654d07295 Sample initial set of kld-ified modules. Not all have been completely
converted yet.  These are more of a starting point.  This is NOT connected
to the parent Makefile.

OK'ed by jkh (who is ever so patiently waiting)
1998-10-16 04:30:52 +00:00
Søren Schmidt
35e46e3eaf Double oops, committed the wrong Makefile ata that, fixed. 1998-09-15 20:14:11 +00:00
Søren Schmidt
c3fa0a68ff Oops for the Makefile for the VESA lkm 1998-09-15 20:09:18 +00:00