Unifdef VM86
Reviewed by: silence on on -current
This commit is contained in:
parent
7a5a069cde
commit
504c44caaf
@ -23,7 +23,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: $
|
* $Id: scvesactl.c,v 1.9 1999/01/11 03:18:26 yokota Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sc.h"
|
#include "sc.h"
|
||||||
@ -31,13 +31,12 @@
|
|||||||
#include "opt_syscons.h"
|
#include "opt_syscons.h"
|
||||||
#include "opt_vga.h"
|
#include "opt_vga.h"
|
||||||
#include "opt_vesa.h"
|
#include "opt_vesa.h"
|
||||||
#include "opt_vm86.h"
|
|
||||||
|
|
||||||
#ifdef VGA_NO_MODE_CHANGE
|
#ifdef VGA_NO_MODE_CHANGE
|
||||||
#undef VESA
|
#undef VESA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (NSC > 0 && NVGA > 0 && defined(VESA) && defined(VM86)) || defined(KLD_MODULE)
|
#if (NSC > 0 && NVGA > 0 && defined(VESA)) || defined(KLD_MODULE)
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -140,4 +139,4 @@ vesa_unload_ioctl(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* (NSC > 0 && NVGA > 0 && VESA && VM86) || KLD_MODULE */
|
#endif /* (NSC > 0 && NVGA > 0 && VESA) || KLD_MODULE */
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: syscons.c,v 1.304 1999/05/30 16:51:42 phk Exp $
|
* $Id: syscons.c,v 1.305 1999/05/31 11:25:13 phk Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sc.h"
|
#include "sc.h"
|
||||||
@ -37,7 +37,6 @@
|
|||||||
#include "opt_devfs.h"
|
#include "opt_devfs.h"
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#include "opt_vesa.h"
|
#include "opt_vesa.h"
|
||||||
#include "opt_vm86.h"
|
|
||||||
#endif
|
#endif
|
||||||
#include "opt_syscons.h"
|
#include "opt_syscons.h"
|
||||||
|
|
||||||
@ -571,7 +570,7 @@ int
|
|||||||
sc_attach_unit(int unit, int flags)
|
sc_attach_unit(int unit, int flags)
|
||||||
{
|
{
|
||||||
scr_stat *scp;
|
scr_stat *scp;
|
||||||
#if defined(VESA) && defined(VM86)
|
#if defined(VESA)
|
||||||
video_info_t info;
|
video_info_t info;
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEVFS
|
#ifdef DEVFS
|
||||||
@ -596,7 +595,7 @@ sc_attach_unit(int unit, int flags)
|
|||||||
/* initialize history buffer & pointers */
|
/* initialize history buffer & pointers */
|
||||||
sc_alloc_history_buffer(scp, sc_history_size, 0, FALSE);
|
sc_alloc_history_buffer(scp, sc_history_size, 0, FALSE);
|
||||||
|
|
||||||
#if defined(VESA) && defined(VM86)
|
#if defined(VESA)
|
||||||
if ((sc_flags & VESA800X600)
|
if ((sc_flags & VESA800X600)
|
||||||
&& ((*vidsw[scp->ad]->get_info)(scp->adp, M_VESA_800x600, &info) == 0)) {
|
&& ((*vidsw[scp->ad]->get_info)(scp->adp, M_VESA_800x600, &info) == 0)) {
|
||||||
#if NSPLASH > 0
|
#if NSPLASH > 0
|
||||||
@ -610,7 +609,7 @@ sc_attach_unit(int unit, int flags)
|
|||||||
splash_init(scp->adp, scsplash_callback);
|
splash_init(scp->adp, scsplash_callback);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* VESA && VM86 */
|
#endif /* VESA */
|
||||||
|
|
||||||
/* initialize cursor stuff */
|
/* initialize cursor stuff */
|
||||||
if (!ISGRAPHSC(scp))
|
if (!ISGRAPHSC(scp))
|
||||||
|
@ -15,11 +15,10 @@
|
|||||||
*
|
*
|
||||||
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
||||||
*
|
*
|
||||||
* $Id: apm.c,v 1.86 1999/05/11 19:54:03 phk Exp $
|
* $Id: apm.c,v 1.87 1999/05/30 16:52:01 phk Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opt_devfs.h"
|
#include "opt_devfs.h"
|
||||||
#include "opt_vm86.h"
|
|
||||||
#include "opt_smp.h"
|
#include "opt_smp.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -41,10 +40,8 @@
|
|||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <i386/apm/apm_setup.h>
|
#include <i386/apm/apm_setup.h>
|
||||||
|
|
||||||
#ifdef VM86
|
|
||||||
#include <machine/psl.h>
|
#include <machine/psl.h>
|
||||||
#include <machine/vm86.h>
|
#include <machine/vm86.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
#include <machine/smp.h>
|
#include <machine/smp.h>
|
||||||
@ -683,10 +680,8 @@ apm_not_halt_cpu(void)
|
|||||||
static int
|
static int
|
||||||
apm_probe(device_t dev)
|
apm_probe(device_t dev)
|
||||||
{
|
{
|
||||||
#ifdef VM86
|
|
||||||
struct vm86frame vmf;
|
struct vm86frame vmf;
|
||||||
int i;
|
int i;
|
||||||
#endif
|
|
||||||
int disabled, flags;
|
int disabled, flags;
|
||||||
|
|
||||||
if (resource_int_value("apm", 0, "disabled", &disabled) == 0
|
if (resource_int_value("apm", 0, "disabled", &disabled) == 0
|
||||||
@ -703,7 +698,6 @@ apm_probe(device_t dev)
|
|||||||
if (resource_int_value("apm", 0, "flags", &flags) != 0)
|
if (resource_int_value("apm", 0, "flags", &flags) != 0)
|
||||||
flags = 0;
|
flags = 0;
|
||||||
|
|
||||||
#ifdef VM86
|
|
||||||
bzero(&vmf, sizeof(struct vm86frame)); /* safety */
|
bzero(&vmf, sizeof(struct vm86frame)); /* safety */
|
||||||
vmf.vmf_ax = (APM_BIOS << 8) | APM_INSTCHECK;
|
vmf.vmf_ax = (APM_BIOS << 8) | APM_INSTCHECK;
|
||||||
vmf.vmf_bx = 0;
|
vmf.vmf_bx = 0;
|
||||||
@ -749,7 +743,6 @@ apm_probe(device_t dev)
|
|||||||
i, (vmf.vmf_eflags & PSL_C) ? 1 : 0, vmf.vmf_bx);
|
i, (vmf.vmf_eflags & PSL_C) ? 1 : 0, vmf.vmf_bx);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bzero(&apm_softc, sizeof(apm_softc));
|
bzero(&apm_softc, sizeof(apm_softc));
|
||||||
|
|
||||||
|
@ -15,11 +15,10 @@
|
|||||||
*
|
*
|
||||||
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
||||||
*
|
*
|
||||||
* $Id: apm.c,v 1.86 1999/05/11 19:54:03 phk Exp $
|
* $Id: apm.c,v 1.87 1999/05/30 16:52:01 phk Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opt_devfs.h"
|
#include "opt_devfs.h"
|
||||||
#include "opt_vm86.h"
|
|
||||||
#include "opt_smp.h"
|
#include "opt_smp.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -41,10 +40,8 @@
|
|||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <i386/apm/apm_setup.h>
|
#include <i386/apm/apm_setup.h>
|
||||||
|
|
||||||
#ifdef VM86
|
|
||||||
#include <machine/psl.h>
|
#include <machine/psl.h>
|
||||||
#include <machine/vm86.h>
|
#include <machine/vm86.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
#include <machine/smp.h>
|
#include <machine/smp.h>
|
||||||
@ -683,10 +680,8 @@ apm_not_halt_cpu(void)
|
|||||||
static int
|
static int
|
||||||
apm_probe(device_t dev)
|
apm_probe(device_t dev)
|
||||||
{
|
{
|
||||||
#ifdef VM86
|
|
||||||
struct vm86frame vmf;
|
struct vm86frame vmf;
|
||||||
int i;
|
int i;
|
||||||
#endif
|
|
||||||
int disabled, flags;
|
int disabled, flags;
|
||||||
|
|
||||||
if (resource_int_value("apm", 0, "disabled", &disabled) == 0
|
if (resource_int_value("apm", 0, "disabled", &disabled) == 0
|
||||||
@ -703,7 +698,6 @@ apm_probe(device_t dev)
|
|||||||
if (resource_int_value("apm", 0, "flags", &flags) != 0)
|
if (resource_int_value("apm", 0, "flags", &flags) != 0)
|
||||||
flags = 0;
|
flags = 0;
|
||||||
|
|
||||||
#ifdef VM86
|
|
||||||
bzero(&vmf, sizeof(struct vm86frame)); /* safety */
|
bzero(&vmf, sizeof(struct vm86frame)); /* safety */
|
||||||
vmf.vmf_ax = (APM_BIOS << 8) | APM_INSTCHECK;
|
vmf.vmf_ax = (APM_BIOS << 8) | APM_INSTCHECK;
|
||||||
vmf.vmf_bx = 0;
|
vmf.vmf_bx = 0;
|
||||||
@ -749,7 +743,6 @@ apm_probe(device_t dev)
|
|||||||
i, (vmf.vmf_eflags & PSL_C) ? 1 : 0, vmf.vmf_bx);
|
i, (vmf.vmf_eflags & PSL_C) ? 1 : 0, vmf.vmf_bx);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bzero(&apm_softc, sizeof(apm_softc));
|
bzero(&apm_softc, sizeof(apm_softc));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user