diff --git a/VAX/vax_cpu.c b/VAX/vax_cpu.c index 1b4dd90e..945d34f0 100644 --- a/VAX/vax_cpu.c +++ b/VAX/vax_cpu.c @@ -492,7 +492,7 @@ REG cpu_reg[] = { MTAB cpu_mod[] = { { UNIT_CONH, 0, "HALT to SIMH", "SIMHALT", NULL, NULL, NULL, "Set HALT to trap to simulator" }, { UNIT_CONH, UNIT_CONH, "HALT to console", "CONHALT", NULL, NULL, NULL, "Set HALT to trap to console ROM" }, - { MTAB_XTD|MTAB_VDV, 0, "IDLE", "IDLE={VMS|ULTRIX|NETBSD|OPENBSD|ULTRIXOLD|OPENBSDOLD|QUASIJARUS|32V|ALL}", &cpu_set_idle, &cpu_show_idle, NULL, "Display idle detection mode" }, + { MTAB_XTD|MTAB_VDV, 0, "IDLE", "IDLE={VMS|ULTRIX|NETBSD|OPENBSD|ULTRIXOLD|OPENBSDOLD|QUASIJARUS|32V|ELN|ALL}", &cpu_set_idle, &cpu_show_idle, NULL, "Display idle detection mode" }, { MTAB_XTD|MTAB_VDV, 0, NULL, "NOIDLE", &sim_clr_idle, NULL, NULL, "Disables idle detection" }, MEM_MODIFIERS, /* Model specific memory modifiers from vaxXXX_defs.h */ { MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "HISTORY", "HISTORY", @@ -2216,10 +2216,14 @@ for ( ;; ) { case BEQL: if (cc & CC_Z) { /* br if Z = 1 */ BRANCHB (brdisp); - if (((PSL & PSL_IS) != 0) && /* on IS? */ - (PSL_GETIPL (PSL) == 0x1F) && /* at IPL 31 */ - (mapen == 0) && /* Running from ROM */ - (fault_PC == 0x2004361B)) /* Boot ROM Character Prompt */ + if ((((PSL & PSL_IS) != 0) && /* on IS? */ + (PSL_GETIPL (PSL) == 0x1F) && /* at IPL 31 */ + (mapen == 0) && /* Running from ROM */ + (fault_PC == 0x2004361B)) || /* Boot ROM Character Prompt */ + ((cpu_idle_mask & VAX_IDLE_ELN) && /* VAXELN Idle? */ + (PSL & PSL_IS) && /* on IS? */ + (brdisp == 0xFA) && /* Branch to prior TSTL */ + (PSL_GETIPL (PSL) == 0x4))) /* at IPL 4 */ cpu_idle(); } break; @@ -3524,7 +3528,8 @@ static struct os_idle os_tab[] = { { "OPENBSD", VAX_IDLE_BSDNEW }, { "QUASIJARUS", VAX_IDLE_QUAD }, { "32V", VAX_IDLE_VMS }, - { "ALL", VAX_IDLE_VMS|VAX_IDLE_ULTOLD|VAX_IDLE_ULT|VAX_IDLE_ULT1X|VAX_IDLE_QUAD|VAX_IDLE_BSDNEW }, + { "ELN", VAX_IDLE_ELN }, + { "ALL", VAX_IDLE_VMS|VAX_IDLE_ULTOLD|VAX_IDLE_ULT|VAX_IDLE_ULT1X|VAX_IDLE_QUAD|VAX_IDLE_BSDNEW|VAX_IDLE_ELN }, { NULL, 0 } }; @@ -3617,7 +3622,7 @@ fprintf (st, " -u interpret address as virtual, user mode\n\n"); fprintf (st, "The CPU attempts to detect when the simulator is idle. When idle, the\n"); fprintf (st, "simulator does not use any resources on the host system. Idle detection is\n"); fprintf (st, "controlled by the SET IDLE and SET NOIDLE commands:\n\n"); -fprintf (st, " sim> SET CPU IDLE{=VMS|ULTRIX|NETBSD|FREEBSD|32V|ALL}\n"); +fprintf (st, " sim> SET CPU IDLE{=VMS|ULTRIX|NETBSD|FREEBSD|32V|ELN|ALL}\n"); fprintf (st, " enable idle detection\n"); fprintf (st, " sim> SET CPU NOIDLE disable idle detection\n\n"); fprintf (st, "Idle detection is disabled by default. Unless ALL is specified, idle\n"); diff --git a/VAX/vax_defs.h b/VAX/vax_defs.h index eb553acf..e7444500 100644 --- a/VAX/vax_defs.h +++ b/VAX/vax_defs.h @@ -734,6 +734,7 @@ enum opcodes { #define VAX_IDLE_QUAD 0x10 #define VAX_IDLE_BSDNEW 0x20 #define VAX_IDLE_SYSV 0x40 +#define VAX_IDLE_ELN 0x80 /* VAXELN */ extern uint32 cpu_idle_mask; /* idle mask */ void cpu_idle (void);