diff --git a/bochs/.bochsrc b/bochs/.bochsrc index 69ff513d2..bc4d6b041 100644 --- a/bochs/.bochsrc +++ b/bochs/.bochsrc @@ -787,6 +787,21 @@ i440fxsupport: enabled=1 #======================================================================= #magic_break: enabled=1 +#======================================================================= +# PORT_E9_HACK: +# The 0xE9 port doesn't exists in normal ISA architecture. However, we +# define a convention here, to display on the console of the system running +# Bochs anything that is written to it. The idea is to provide debug output +# very early when writing BIOS or OS code for example, without having to +# bother with setting up a serial port or etc. Reading from port 0xE9 will +# will return 0xe9 to let you know if the feature is available. +# Leave this 0 unless you have a reason to use it. +# +# Example: +# port_e9_hack: enabled=1 +#======================================================================= +#port_e9_hack: enabled=1 + #======================================================================= # DEBUG_SYMBOLS: # This loads symbols from the specified file for use in Bochs' internal diff --git a/bochs/.conf.everything b/bochs/.conf.everything index 7ca0d6722..f3f04c7e3 100644 --- a/bochs/.conf.everything +++ b/bochs/.conf.everything @@ -15,7 +15,6 @@ --enable-1g-pages \ --enable-ignore-bad-msr \ --enable-configurable-msrs \ - --enable-port-e9-hack \ --enable-debugger \ --enable-disasm \ --enable-debugger-gui \ diff --git a/bochs/CHANGES b/bochs/CHANGES index 801c705b2..191e80741 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -56,6 +56,8 @@ Detailed change log : - Added configure option to compile in GUI frontend for Bochs debugger, to enable configure with --enable-debugger-gui option. The GUI debugger frontend is enabled by default with Bochs debugger. + - Removed --enable-port-e9-hack configure option. The feature now could be + configured at runtime through .bochsrc. - Added configure option to enable/disable A20 pin support. Disabling the A20 pin support slightly speeds up the emulation. - reduced dependencies between source files for faster code generation diff --git a/bochs/bochs.h b/bochs/bochs.h index 20b83d6c9..f6aac6757 100644 --- a/bochs/bochs.h +++ b/bochs/bochs.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: bochs.h,v 1.243 2009-03-15 12:54:59 vruppert Exp $ +// $Id: bochs.h,v 1.244 2009-04-23 18:28:16 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -432,24 +432,18 @@ int bx_gdbstub_check(unsigned int eip); typedef struct { bx_bool floppy; - bx_bool keyboard; - bx_bool video; bx_bool disk; - bx_bool pit; - bx_bool pic; - bx_bool bios; - bx_bool cmos; - bx_bool a20; bx_bool interrupts; bx_bool exceptions; bx_bool debugger; bx_bool mouse; + bx_bool a20; bx_bool io; bx_bool dma; bx_bool unsupported_io; - bx_bool serial; bx_bool cdrom; bx_bool print_timestamps; + bx_bool port_e9_hack; #if BX_DEBUGGER bx_bool magic_break_enabled; #endif @@ -458,7 +452,6 @@ typedef struct { #endif #if BX_SUPPORT_APIC bx_bool apic; - bx_bool ioapic; #endif #if BX_DEBUG_LINUX bx_bool linux_syscall; diff --git a/bochs/bx_debug/dbg_main.cc b/bochs/bx_debug/dbg_main.cc index 0be62b117..f2cf6eaf9 100644 --- a/bochs/bx_debug/dbg_main.cc +++ b/bochs/bx_debug/dbg_main.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: dbg_main.cc,v 1.187 2009-04-21 20:27:35 sshwarts Exp $ +// $Id: dbg_main.cc,v 1.188 2009-04-23 18:28:17 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -1313,17 +1313,11 @@ void bx_dbg_show_command(const char* arg) dbg_printf("Disable all show flags\n"); } else if(!strcmp(arg,"dbg-all")) { bx_dbg.floppy = 1; - bx_dbg.keyboard = 1; - bx_dbg.video = 1; bx_dbg.disk = 1; - bx_dbg.pit = 1; - bx_dbg.pic = 1; - bx_dbg.bios = 1; - bx_dbg.cmos = 1; - bx_dbg.a20 = 1; bx_dbg.interrupts = 1; bx_dbg.exceptions = 1; bx_dbg.mouse = 1; + bx_dbg.a20 = 1; bx_dbg.io = 1; bx_dbg.debugger = 1; bx_dbg.dma = 1; @@ -1333,17 +1327,11 @@ void bx_dbg_show_command(const char* arg) return; } else if(!strcmp(arg,"dbg-none")) { bx_dbg.floppy = 0; - bx_dbg.keyboard = 0; - bx_dbg.video = 0; bx_dbg.disk = 0; - bx_dbg.pit = 0; - bx_dbg.pic = 0; - bx_dbg.bios = 0; - bx_dbg.cmos = 0; - bx_dbg.a20 = 0; bx_dbg.interrupts = 0; bx_dbg.exceptions = 0; bx_dbg.mouse = 0; + bx_dbg.a20 = 0; bx_dbg.io = 0; bx_dbg.debugger = 0; bx_dbg.dma = 0; diff --git a/bochs/config.cc b/bochs/config.cc index c94ed7d90..53607cd88 100755 --- a/bochs/config.cc +++ b/bochs/config.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: config.cc,v 1.174 2009-04-13 16:07:02 vruppert Exp $ +// $Id: config.cc,v 1.175 2009-04-23 18:28:16 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -2963,6 +2963,20 @@ static int parse_line_formatted(const char *context, int num_params, char *param PARSE_ERR(("%s: print_timestamps directive malformed.", context)); } } + else if (!strcmp(params[0], "port_e9_hack")) { + if (num_params != 2) { + PARSE_ERR(("%s: port_e9_hack directive: wrong # args.", context)); + } + if (strncmp(params[1], "enabled=", 8)) { + PARSE_ERR(("%s: port_e9_hack directive malformed.", context)); + } + if (params[1][8] == '0' || params[1][8] == '1') { + bx_dbg.port_e9_hack = params[1][8] - '0'; + } + else { + PARSE_ERR(("%s: port_e9_hack directive malformed.", context)); + } + } else if (!strcmp(params[0], "ne2k")) { int tmp[6]; char tmpchar[6]; @@ -3609,9 +3623,14 @@ int bx_write_configuration(const char *rc, int overwrite) #if BX_CONFIGURE_MSRS strptr = SIM->get_param_string(BXPN_CONFIGURABLE_MSRS_PATH)->getptr(); if (strlen(strptr) > 0) - fprintf(fp, "msrs==\"%s\"", strptr); + fprintf(fp, ", msrs=\"%s\"", strptr); #endif fprintf(fp, "\n"); + fprintf(fp, "print_timestamps: enabled=%d\n", bx_dbg.print_timestamps); + fprintf(fp, "port_e9_hack: enabled=%d\n", bx_dbg.port_e9_hack); +#if BX_DEBUGGER + fprintf(fp, "magic_break: enabled=%d\n", bx_dbg.magic_break_enabled); +#endif fprintf(fp, "text_snapshot_check: enabled=%d\n", SIM->get_param_bool(BXPN_TEXT_SNAPSHOT_CHECK)->get()); fprintf(fp, "private_colormap: enabled=%d\n", SIM->get_param_bool(BXPN_PRIVATE_COLORMAP)->get()); #if BX_WITH_AMIGAOS diff --git a/bochs/config.h.in b/bochs/config.h.in index ac1d17ecb..7787de8f1 100644 --- a/bochs/config.h.in +++ b/bochs/config.h.in @@ -240,14 +240,6 @@ #define USE_RAW_SERIAL 0 -// This enables writing to port 0xe9 and the output -// is sent to the console. Reading from port 0xe9 -// will return 0xe9 to let you know this is available. -// Leave this 0 unless you have a reason to use it. -#define BX_PORT_E9_HACK 0 - -#define BX_GDBSTUB 0 - // This option enables compressed (zlib) hd support #define BX_COMPRESSED_HD_SUPPORT 0 #define BX_HAVE_ZLIB 0 @@ -644,6 +636,7 @@ typedef #endif +#define BX_GDBSTUB 0 #define BX_DEBUGGER 0 #define BX_DISASM 0 #define BX_DEBUGGER_GUI 0 diff --git a/bochs/configure b/bochs/configure index 29b3ba68f..9f84e061c 100755 --- a/bochs/configure +++ b/bochs/configure @@ -1573,7 +1573,6 @@ Optional Features: --enable-host-specific-asms support for host specific inline assembly --enable-configurable-msrs support for configurable MSR registers --enable-ignore-bad-msr ignore bad MSR references - --enable-port-e9-hack writes to port e9 go to console --enable-show-ips show IPS in Bochs log file --enable-cpp use .cpp as C++ suffix --enable-debugger compile in support for Bochs internal debugger @@ -1614,6 +1613,7 @@ Optional Features: --enable-guest2host-tlb enables guest to host addr TLB for speed (deprecated) --enable-icache support instruction cache (deprecated) --enable-external-debugger enables external debugger interface (deprecated) + --enable-port-e9-hack writes to port e9 go to console (deprecated) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -34853,38 +34853,6 @@ _ACEOF -fi - - -{ echo "$as_me:$LINENO: checking for port e9 hack" >&5 -echo $ECHO_N "checking for port e9 hack... $ECHO_C" >&6; } -# Check whether --enable-port-e9-hack was given. -if test "${enable_port_e9_hack+set}" = set; then - enableval=$enable_port_e9_hack; if test "$enableval" = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define BX_PORT_E9_HACK 1 -_ACEOF - - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - cat >>confdefs.h <<\_ACEOF -#define BX_PORT_E9_HACK 0 -_ACEOF - - fi -else - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define BX_PORT_E9_HACK 1 -_ACEOF - - - fi @@ -39528,6 +39496,25 @@ echo "${ECHO_T}no" >&6; } fi +{ echo "$as_me:$LINENO: checking writes to port e9 go to console (deprecated)" >&5 +echo $ECHO_N "checking writes to port e9 go to console (deprecated)... $ECHO_C" >&6; } +# Check whether --enable-port-e9-hack was given. +if test "${enable_port_e9_hack+set}" = set; then + enableval=$enable_port_e9_hack; { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + { { echo "$as_me:$LINENO: error: DEPRECATED - PORT_E9_HACK could be configured through .bochsrc" >&5 +echo "$as_me: error: DEPRECATED - PORT_E9_HACK could be configured through .bochsrc" >&2;} + { (exit 1); exit 1; }; } + +else + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + + + # Create some subdirectories for when you run configure from some other # directory. if test ! -d instrument; then mkdir instrument; fi diff --git a/bochs/configure.in b/bochs/configure.in index 08eb77e20..9ebf0908e 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -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.397 2009-04-21 07:20:25 vruppert Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.398 2009-04-23 18:28:17 sshwarts Exp $]]) AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(ltdlconf.h) @@ -1158,22 +1158,6 @@ AC_ARG_ENABLE(ignore-bad-msr, ] ) -AC_MSG_CHECKING(for port e9 hack) -AC_ARG_ENABLE(port-e9-hack, - [ --enable-port-e9-hack writes to port e9 go to console], - [if test "$enableval" = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(BX_PORT_E9_HACK, 1) - else - AC_MSG_RESULT(no) - AC_DEFINE(BX_PORT_E9_HACK, 0) - fi], - [ - AC_MSG_RESULT(yes) - AC_DEFINE(BX_PORT_E9_HACK, 1) - ] - ) - AC_MSG_CHECKING(show IPS) AC_ARG_ENABLE(show-ips, [ --enable-show-ips show IPS in Bochs log file], @@ -3070,6 +3054,17 @@ AC_ARG_ENABLE(external-debugger, AC_MSG_RESULT(no) ]) +AC_MSG_CHECKING(writes to port e9 go to console (deprecated)) +AC_ARG_ENABLE(port-e9-hack, + [ --enable-port-e9-hack writes to port e9 go to console (deprecated)], + [AC_MSG_RESULT($enableval) + AC_MSG_ERROR([DEPRECATED - PORT_E9_HACK could be configured through .bochsrc]) + ], + [ + AC_MSG_RESULT(no) + ]) + + # Create some subdirectories for when you run configure from some other # directory. if test ! -d instrument; then mkdir instrument; fi diff --git a/bochs/doc/docbook/user/user.dbk b/bochs/doc/docbook/user/user.dbk index a5b620194..f2517b456 100644 --- a/bochs/doc/docbook/user/user.dbk +++ b/bochs/doc/docbook/user/user.dbk @@ -1,7 +1,7 @@