aboutsummaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-07-12 11:15:22 +0000
committerJason Molenda <jmolenda@apple.com>1999-07-12 11:15:22 +0000
commit43e526b9b4c9868d3cd90772a54f767f8d45cadd (patch)
tree4d68a4a2d3a6c7e4f6237bc04015fc182a8ced0c /sim/mips
parentedac9bffc154855d959fcbc32e2fe0b073a9ec71 (diff)
downloadgdb-43e526b9b4c9868d3cd90772a54f767f8d45cadd.zip
gdb-43e526b9b4c9868d3cd90772a54f767f8d45cadd.tar.gz
gdb-43e526b9b4c9868d3cd90772a54f767f8d45cadd.tar.bz2
import gdb-1999-07-12 snapshot
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/ChangeLog14
-rw-r--r--sim/mips/interp.c42
-rw-r--r--sim/mips/tconfig.in2
3 files changed, 53 insertions, 5 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 04f0bc6..34c2798 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,17 @@
+Mon Jul 12 00:02:27 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * interp.c (sim_monitor): Flush output before reading input.
+
+Sun Jul 11 19:28:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * tconfig.in (SIM_HANDLES_LMA): Always define.
+
+Thu Jul 8 16:06:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From Mark Salter <msalter@cygnus.com>:
+ * interp.c (BOARD_BSP): Define. Add to list of possible boards.
+ (sim_open): Add setup for BSP board.
+
Wed Jul 7 12:45:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
* mips.igen (MULT, MULTU): Add syntax for two operand version.
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index a2ed20f..04383d3 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -257,6 +257,8 @@ static const OPTION mips_options[] =
"|" BOARD_JMR3904_PAL
#define BOARD_JMR3904_DEBUG "jmr3904debug"
"|" BOARD_JMR3904_DEBUG
+#define BOARD_BSP "bsp"
+ "|" BOARD_BSP
, "Customize simulation for a particular board.", mips_option_handler },
@@ -352,12 +354,40 @@ sim_open (kind, cb, abfd, argv)
device_init(sd);
}
-
+ else if (board != NULL
+ && (strcmp(board, BOARD_BSP) == 0))
+ {
+ int i;
+
+ STATE_ENVIRONMENT (sd) = OPERATING_ENVIRONMENT;
+
+ /* ROM: 0x9FC0_0000 - 0x9FFF_FFFF and 0xBFC0_0000 - 0xBFFF_FFFF */
+ sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
+ 0x9FC00000,
+ 4 * 1024 * 1024, /* 4 MB */
+ 0xBFC00000);
+
+ /* SRAM: 0x8000_0000 - 0x803F_FFFF and 0xA000_0000 - 0xA03F_FFFF */
+ sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
+ 0x80000000,
+ 4 * 1024 * 1024, /* 4 MB */
+ 0xA0000000);
+
+ /* DRAM: 0x8800_0000 - 0x89FF_FFFF and 0xA800_0000 - 0xA9FF_FFFF */
+ for (i=0; i<8; i++) /* 32 MB total */
+ {
+ unsigned size = 4 * 1024 * 1024; /* 4 MB */
+ sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
+ 0x88000000 + (i * size),
+ size,
+ 0xA8000000 + (i * size));
+ }
+ }
#if (WITH_HW)
- if (board != NULL
- && (strcmp(board, BOARD_JMR3904) == 0 ||
- strcmp(board, BOARD_JMR3904_PAL) == 0 ||
- strcmp(board, BOARD_JMR3904_DEBUG) == 0))
+ else if (board != NULL
+ && (strcmp(board, BOARD_JMR3904) == 0 ||
+ strcmp(board, BOARD_JMR3904_PAL) == 0 ||
+ strcmp(board, BOARD_JMR3904_DEBUG) == 0))
{
/* match VIRTUAL memory layout of JMR-TX3904 board */
int i;
@@ -973,6 +1003,8 @@ sim_monitor (SIM_DESC sd,
case 11: /* char inbyte(void) */
{
char tmp;
+ /* ensure that all output has gone... */
+ sim_io_flush_stdout (sd);
if (sim_io_read_stdin (sd, &tmp, sizeof(char)) != sizeof(char))
{
sim_io_error(sd,"Invalid return from character read");
diff --git a/sim/mips/tconfig.in b/sim/mips/tconfig.in
index e8062a3..d591474 100644
--- a/sim/mips/tconfig.in
+++ b/sim/mips/tconfig.in
@@ -12,6 +12,8 @@
MODULE_INSTALL_FN dv_sockser_install;
#define MODULE_LIST dv_sockser_install,
+#else
+#define SIM_HANDLES_LMA 0
#endif
/* Define this if the simulator supports profiling.