1
0
mirror of https://github.com/prirun/p50em.git synced 2026-01-17 16:33:54 +00:00

156 Commits

Author SHA1 Message Date
Jim
459873ff90 Add stlb/iotlb trace option "tlb", set T_EAS when requested 2011-08-18 13:17:54 -04:00
Jim
2ef1438900 Updated some comments. Still some confusion about PTLB re: IOTLB. 2011-08-18 10:10:28 -04:00
Jim
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.
2011-08-17 16:28:58 -04:00
Jim
1bc93f304a devpnc: ensure ring.cfg unique id is really unique: it determines the
node-id for incoming connections.
2011-08-17 15:48:01 -04:00
Jim
834cb1977f Add simulate token OCP, just for documentation purposes. This is only
used by T&M's.
2011-08-17 12:05:21 -04:00
Jim
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.
2011-08-17 09:35:01 -04:00
Jim
8c635c19c8 Minor devpnc edits, change MAXACCEPTTIME from 5 to 15 seconds 2011-08-16 18:34:16 -04:00
Jim
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.
2011-08-16 18:04:13 -04:00
Jim
8aac162418 Use select() to find out if any node has sent us data; more efficient
than doing a read on each socket.
2011-08-16 17:55:55 -04:00
Jim
51dfd5101b Only dump packets when tracing w/RIO 2011-08-16 15:31:07 -04:00
Jim
f742bc46a9 Add code to devpnc to remember when it triggers interrupts, seems to
work okay and not have the 30-second delay problem.

Over netlink, a prirun, l, displays a couple of medium-sized packets,
then '55' from PR0055 in a tiny packet, then one more reasonable-size
packet.  The tiny packet seems odd, but I'm guessing it's a window
size or buffer size thing inside Primos / Primenet.
2011-08-16 15:28:14 -04:00
Jim
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...
2011-08-16 14:46:36 -04:00
Jim
4ddd43debf Add async I/O code to devpnc, but disabled for now: there is a delay
problem with remote terminal sessions:

1. netlink to remote Prime
2. a prirun
3. l (list directory)
4. displays a little, then a longish pause up to 30 seconds, then the rest

Does a similar thing with stat us.  Hitting Enter will cause it to
finish, while typing characters does not.  I suspect this is a problem
with Prime's networking code, but not sure.

Also, if async I/O is used, the QUIT. OK, message doesn't appear after
ctrl-p.  I think they are getting wiped out by Primenet's buffer
flushes.

All of this might be subtle timing problems because I changed the
default clock rate from 250/330/500/whatever times per sec to 20 times
per second in this rev 19 version of Primos.
2011-08-15 17:11:28 -04:00
Jim
e4dfa3fade Interrupt immediately after xmit and rcv instead of doing a poll. 2011-08-14 23:53:12 -04:00
Jim
b1bb5c9a3c Fixed PNCDIM halt bug (= sb == in POLL), minor cleanups 2011-08-14 17:42:10 -04:00
Jim
479acd4788 When tracing, fatal() dumps RP instruction address queue 2011-08-14 13:34:07 -04:00
Jim
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.
2011-08-14 12:10:14 -04:00
Jim
c3ba188ae4 First "working" PNC emulation, but has circuit reset issues 2011-08-13 16:13:22 -04:00
Jim
6348f80b5a Add "eas" trace flag to trace 32S addressing 2011-08-13 16:12:33 -04:00
Jim
945f48057c Add multi-indirect level test for several 32R cases (64R is always
single indirect)
2011-08-13 11:07:37 -04:00
Jim
26b86c84e9 Add "off" trace option: initially disabled, ctrl-t to toggle it 2011-08-13 10:58:16 -04:00
Jim
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.

Issues like this, might be why DIAG was developed to surpass T&M: many
of these CPUT4 tests are testing the implementation of an instruction
rather than just the architectural feature of the instruction.
2011-08-09 09:10:55 -04:00
Jim
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.
2011-08-09 09:04:15 -04:00
Jim
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.
2011-08-08 19:03:25 -04:00
Jim
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.
2011-08-08 09:24:17 -04:00
Jim
499d07d82e CPUT4 T&M: max indirect levels is 8 then RXM fault occurs (S/R mode) 2011-08-06 14:44:42 -04:00
Jim
adbf7dff22 Always print a linefeed after HLT 2011-08-06 09:39:19 -04:00
Jim
6b080f7c5e For CPUT4, add LPID (only checks restricted) and mark some other
unimplemented instructions as restricted.
2011-08-06 09:30:27 -04:00
Jim
23b8cd9892 Only use 28 bits of physical address in mapva to correct CPUT4
emulator seg fault after LPSW near label RXM in CPUT4.

CPUT4 activates Ring 3 by loading the ring bits of the program
counter.  However, it does not enable segmentation, so we're still
accessing memory by physical location - no address mapping occurs.
mapva used the entire 32-bit program counter as an offset in the MEM
array (physical memory), and because of the ring bits, this caused a
Unix seg fault.

mapva was changed to only use 28 bits of the address when VA mapping
is disabled (28 bits matches the size of the MEM array).  Technically,
a more accurate mask should be applied based on the CPU model.  For
example, a P750 could only access 8MB of memory.
2011-08-06 09:01:16 -04:00
Jim
8ad786dc42 Invalidate brp cache on LPSW, since segmentation could be enabled. 2011-08-06 08:47:53 -04:00
Jim
3b6ed6f52c On HLT with -boot filename (T&M), either continue or halt. Add trace
code for CLS to show memory value used for comparison.
2011-08-06 08:44:36 -04:00
Jim
4388350678 Allow continue after HLT for -boot filename for V-mode T&Ms 2011-08-03 17:31:09 -04:00
Jim
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.
2011-08-02 16:57:10 -04:00
Jim
2943b41e0c Cause UII for P300 paging instructions for CPUT4 T&M 2011-08-02 14:41:16 -04:00
Jim
cefc0e64e8 Corrected CREP and RTN based on CPUT4 T&M 2011-08-01 18:08:14 -04:00
Jim
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.
2011-07-31 23:25:51 -04:00
Jim
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.
2011-07-31 22:54:11 -04:00
Jim
37909a6de0 Add sense switch skips SS1-4, SR1-4, SSS, SSR to run old T&M diags 2011-07-31 22:40:33 -04:00
Jim
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.
2011-07-30 18:14:35 -04:00
Jim
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
2011-07-30 17:06:19 -04:00
Jim
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.
2011-07-18 09:49:34 -04:00
Jim
bcfdbec10f Changes for gcc on OSX 10.6, cross compile on Intel 2011-07-18 09:31:14 -04:00
Jim
78aaf1753d Add an inline swab option to swap.h 2011-06-19 08:56:11 -04:00
Jim
e8528a2233 lmserver changes for linux 2011-05-04 11:17:52 -04:00
Jim
dbe7246f12 Default to 1 AMLC board; add magrst to makefile 2010-01-31 09:31:08 -05:00
Jim
dd587bade1 Fixed if/else indenting 2008-10-04 17:49:42 -04:00
Jim
2f065a3bde License server ignores bogus connections, updated makefile to store
executables in local directory instead of ../run (for testing first)
2008-09-24 16:02:01 -04:00
Jim
b787eaa56b Changed makefile so that utility binaries go in bin, not run 2008-09-12 21:33:16 -04:00
Jim
f971e4fac5 Moved mx directories to ../dongle, out of source directory 2008-09-12 20:12:17 -04:00
Jim
f70c0561cb Print version and exit for "em --version" 2008-09-12 16:42:43 -04:00