cc4d7561ed
devamlc comments and cleanups
Jim
2011-08-27 20:23:32 -04:00
7230a331f3
Back out telnet changes for Kermit; they screwed up regular telnet
Jim
2011-08-27 20:11:37 -04:00
927d8c9c13
Tried to fix Kermit telnet negotiation so /nowait isn't required; worked for most things, but not for DO KERMIT / WILL KERMIT - still hangs. :(
Jim
2011-08-27 17:04:59 -04:00
d7dc1847a8
amlc.cfg: can dedicate AMLC lines to an IP address. This is useful for serial device servers connected to a serial printer for example, where the SDS initiates the telnet connect to the Prime when the printer is turned on.
Jim
2011-08-27 08:29:44 -04:00
51aaaeb341
Reverse order of devpnc.h and devamlc.h: both use MAXHOSTLEN
Jim
2011-08-27 07:34:52 -04:00
5a5be64d17
Split devamlc into .h file, correct devpnc.h brace bug (hobby)
Jim
2011-08-24 17:42:35 -04:00
b643ed80ed
Add Unix versions of smad, smag for Prime pdevs
Jim
2011-08-24 17:15:16 -04:00
d398a93143
Removed PNCXSNAK - don't need it
Jim
2011-08-24 17:12:36 -04:00
50a95cc1ba
Use close(): shutdown() causes a descriptor leak. Add a trace when a connection is accepted.
Jim
2011-08-19 17:04:31 -04:00
49eaf4b21b
Don't zero uid of disabled node, to avoid "can't find uid" error.
Jim
2011-08-19 16:15:16 -04:00
a3a1f06d6f
When a packet is too big to receive, disable the node it came from. This happens for example if a node is configured with a 1024-word packet size and sends to a node with a 256-word packet size. In the emulator PNC design, the packet has already been ACK'd at the sending side, so there is no way to indicate a transmission error other than taking down the connection. Since the error will just occur again, the best course is to disable the node until the next reboot. Primenet will disconnect the sending and receive nodes from each other in about 30 seconds.
Jim
2011-08-19 16:04:39 -04:00
2a698b038d
Don't NAK xmit packets. prmnt1 seems to indicate that a packet no one accepts is NAK'd, but if we do that, it keeps getting sent over and over. If we're not connected, retries don't make sense.
Jim
2011-08-19 13:37:02 -04:00
6b8abd3a8b
Use current hg rev when building
Jim
2011-08-18 20:58:18 -04:00
aba2688490
Don't enable tsrc$$ trace hack whenever tracing is enabled.
Jim
2011-08-18 14:07:23 -04:00
063a23144a
Fix several devpnc bugs: 1. Need 32-bit integer for dma address so newer Primos can use I/O segments other than 0. 2. Ignore interrupted select() 3. Set fd to -1 after closing when not connected, to avoid bad file descriptor error
Jim
2011-08-18 14:04:55 -04:00
05251fbcce
Allow tracing 3-digit user numbers vs 2. System processes sometimes have high user numbers.
Jim
2011-08-18 13:35:33 -04:00
459873ff90
Add stlb/iotlb trace option "tlb", set T_EAS when requested
Jim
2011-08-18 13:17:54 -04:00
2ef1438900
Updated some comments. Still some confusion about PTLB re: IOTLB.
Jim
2011-08-18 10:10:28 -04:00
8200cff70d
devpnc: don't print disconnected message in error.log when we were trying to connect but failed. Only print them when we actually were connected.
Jim
2011-08-17 16:28:58 -04:00
1bc93f304a
devpnc: ensure ring.cfg unique id is really unique: it determines the node-id for incoming connections.
Jim
2011-08-17 15:48:01 -04:00
834cb1977f
Add simulate token OCP, just for documentation purposes. This is only used by T&M's.
Jim
2011-08-17 12:05:21 -04:00
a68971cc1c
Flush tracefile every line only when "flush" arg is used. This is useful for situations where the emulator bombs, eg, with a Unix seg fault. But it's slower too, so make it optional.
Jim
2011-08-17 09:35:01 -04:00
8c635c19c8
Minor devpnc edits, change MAXACCEPTTIME from 5 to 15 seconds
Jim
2011-08-16 18:34:16 -04:00
1b943bce0a
Enabled PNC async I/O, changed poll from 100ms to 1 sec, performance seems to be fine. Remote ld -size no longer takes 1 second per entry, but that is probably because of earlier PNC changes.
Jim
2011-08-16 18:04:13 -04:00
8aac162418
Use select() to find out if any node has sent us data; more efficient than doing a read on each socket.
Jim
2011-08-16 17:55:55 -04:00
51dfd5101b
Only dump packets when tracing w/RIO
Jim
2011-08-16 15:31:07 -04:00
f742bc46a9
Add code to devpnc to remember when it triggers interrupts, seems to work okay and not have the 30-second delay problem.
Jim
2011-08-16 15:28:14 -04:00
6a668b877d
Timestamp packet dumps and polls, check for interrupt needed when interrupts are enabled. This fixes the 30-second lag problem, but also causes PNCDIM to get notified too many times. After an xmit, devpnc causes an immediate interrupt. This is handled by the SEG4 phantom interrupt code by disabling PNC interrupts, then notifying PNCDIM. (Remember, PNCDIM is still in the xmit OTA, or shortly following). PNCDIM finishes its loop, enables interrupts, and does a WAIT. When it enables interrupts before the WAIT, devpnc doesn't remember that it has already interrupted, and interrupts again. I think this is a bug - the other emulator controllers have a state variable to remember whether they have already interrupted. But, if I fix this "bug", we'll probably have 30-second delays again. Hmmm...
Jim
2011-08-16 14:46:36 -04:00
4ddd43debf
Add async I/O code to devpnc, but disabled for now: there is a delay problem with remote terminal sessions:
Jim
2011-08-15 17:11:28 -04:00
e4dfa3fade
Interrupt immediately after xmit and rcv instead of doing a poll.
Jim
2011-08-14 23:53:12 -04:00
b1bb5c9a3c
Fixed PNCDIM halt bug (= sb == in POLL), minor cleanups
Jim
2011-08-14 17:42:10 -04:00
479acd4788
When tracing, fatal() dumps RP instruction address queue
Jim
2011-08-14 13:34:07 -04:00
703940e525
PNC cleanups, still halts at RCV_ERR2 in PNCDIM on node B during a directory copy from node A to a disk on node B.
Jim
2011-08-14 12:10:14 -04:00
c3ba188ae4
First "working" PNC emulation, but has circuit reset issues
Jim
2011-08-13 16:13:22 -04:00
6348f80b5a
Add "eas" trace flag to trace 32S addressing
Jim
2011-08-13 16:12:33 -04:00
945f48057c
Add multi-indirect level test for several 32R cases (64R is always single indirect)
Jim
2011-08-13 11:07:37 -04:00
26b86c84e9
Add "off" trace option: initially disabled, ctrl-t to toggle it
Jim
2011-08-13 10:58:16 -04:00
f69f9e9696
After changing EAFA to preserve the E-bit, CPUT4 halted at 10001. In this case, bitno was specified in the EAFA instruction itself. The emulator was setting the E-bit in the returned ea because there was a non-zero bit offset. This extra test of bitno & setting of E-bit was removed from apea to pass CPUT4 at 10001.
Jim
2011-08-09 09:10:55 -04:00
f0983d6ccb
Preserve fault and E bits in EAFA instructions to pass CPUT4 T&M halt at 7753 and 10061. At 7753, CPUT4 loads -1L into the SB register, EAFA 1,SB%, then LDLR '12 to get the FAR1 register value. It expects it to be -1. For the test at 10061, EAFA was clearing the E-bit in FAR1, but the test expected it to be set. The emulator never uses the E-bit in the FAR (it only looks at bitno), so it doesn't matter how the E-bit is set in the register.
Jim
2011-08-09 09:04:15 -04:00
bffaa206bf
CPUT4 halt at 10203 reveals that the field length register bits 60-64 are the high-order bits of the length, not the low-order bits as I had assumed.
Jim
2011-08-08 19:03:25 -04:00
687d068335
Default sense switches are now 0 instead of 14114 when booting from a Prime runfile, eg, T&M. Check for either CR or LF to continue after HLT.
Jim
2011-08-08 09:24:17 -04:00
499d07d82e
CPUT4 T&M: max indirect levels is 8 then RXM fault occurs (S/R mode)
Jim
2011-08-06 14:44:42 -04:00
adbf7dff22
Always print a linefeed after HLT
Jim
2011-08-06 09:39:19 -04:00
6b080f7c5e
For CPUT4, add LPID (only checks restricted) and mark some other unimplemented instructions as restricted.
Jim
2011-08-06 09:30:27 -04:00
23b8cd9892
Only use 28 bits of physical address in mapva to correct CPUT4 emulator seg fault after LPSW near label RXM in CPUT4.
Jim
2011-08-06 09:01:16 -04:00
8ad786dc42
Invalidate brp cache on LPSW, since segmentation could be enabled.
Jim
2011-08-06 08:47:53 -04:00
3b6ed6f52c
On HLT with -boot filename (T&M), either continue or halt. Add trace code for CLS to show memory value used for comparison.
Jim
2011-08-06 08:44:36 -04:00
4388350678
Allow continue after HLT for -boot filename for V-mode T&Ms
Jim
2011-08-03 17:31:09 -04:00
6beed769cf
Add -trace arg (number > 99) to start tracing after this instruction. This is an unsigned int, so will overflow after 4B instructions, but it's impractical to trace that many instructions anyway. This feature is used for debugging the emulator, getting diags to work, etc., so instruction counts tend to be low.
Jim
2011-08-02 16:57:10 -04:00
2943b41e0c
Cause UII for P300 paging instructions for CPUT4 T&M
Jim
2011-08-02 14:41:16 -04:00
cefc0e64e8
Corrected CREP and RTN based on CPUT4 T&M
Jim
2011-08-01 18:08:14 -04:00
efe90b9abb
Change UII fault to pass ea for faddr instead of RP, to pass CPUT1 T&M. NOTE: ea would only be set for mem. ref. instructions, but we use the same code at label d_uii: for generics too. Not sure what the ea should be for a generic UII fault where there is no ea computed.
Jim
2011-07-31 23:25:51 -04:00
12e82b1d9a
Fix bug in CEA: 16S not truncating ea after indexing. Caught by old T&M test CPUT1. Checked ea16s, and it was already doing the truncate.
Jim
2011-07-31 22:54:11 -04:00
37909a6de0
Add sense switch skips SS1-4, SR1-4, SSS, SSR to run old T&M diags
Jim
2011-07-31 22:40:33 -04:00
314ef7cc50
Changed -sd to -ds to specify data switches, to run old T&M programs, don't load registers and keys from the runfile unless the 'regs' option is used. Old T&M's were normally loaded into memory, followed by a master clear, then run. The Prime runfiles on disk (at rev 18) had the wrong mode in the key field of the rvec file header, so the test did not execute properly. Also expanded the boot help for data switches.
Jim
2011-07-30 18:14:35 -04:00
fde9c6e812
Initial PNC driver (no receive yet), added #ifdefs for trace, allow continuing after real HLT in S and R modes for old T&M diagnostics, expanded list of Prime device drivers
Jim
2011-07-30 17:06:19 -04:00
6a00d0d937
Add mt option to return 2-word zero record instead of error status, to test how magrst behaves. It treats this just like a real tape error, which is good. If mtwrite is used to re-create a physical tape from a .tap file, it cannot re-create tape errors, so writes a 4-byte zero record instead. Prime magrst will still see this as an error record since it isn't long enough to be a real magsav record.
Jim
2011-07-18 09:49:34 -04:00
bcfdbec10f
Changes for gcc on OSX 10.6, cross compile on Intel
Jim
2011-07-18 09:31:14 -04:00
78aaf1753d
Add an inline swab option to swap.h
Jim
2011-06-19 08:56:11 -04:00
e8528a2233
lmserver changes for linux
Jim
2011-05-04 11:17:52 -04:00
dbe7246f12
Default to 1 AMLC board; add magrst to makefile
Jim
2010-01-31 09:31:08 -05:00
dd587bade1
Fixed if/else indenting
Jim
2008-10-04 17:49:42 -04:00
2f065a3bde
License server ignores bogus connections, updated makefile to store executables in local directory instead of ../run (for testing first)
Jim
2008-09-24 16:02:01 -04:00
b787eaa56b
Changed makefile so that utility binaries go in bin, not run
Jim
2008-09-12 21:33:16 -04:00
f971e4fac5
Moved mx directories to ../dongle, out of source directory
Jim
2008-09-12 20:12:17 -04:00
f70c0561cb
Print version and exit for "em --version"
Jim
2008-09-12 16:42:43 -04:00
4466fa57e7
makefile updated with all compile options, added back to repository
Jim
2008-09-12 14:57:19 -04:00
5f56ba04f4
Catches SIGTERM and gracefully shutdown Primos with a sensor check.
Jim
2008-09-10 16:15:40 -04:00
ba3d9a1a7f
licensing, sys console, fixed rare hang in sleep if IMPS goes to zero add DNS lookup on every license server connect to handle dynamic IP made keyboard chars ^O, ^Y, and ^V work on system console added printf in fatal() if any messages were logged to error.log supports ^b in Primos II to reboot from tape w/Primos II in memory to allow running make rev 19 from Primos II, but it's still broken fixed cylinder limits for some disk models (couldn't format some drive types) fixed devdisk problem: a error on one unit could cause bogus errors on another IMPORTANT: fixed rare bug where emulator would hang in sleep (IMPS=0)
Jim
2008-04-25 00:00:00 -04:00
1750f7f83b
license dongle, boot options, amlc, tape, disk, change device filenames added licensing dongle support boot option supports filename, sense and data switches: -boot filename sswitch dswitch (for D. Boone) -ds option (like VCP) as alternate way to set data switches (for D. Boone) removed -v and -vv: they were old and didn't do anything tries to read ring0.map and ring3.map if no -map option used fixed bug with new connect for multiple AMLC controllers default build is now for 32 amlc lines fixed disk geometry for CMD; added geometry for Model 4935 (1.1G NEC) fixed tape boot for variable record sizes (for D. Boone), but rev 19 loops added EMULATOR_VERSION #define and version printf() changed tape drive filenames from dev14u0-4 to mt0-4 changed disk drive filenames from dev26u0 to disk26u0 added license manager tracing changed to automatically redirect stderr to error.log on startup changed to create mtx tape drive files if they don't exist tested write-protected tape drive files changed invalid seek from a fatal error (emulator halt) to a disk error disable Nagle algorithm for telnet connections (OSX buggy delay) error setting terminfo flags for USB serial devices is no longer fatal changed "pio to unimplemented device" from error to trace
Jim
2008-01-06 00:00:00 -05:00
e16f8824c4
license dongle, hobbyist build, tape, RT clock, amlc, disk, cpboot changes for hobby version (no amlc, one disk drive) new files geom.h, geomhash.h, geomhash.c for hobby version added checksum to disk geometry tables to thwart hacking hobby version added head offset check to disk driver for hobby version added -boot help to display help with booting added initial support for Matrixlock dongle emulator handles xon/xoff on console to avoid blocking supports read-only tape files (Unix read-only mode) changed clock catch-up code (slower) so rev 20 doesn't crash after suspend changed disk driver to controller 0-7 instead of device 0-64 demand-based variable interrupt rate for amlc controllers fixed devdisk error reading zero bytes past disk eof (for D. Boone) devdisk sets read check status bit on Unix read error added INA '1114 for cpboot (for D. Boone)
Jim
2007-11-29 00:00:00 -05:00
b8233043d2
devamlc supports real serial ports, performance tweaks changed SETCC_16/32, tcr, tch for speed, checked with Shark support for real serial ports added "amlc" config file to tie specific amlc lines to serial ports changed amlc context to controller 0-7 rather than device 0-64 use lword bit 7 to enable hardware flow control: 2413 -> 3413 poll amlc faster if dmq buffer full (output), but don't do this for input because user input buffer might overflow
Jim
2007-10-29 00:00:00 -04:00
73eaf5cfd5
jump directly to shift to eliminate a sub-switch (Primos rebuild gcov) After profiling Primos rebuild, shift instructions are #8
Jim
2007-10-21 00:00:00 -04:00
9d6903b4e2
prep devamlc for real serial, changed ints to shorts for queue instructions changed devamlc in prep for real serial support: - changed .sockfd to .fd - change transmit to directly access queue, to remove select
Jim
2007-10-19 00:00:00 -04:00
1e85a5c348
fixed MAJOR BUG (since em83) where memory writes were being lost because the "page unmodified" bit wasn't being cleared. If Primos needed the page, it wouldn't write it to the paging disk first.
Jim
2007-10-17 00:00:00 -04:00
3bb5eefc61
fixed multiple extension segments (stex, pcl, prtn), perf tweaks -- this was causing the LISTENER_ORDER$ signals after DIAG -- also was causing HELP to fail sporadically (HELP MTRESUME) removed TB_xxx flags (identical to T_xxx) added some eap hints changed to pop the concealed stack earlier changed LDLR/LDAR to load result from RP if ea is 7 changed STLR/STAR to store result in RP if ea is 7 added new trace flags for GET/PUT (unimplemented)
Jim
2007-10-16 00:00:00 -04:00
dffe43212e
used gcov info to reorder some stuff in ea64v (ea64v4.h)
Jim
2007-10-12 00:00:00 -04:00
afdf6057b1
FP exceptions, -DNOREG for -O0 and -DBG compiles, perf tweaks, gcov reworked ring/register fix so that Primos nevers sees RP faulted but we don't have to do extra tests in the fetch loop changed EAxxx routines to use RP segno when EA = register added FP exception fault to ieeepr8 and all FP routines added round flag to ieeepr8 (though not sure it's rounding correctly) used gcov info to reorder some stuff in ea16s, ea32s, ea32r64r changed warn() and fatal() to use get16t; prevpc might be a register IMPORTANT NOTE: to compile with -O0, also use -DNOREG (gcc bug)
Jim
2007-10-12 00:00:00 -04:00
36254e2fba
RP ring bits weren't being preserved when executing code in registers. This caused a HLT instruction in the register to halt the machine from ring 3
Jim
2007-10-09 00:00:00 -04:00
4779beb25e
removed dup iget16 in BDX, no wait common case handled first in WAIT cleaned up/added a few comments, added messages to fatal() calls
Jim
2007-10-06 00:00:00 -04:00
c463fce90d
large changes to dispatch.h to support 2 tables + separate R/S-mode mem ref dispatch table to avoid R-mode check in V-mode inst
Jim
2007-10-04 00:00:00 -04:00
c845fdce12
changed main loop to test inhcount only when intvec is set; this also required changes to emdev.h (can't look at inhcount)
Jim
2007-10-04 00:00:00 -04:00
84f57c9d59
removed rounding operation from ieeepr8 - causing Info RUN to fail + changed ARGT to add ring bits to LB & SB in brsave[] major TRACE update, to debug Information tsrc$$ problem changed MAXMB default for non-OSX platforms (PS3) to 32MB
Jim
2007-10-02 00:00:00 -04:00
399b67ea91
SSSN hack to bypass serialization in Primos, more performance tweaks changed B(I,D)(X,Y) instructions to increment/decrement inside if; (avoids reloading values to test them) and removed B(X,Y)NE macros changed default cpuid to 15 so real time clock is always set use ppa instead of ppn to avoid << 10 on every memory reference changed newkeys() so illegal keys give illegal instruction vs fatal() removed hack to patch Primos for rev 23 SSSN check added code to SSSN to skip the check loop immediately following removed #ifdef FAST from a few places, just use the faster code added code to LDA trace to also display as two octal bytes
Jim
2007-09-23 00:00:00 -04:00
2fb2e1a348
PCL fixes, more perf tweaks: shift, prtn, add16 changed EXPCL macro to set and clear bits - not just set changed shift instructions - made CLEARCL conditional; this means keys are only updated once per shift, not twice fixed prtn to update stack free pointer after values fetched in case a fault occurs and prtn is restarted changed prtn to invalidate brp cache only if ring changes changed prtn to inline, to avoid register save/restore changed argt to only update rp word offset in sf header added hack to pcl to correct wrapped RP for cpu.pcl case 42 added cgt inline proc, used in 2 places; generates better code (store to utempa is avoided altogether) added pimh (also used for pima) inline proc to avoid stores inlined invalidate_brp changed add16 implementation while looking at code generated ran faster according to Jeff's timers: 59/52 for old/new
Jim
2007-09-15 00:00:00 -04:00
d99d16932d
More performance tweeaks: get/put(16/32)r, eaxxx() changed get/put(16,32)r to check for ring change and use regular get/put call if possible, so brp supercache can be used FUTURE: could add separate brp cache entry for R0 accesses changed ea32r64r live register test so normal path is first changed ea64v live register test so normal path is first change ea32i to use INCRP macro instead of RPL++
Jim
2007-09-15 00:00:00 -04:00
91f8780e43
moved memlimit global variable to gv structure for quicker access + removed need for duplicated memcpy in pcl() (copying ecb) inlined pclea for speed FUTURE: would be nice to inline complex pcl/argt, but it's called by CALF and ARGT instructions
Jim
2007-09-15 00:00:00 -04:00
7a713e8ea9
speedup LDC/STC, STTM CPU time fix, IMA/IRS perf, apea() perf, -DNOMEM added 2 new rbp entries for FAR0/1; used in ldc/stc changed IMA and IRS back to use get/put16t to make use of supercache instead of always doing 1 mapva changed apea() to use brp[RPBR] for AP fetch, UNBR for indirect added -DNOMEM to remove -mem command option and testing fixed bug in STTM causing sporadic CPU times (negative deltas)
Jim
2007-09-14 00:00:00 -04:00
e095020a55
add access bits to brp.vpn entries, use brp cache for put16 & put32 added get32m & put32m: these always map changed get32 and put32 to be inlined changed mem[] references to MEM[] to allow experiments tried using register for MEM pointer - not so great tried using register for instcount - screwed up (very sluggish)
Jim
2007-09-12 00:00:00 -04:00
0948124f29
added "# of register sets" array, enabled multi-register set code ("ors") + moved dispatch tables to global variable structure
Jim
2007-09-12 00:00:00 -04:00
c4f7df2944
Fine tune eap supercache, other performance optimizations + Change tracing to show when supercache is used Symbolic names for supercache entries Added supercache entries for sector 0 and PB (different from RP) Add invalidate_brp to invalidate supercache Separate get16trap (WILL trap) from get16t (MIGHT trap) Use supercache in get32 and various get/put routines
Jim
2007-09-10 00:00:00 -04:00
84ae6fc905
eap register and gvp->brp page cache: 5 entries for PB, SB, LB, XB, "other" removed "char unmodified" from STLB; uses access[2] instead, to avoid a multiply instruction in mapva (can use shift now) use ea instead of pa when checking for page crossing in get32, in preparation for read VA caching, like iget16 uses
Jim
2007-09-09 00:00:00 -04:00
98417e5835
invalidate instruction cache page (instvpn) whenever OWNER might change removed OWNER tests from instruction fetch
Jim
2007-09-07 00:00:00 -04:00
6afd8f2c52
added inline to shift procedures (reduced the executable size, + faster) + changed gvp->prevppa from Prime memory offset to mem[] pointer added inline to tch, tcr, adlr added -DNOIDLE to make BDX use CPU cycles instead of sleeping changed ea64v.h so ixy avoids branching (hot spot in Shark)
Jim
2007-09-07 00:00:00 -04:00
24179fd2ac
added dispatch table for SRV memory references instructions vs switch + inlined and simplified iget16 instruction fetch moved pio test to R-mode path moved and simplified effective address calculation switch stmt removed mode switch stmt for EA calcs, changed to cascaded if moved iget16 static vars to gvp, for inlining changed mapva and iget16 so that the normal path is predicted
Jim
2007-09-05 00:00:00 -04:00
31edfb6674
removed valid bit from STLB cache and use segment # 0xFFFF instead this allows removing a comparison from mapva's fast path
Jim
2007-09-04 00:00:00 -04:00
ab4316a6a8
added FAST2 #ifdef to eliminate memory limit test, simplify CAS
Jim
2007-09-04 00:00:00 -04:00
2ee4f03291
added mapva stats
Jim
2007-09-04 00:00:00 -04:00
8f95ccc375
FDV, DFDV, FD, DFD always test for zero divisor, const mapio, fastmap added fastmap, but it's disabled because Primos 19 won't boot made mapio a const function
Jim
2007-09-04 00:00:00 -04:00
904ab90bd3
changed ea switch statement to multi-line if to check 64v first, get64 #FAST
Jim
2007-09-03 00:00:00 -04:00