head	1.5;
access;
symbols
	RELENG_8_4:1.5.0.2
	RELENG_9_1_0_RELEASE:1.4.2.1.4.2
	RELENG_9_1:1.4.2.1.0.4
	RELENG_9_1_BP:1.4.2.1
	RELENG_8_3_0_RELEASE:1.3.2.2.6.1
	RELENG_8_3:1.3.2.2.0.6
	RELENG_8_3_BP:1.3.2.2
	RELENG_9_0_0_RELEASE:1.4.2.1.2.1
	RELENG_9_0:1.4.2.1.0.2
	RELENG_9_0_BP:1.4.2.1
	RELENG_9:1.4.0.2
	RELENG_9_BP:1.4
	RELENG_8_2_0_RELEASE:1.3.2.2.4.1
	RELENG_8_2:1.3.2.2.0.4
	RELENG_8_2_BP:1.3.2.2
	RELENG_8_1_0_RELEASE:1.3.2.2.2.1
	RELENG_8_1:1.3.2.2.0.2
	RELENG_8_1_BP:1.3.2.2
	RELENG_8:1.3.0.2;
locks; strict;
comment	@# @;


1.5
date	2012.11.17.01.53.02;	author svnexp;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2010.08.08.06.18.05;	author jkim;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2009.10.19.20.58.10;	author jkim;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2009.09.23.20.49.14;	author jkim;	state Exp;
branches;
next	1.1;

1.1
date	2009.09.21.08.17.57;	author delphij;	state Exp;
branches;
next	;

1.5.2.1
date	2012.11.17.01.53.02;	author svnexp;	state dead;
branches;
next	1.5.2.2;

1.5.2.2
date	2013.03.28.13.05.25;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.4.2.1.2.1
	1.4.2.1.4.1;
next	1.4.2.2;

1.4.2.2
date	2012.11.17.11.37.19;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.4.2.1.2.2;

1.4.2.1.2.2
date	2012.11.17.08.37.15;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.4.2.1.4.2;

1.4.2.1.4.2
date	2012.11.17.08.48.06;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2010.03.02.01.56.55;	author delphij;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2010.03.02.01.56.55;	author delphij;	state Exp;
branches
	1.3.2.2.2.1
	1.3.2.2.4.1
	1.3.2.2.6.1;
next	1.3.2.3;

1.3.2.3
date	2012.11.17.10.36.59;	author svnexp;	state Exp;
branches;
next	;

1.3.2.2.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.3.2.2.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.3.2.2.6.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.3.2.2.6.2;

1.3.2.2.6.2
date	2012.11.17.08.25.34;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/modules/x86bios/Makefile 211058 2010-08-08 06:18:05Z jkim $

KMOD=	x86bios
SRCS=	opt_x86bios.h
SRCS+=	bus_if.h device_if.h pci_if.h

.PATH:	${.CURDIR}/../../contrib/x86emu
.PATH:	${.CURDIR}/../../compat/x86bios
SRCS+=	x86bios.c
.if ${MACHINE_ARCH} != "i386"
SRCS+=	x86emu.c
.endif

.include <bsd.kmod.mk>
@


1.5.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:25 +0000
@
text
@d1 14
@


1.5.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 11
# $FreeBSD: releng/8.4/sys/modules/x86bios/Makefile 204546 2010-03-02 01:56:55Z delphij $

KMOD=	x86bios
SRCS=	opt_x86bios.h
SRCS+=	bus_if.h device_if.h pci_if.h

.PATH:	${.CURDIR}/../../contrib/x86emu
.PATH:	${.CURDIR}/../../compat/x86bios
SRCS+=	x86bios.c x86emu.c

.include <bsd.kmod.mk>
@


1.4
log
@SVN rev 211058 on 2010-08-08 06:18:05Z by jkim

Do not build real mode emulator for i386.  We use VM86 again since r210877.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.4.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.4.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/x86bios/Makefile 211058 2010-08-08 06:18:05Z jkim $
@


1.4.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.4.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/modules/x86bios/Makefile 211058 2010-08-08 06:18:05Z jkim $
@


1.4.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.4.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/modules/x86bios/Makefile 211058 2010-08-08 06:18:05Z jkim $
@


1.3
log
@SVN rev 198251 on 2009-10-19 20:58:10Z by jkim

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).
@
text
@d9 4
a12 1
SRCS+=	x86bios.c x86emu.c
@


1.3.2.1
log
@file Makefile was added on branch RELENG_8 on 2010-03-02 02:03:10 +0000
@
text
@d1 11
@


1.3.2.2
log
@SVN rev 204546 on 2010-03-02 01:56:55Z by delphij

MFC x86emu/x86bios emulator and make previously i386 only dpms and vesa
framebuffer driver, etc. work on FreeBSD/amd64.

A significant amount of improvements were done by jkim@@ during the recent
months to make vesa(4) work better, over the initial code import.  This
work is based on OpenBSD's x86emu implementation and contributed by
paradox <ddkprog yahoo com> and swell.k at gmail com.

Hopefully I have stolen all their work to 8-STABLE :)

All bugs in this commit are mine, as usual.
@
text
@a0 11
# $FreeBSD$

KMOD=	x86bios
SRCS=	opt_x86bios.h
SRCS+=	bus_if.h device_if.h pci_if.h

.PATH:	${.CURDIR}/../../contrib/x86emu
.PATH:	${.CURDIR}/../../compat/x86bios
SRCS+=	x86bios.c x86emu.c

.include <bsd.kmod.mk>
@


1.3.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/modules/x86bios/Makefile 204546 2010-03-02 01:56:55Z delphij $
@


1.3.2.2.6.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.2.2.6.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/modules/x86bios/Makefile 204546 2010-03-02 01:56:55Z delphij $
@


1.3.2.2.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.3.2.2.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.2
log
@SVN rev 197444 on 2009-09-23 20:49:14Z by jkim

Move sys/dev/x86bios to sys/compat/x86bios.

It may not be optimal but it is clearly better than the old place.

OK'ed by:	delphij, paradox (ddkprog yahoo com)
@
text
@d5 1
d9 1
a9 1
SRCS+=	x86bios.c x86bios_alloc.c x86emu.c x86emu_util.c
@


1.1
log
@SVN rev 197383 on 2009-09-21 08:17:57Z by delphij

Collapase interrupt supporting functions to a new module, and switch from
x86emu to this new module.

This changeset also brings a fix for bugs introduced with the initial
x86emu commit, which prevents the user from using some display mode or
cause instant reboots during mode switch.

Submitted by:	paradox <ddkprog yahoo com>
@
text
@d7 1
a7 1
.PATH:	${.CURDIR}/../../dev/x86bios
@

