deprecate --enable-vme option, now it will be supported iff CPU_LEVEL >= 5 (like in real life)

This commit is contained in:
Stanislav Shwartsman 2009-08-10 15:44:50 +00:00
parent 54b9329b69
commit 8a95120e12
12 changed files with 56 additions and 98 deletions

View File

@ -701,7 +701,6 @@ typedef
#define BX_SUPPORT_SSE5A 0
#define BX_SUPPORT_MISALIGNED_SSE 0
#define BX_SUPPORT_SEP 0
#define BX_SUPPORT_VME 0
#define BX_SUPPORT_POPCNT 0
#define BX_SUPPORT_MONITOR_MWAIT 0
#define BX_SUPPORT_XSAVE 0
@ -745,10 +744,6 @@ typedef
#error MSRs are supported only with CPU level >= 5 !
#endif
#if (BX_SUPPORT_VME && BX_CPU_LEVEL < 5)
#error With CPU level < 5, you must disable v8086 mode extensions !
#endif
#if (BX_SUPPORT_MMX && BX_CPU_LEVEL < 5)
#error With CPU level < 5, you must disable MMX support !
#endif

64
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.408 2009/07/21 11:38:24 sshwarts Exp .
# From configure.in Id: configure.in,v 1.409 2009/08/10 08:08:25 sshwarts Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@ -1583,7 +1583,6 @@ Optional Features:
--enable-vbe use VESA BIOS extensions
--enable-clgd54xx enable CLGD54XX emulation
--enable-fpu compile in FPU emulation
--enable-vme virtual 8086 mode extensions
--enable-vmx virtualization extensions
--enable-mmx MMX support
--enable-3dnow 3DNow! support (incomplete)
@ -1610,6 +1609,7 @@ Optional Features:
--enable-large-pages enables PSE support (deprecated)
--enable-global-pages enables Global Pages support (deprecated)
--enable-daz enables denormals-are-zeroes support (deprecated)
--enable-vme virtual 8086 mode extensions (deprecated)
--enable-guest2host-tlb enables guest to host addr TLB for speed (deprecated)
--enable-icache support instruction cache (deprecated)
--enable-port-e9-hack writes to port e9 go to console (deprecated)
@ -35445,48 +35445,6 @@ fi
{ echo "$as_me:$LINENO: checking for VME support" >&5
echo $ECHO_N "checking for VME support... $ECHO_C" >&6; }
# Check whether --enable-vme was given.
if test "${enable_vme+set}" = set; then
enableval=$enable_vme; if test "$enableval" = yes; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define BX_SUPPORT_VME 1
_ACEOF
elif test "$enableval" = no; then
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
cat >>confdefs.h <<\_ACEOF
#define BX_SUPPORT_VME 0
_ACEOF
fi
else
if test "$bx_cpu_level" -ge 5; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define BX_SUPPORT_VME 1
_ACEOF
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
cat >>confdefs.h <<\_ACEOF
#define BX_SUPPORT_VME 0
_ACEOF
fi
fi
{ echo "$as_me:$LINENO: checking for VMX support" >&5
echo $ECHO_N "checking for VMX support... $ECHO_C" >&6; }
# Check whether --enable-vmx was given.
@ -39163,6 +39121,24 @@ echo "${ECHO_T}no" >&6; }
fi
{ echo "$as_me:$LINENO: checking for VME support" >&5
echo $ECHO_N "checking for VME support... $ECHO_C" >&6; }
# Check whether --enable-vme was given.
if test "${enable_vme+set}" = set; then
enableval=$enable_vme; { echo "$as_me:$LINENO: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6; }
{ { echo "$as_me:$LINENO: error: DEPRECATED - enabled automatically for CPU_LEVEL >= 5" >&5
echo "$as_me: error: DEPRECATED - enabled automatically for CPU_LEVEL >= 5" >&2;}
{ (exit 1); exit 1; }; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
{ echo "$as_me:$LINENO: checking for guest to host TLB support (deprecated)" >&5
echo $ECHO_N "checking for guest to host TLB support (deprecated)... $ECHO_C" >&6; }
# Check whether --enable-guest2host-tlb was given.

View File

@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(bochs.h)
AC_REVISION([[$Id: configure.in,v 1.409 2009-08-10 08:08:25 sshwarts Exp $]])
AC_REVISION([[$Id: configure.in,v 1.410 2009-08-10 15:44:49 sshwarts Exp $]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(ltdlconf.h)
@ -1445,28 +1445,6 @@ AC_ARG_ENABLE(fpu,
)
AC_SUBST(FPU_VAR)
AC_MSG_CHECKING(for VME support)
AC_ARG_ENABLE(vme,
[ --enable-vme virtual 8086 mode extensions],
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_VME, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VME, 0)
fi
],
[
if test "$bx_cpu_level" -ge 5; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_VME, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VME, 0)
fi
]
)
AC_MSG_CHECKING(for VMX support)
AC_ARG_ENABLE(vmx,
[ --enable-vmx virtualization extensions],
@ -2918,6 +2896,16 @@ AC_ARG_ENABLE(daz,
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for VME support)
AC_ARG_ENABLE(vme,
[ --enable-vme virtual 8086 mode extensions (deprecated)],
[AC_MSG_RESULT($enableval)
AC_MSG_ERROR([DEPRECATED - enabled automatically for CPU_LEVEL >= 5])
],
[
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for guest to host TLB support (deprecated))
AC_ARG_ENABLE(guest2host-tlb,
[ --enable-guest2host-tlb enables guest to host addr TLB for speed (deprecated)],

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.606 2009-07-27 05:52:28 sshwarts Exp $
// $Id: cpu.h,v 1.607 2009-08-10 15:44:49 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -3134,7 +3134,7 @@ public: // for now...
BX_SMF void stack_return_to_v86(Bit32u new_eip, Bit32u raw_cs_selector, Bit32u flags32);
BX_SMF void iret16_stack_return_from_v86(bxInstruction_c *);
BX_SMF void iret32_stack_return_from_v86(bxInstruction_c *);
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
BX_SMF void v86_redirect_interrupt(Bit32u vector);
#endif
BX_SMF void init_v8086_mode(void);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpuid.cc,v 1.84 2009-06-15 09:30:56 sshwarts Exp $
// $Id: cpuid.cc,v 1.85 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007 Stanislav Shwartsman
@ -231,13 +231,13 @@ Bit32u BX_CPU_C::get_std_cpuid_features(void)
#if BX_SUPPORT_FPU
features |= (1<<0);
#endif
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
features |= (1<<1);
#endif
features |= (1<<2); // support Debug Extensions
#if (BX_CPU_LEVEL >= 5)
#if BX_CPU_LEVEL >= 5
features |= (1<<4); // support Time Stamp Counter
features |= (1<<5); // support RDMSR/WRMSR
features |= (1<<7) | (1<<14); // support Machine Check

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: crregs.h,v 1.17 2009-01-31 10:43:23 sshwarts Exp $
// $Id: crregs.h,v 1.18 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007 Stanislav Shwartsman
@ -78,7 +78,7 @@ struct bx_cr0_t {
struct bx_cr4_t {
Bit32u val32; // 32bit value of register
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
IMPLEMENT_CRREG_ACCESSORS(VME, 0);
IMPLEMENT_CRREG_ACCESSORS(PVI, 1);
#endif
@ -105,7 +105,7 @@ struct bx_cr4_t {
extern bx_address get_cr4_allow_mask(void);
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
#define BX_CR4_VME_ENABLED (BX_CPU_THIS_PTR cr4.get_VME())
#else
#define BX_CR4_VME_ENABLED (0)

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: flag_ctrl.cc,v 1.45 2009-03-27 16:42:21 sshwarts Exp $
// $Id: flag_ctrl.cc,v 1.46 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -65,7 +65,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CLI(bxInstruction_c *i)
if (protected_mode())
{
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CPU_THIS_PTR cr4.get_PVI() && (CPL == 3))
{
if (IOPL < 3) {
@ -85,7 +85,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CLI(bxInstruction_c *i)
else if (v8086_mode())
{
if (IOPL != 3) {
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CR4_VME_ENABLED) {
BX_CPU_THIS_PTR clear_VIF();
return;
@ -105,7 +105,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::STI(bxInstruction_c *i)
if (protected_mode())
{
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CPU_THIS_PTR cr4.get_PVI())
{
if (CPL == 3 && IOPL < 3) {
@ -128,7 +128,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::STI(bxInstruction_c *i)
else if (v8086_mode())
{
if (IOPL != 3) {
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CR4_VME_ENABLED && BX_CPU_THIS_PTR get_VIP() == 0)
{
BX_CPU_THIS_PTR assert_VIF();
@ -171,7 +171,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::PUSHF_Fw(bxInstruction_c *i)
BX_DEBUG(("PUSHFW: #GP(0) in v8086 (no VME) mode"));
exception(BX_GP_EXCEPTION, 0, 0);
}
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CR4_VME_ENABLED && BX_CPU_THIS_PTR get_IOPL() < 3) {
flags |= EFlagsIOPLMask;
if (BX_CPU_THIS_PTR get_VIF())
@ -209,7 +209,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::POPF_Fw(bxInstruction_c *i)
BX_DEBUG(("POPFW: #GP(0) in v8086 (no VME) mode"));
exception(BX_GP_EXCEPTION, 0, 0);
}
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CR4_VME_ENABLED && BX_CPU_THIS_PTR get_IOPL() < 3) {
if (((flags16 & EFlagsIFMask) && BX_CPU_THIS_PTR get_VIP()) ||

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: flag_ctrl_pro.cc,v 1.37 2009-02-13 20:09:56 sshwarts Exp $
// $Id: flag_ctrl_pro.cc,v 1.38 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -69,7 +69,7 @@ BX_CPU_C::writeEFlags(Bit32u flags, Bit32u changeMask)
#if BX_CPU_LEVEL >= 4
supportMask |= (EFlagsIDMask | EFlagsACMask); // ID/AC
#endif
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
supportMask |= (EFlagsVIPMask | EFlagsVIFMask); // VIP/VIF
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: proc_ctrl.cc,v 1.300 2009-06-15 09:30:56 sshwarts Exp $
// $Id: proc_ctrl.cc,v 1.301 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1442,7 +1442,7 @@ bx_address get_cr4_allow_mask(void)
// [1] PVI: Protected-Mode Virtual Interrupts R/W
// [0] VME: Virtual-8086 Mode Extensions R/W
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
allowMask |= (1<<0) | (1<<1); /* VME */
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: soft_int.cc,v 1.53 2009-08-04 16:19:15 sshwarts Exp $
// $Id: soft_int.cc,v 1.54 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -128,7 +128,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::INT_Ib(bxInstruction_c *i)
RSP_SPECULATIVE;
if (v8086_mode()) {
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CPU_THIS_PTR cr4.get_VME())
{
bx_address tr_base = BX_CPU_THIS_PTR tr.cache.u.segment.base;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: vm8086.cc,v 1.55 2009-08-09 18:40:18 sshwarts Exp $
// $Id: vm8086.cc,v 1.56 2009-08-10 15:44:50 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -112,7 +112,7 @@ void BX_CPU_C::iret16_stack_return_from_v86(bxInstruction_c *i)
cs_raw = pop_16();
flags16 = pop_16();
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
if (BX_CR4_VME_ENABLED && BX_CPU_THIS_PTR get_IOPL() < 3)
{
if (((flags16 & EFlagsIFMask) && BX_CPU_THIS_PTR get_VIP()) ||
@ -169,7 +169,7 @@ void BX_CPU_C::iret32_stack_return_from_v86(bxInstruction_c *i)
writeEFlags(flags32, change_mask);
}
#if BX_SUPPORT_VME
#if BX_CPU_LEVEL >= 5
void BX_CPU_C::v86_redirect_interrupt(Bit32u vector)
{
Bit16u temp_flags = (Bit16u) read_eflags();

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.403 2009-08-10 15:30:43 sshwarts Exp $
// $Id: main.cc,v 1.404 2009-08-10 15:44:49 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -1012,7 +1012,6 @@ void bx_init_hardware()
else
BX_INFO((" SSE support: %d%s",BX_SUPPORT_SSE,BX_SUPPORT_SSE_EXTENSION?"E":""));
BX_INFO((" CLFLUSH support: %s",BX_SUPPORT_CLFLUSH?"yes":"no"));
BX_INFO((" VME support: %s",BX_SUPPORT_VME?"yes":"no"));
BX_INFO((" 3dnow! support: %s",BX_SUPPORT_3DNOW?"yes":"no"));
#if BX_SUPPORT_X86_64
BX_INFO((" 1G paging support: %s",BX_SUPPORT_1G_PAGES?"yes":"no"));