1
0
mirror of https://github.com/prirun/p50em.git synced 2026-01-22 18:21:22 +00:00

22 Commits

Author SHA1 Message Date
Jim
5a5be64d17 Split devamlc into .h file, correct devpnc.h brace bug (hobby) 2011-08-24 17:42:35 -04:00
Jim
d398a93143 Removed PNCXSNAK - don't need it 2011-08-24 17:12:36 -04:00
Jim
50a95cc1ba Use close(): shutdown() causes a descriptor leak. Add a trace when a
connection is accepted.
2011-08-19 17:04:31 -04:00
Jim
49eaf4b21b Don't zero uid of disabled node, to avoid "can't find uid" error. 2011-08-19 16:15:16 -04:00
Jim
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.

Also removed pnchexuid: useful in the beginning, not so much now.
2011-08-19 16:04:39 -04:00
Jim
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.
2011-08-19 13:37:02 -04:00
Jim
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
2011-08-18 14:04:55 -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
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
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
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