Fix compilation errors

Add BX_INFO for writing to TSC_MSR (not implemented message)
This commit is contained in:
Stanislav Shwartsman 2005-04-18 17:21:34 +00:00
parent caa0648188
commit 8482511af3
5 changed files with 34 additions and 32 deletions

2
bochs/configure vendored
View File

@ -34627,7 +34627,7 @@ _ACEOF
fi
else
if test "$bx_cpu_level" -gt 5; then
if test "$bx_cpu_level" -gt 4; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF

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.278 2005-04-16 07:32:58 vruppert Exp $]])
AC_REVISION([[$Id: configure.in,v 1.279 2005-04-18 17:21:32 sshwarts Exp $]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(ltdlconf.h)
@ -922,7 +922,7 @@ AC_ARG_ENABLE(4meg-pages,
AC_DEFINE(BX_SUPPORT_4MEG_PAGES, 0)
fi],
[
if test "$bx_cpu_level" -gt 5; then
if test "$bx_cpu_level" -gt 4; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_4MEG_PAGES, 1)
else

View File

@ -1,3 +1,6 @@
#ifndef EXTDB_H
#define EXTDB_H
typedef struct {
Bit64u base;
Bit16u limit;
@ -27,3 +30,4 @@ extern char debug_loaded;
void bx_external_debugger(BX_CPU_C *cpu);
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: proc_ctrl.cc,v 1.101 2005-03-30 20:53:00 sshwarts Exp $
// $Id: proc_ctrl.cc,v 1.102 2005-04-18 17:21:33 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1569,10 +1569,6 @@ void BX_CPU_C::RDMSR(bxInstruction_c *i)
/* TODO */
return;
case BX_MSR_TSC:
RDTSC(i);
return;
case BX_MSR_CESR:
/* TODO */
return;
@ -1583,10 +1579,6 @@ void BX_CPU_C::RDMSR(bxInstruction_c *i)
/* do nothing */
return;
case BX_MSR_TSC:
RDTSC(i);
return;
/* ... And these cause an exception on i686 */
case BX_MSR_CESR:
case BX_MSR_CTR0:
@ -1594,6 +1586,10 @@ void BX_CPU_C::RDMSR(bxInstruction_c *i)
goto do_exception;
#endif /* BX_CPU_LEVEL == 5 */
case BX_MSR_TSC:
RDTSC(i);
return;
/* MSR_APICBASE
0:7 Reserved
8 This is set if its the BSP
@ -1705,7 +1701,6 @@ void BX_CPU_C::WRMSR(bxInstruction_c *i)
/* The following registers are defined for Pentium only */
case BX_MSR_P5_MC_ADDR:
case BX_MSR_MC_TYPE:
case BX_MSR_TSC:
case BX_MSR_CESR:
/* TODO */
return;
@ -1713,7 +1708,6 @@ void BX_CPU_C::WRMSR(bxInstruction_c *i)
/* These are noops on i686... */
case BX_MSR_P5_MC_ADDR:
case BX_MSR_MC_TYPE:
case BX_MSR_TSC:
/* do nothing */
return;
@ -1724,6 +1718,10 @@ void BX_CPU_C::WRMSR(bxInstruction_c *i)
goto do_exception;
#endif /* BX_CPU_LEVEL == 5 */
case BX_MSR_TSC:
BX_INFO("WRMSR: writing to BX_MSR_TSC still not implemented");
return;
/* MSR_APICBASE
0:7 Reserved
8 This is set if its the BSP
@ -1750,8 +1748,8 @@ void BX_CPU_C::WRMSR(bxInstruction_c *i)
case BX_MSR_EFER:
// GPF #0 if lme 0->1 and cr0.pg = 1
// GPF #0 if lme 1->0 and cr0.pg = 1
if ((BX_CPU_THIS_PTR msr.lme != ((EAX >> 8) & 1))
&& (BX_CPU_THIS_PTR cr0.pg == 1))
if ((BX_CPU_THIS_PTR msr.lme != ((EAX >> 8) & 1)) &&
(BX_CPU_THIS_PTR cr0.pg == 1))
{
exception(BX_GP_EXCEPTION, 0, 0);
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: instrument.h,v 1.15 2005-03-17 20:50:57 sshwarts Exp $
// $Id: instrument.h,v 1.16 2005-04-18 17:21:34 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -94,9 +94,9 @@ void bx_instr_tlb_cntrl(unsigned cpu, unsigned what, Bit32u newval);
void bx_instr_cache_cntrl(unsigned cpu, unsigned what);
void bx_instr_prefetch_hint(unsigned cpu, unsigned what, unsigned seg, bx_address offset);
void bx_instr_before_execution(unsigned cpu);
void bx_instr_after_execution(unsigned cpu);
void bx_instr_repeat_iteration(unsigned cpu);
void bx_instr_before_execution(unsigned cpu, const bxInstruction_c *i);
void bx_instr_after_execution(unsigned cpu, const bxInstruction_c *i);
void bx_instr_repeat_iteration(unsigned cpu, const bxInstruction_c *i);
void bx_instr_inp(Bit16u addr, unsigned len);
void bx_instr_outp(Bit16u addr, unsigned len);