From f69ac41e595172057212046a990d25ae793d0d06 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Mon, 1 Dec 2008 18:54:24 +0000 Subject: [PATCH] added infrastructure for init disable --- bochs/cpu/cpu.cc | 5 +++-- bochs/cpu/cpu.h | 3 ++- bochs/cpu/init.cc | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bochs/cpu/cpu.cc b/bochs/cpu/cpu.cc index a4da7e39d..a4f725a9b 100644 --- a/bochs/cpu/cpu.cc +++ b/bochs/cpu/cpu.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.cc,v 1.251 2008-11-20 18:44:15 sshwarts Exp $ +// $Id: cpu.cc,v 1.252 2008-12-01 18:54:24 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -823,7 +823,8 @@ void BX_CPU_C::boundaryFetch(const Bit8u *fetchPtr, unsigned remainingInPage, bx void BX_CPU_C::deliver_INIT(void) { - BX_CPU_THIS_PTR reset(BX_RESET_SOFTWARE); + if (! BX_CPU_THIS_PTR init_disable) + BX_CPU_THIS_PTR reset(BX_RESET_SOFTWARE); } void BX_CPU_C::deliver_NMI(void) diff --git a/bochs/cpu/cpu.h b/bochs/cpu/cpu.h index 92f20ceb1..a1d00930c 100644 --- a/bochs/cpu/cpu.h +++ b/bochs/cpu/cpu.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.h,v 1.537 2008-11-29 19:28:09 sshwarts Exp $ +// $Id: cpu.h,v 1.538 2008-12-01 18:54:24 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -925,6 +925,7 @@ public: // for now... bx_bool user_pl; bx_bool in_smm; bx_bool nmi_disable; + bx_bool init_disable; #if BX_CPU_LEVEL >= 4 && BX_SUPPORT_ALIGNMENT_CHECK unsigned alignment_check_mask; #endif diff --git a/bochs/cpu/init.cc b/bochs/cpu/init.cc index 2cb5f8ff1..7b1fe9227 100644 --- a/bochs/cpu/init.cc +++ b/bochs/cpu/init.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: init.cc,v 1.181 2008-11-18 20:58:09 sshwarts Exp $ +// $Id: init.cc,v 1.182 2008-12-01 18:54:24 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -511,6 +511,7 @@ void BX_CPU_C::register_state(void) BXRS_PARAM_BOOL(cpu, nmi_pending, nmi_pending); BXRS_PARAM_BOOL(cpu, in_smm, in_smm); BXRS_PARAM_BOOL(cpu, nmi_disable, nmi_disable); + BXRS_PARAM_BOOL(cpu, init_disable, init_disable); BXRS_PARAM_BOOL(cpu, trace, trace); } @@ -854,6 +855,7 @@ void BX_CPU_C::reset(unsigned source) BX_CPU_THIS_PTR nmi_pending = 0; BX_CPU_THIS_PTR in_smm = 0; BX_CPU_THIS_PTR nmi_disable = 0; + BX_CPU_THIS_PTR init_disable = 0; #if BX_CPU_LEVEL >= 4 && BX_SUPPORT_ALIGNMENT_CHECK BX_CPU_THIS_PTR alignment_check_mask = 0; #endif