From: paramucho@hotmail.com (paramucho)
Subject: Re: Access to RSTS/E IOPAGE Registers
Date: Sun, 17 Feb 2013 13:02:38 GMT [thread overview]
Message-ID: <5120d34f.47638789@nntp.aioe.org> (raw)
In-Reply-To: kflmaf$plm$1@Iltempo.Update.UU.SE
On Fri, 15 Feb 2013 17:04:31 +0100, Johnny Billquist <bqt@softjar.se>
wrote:
>>> On 2013-02-15 13:34, paramucho wrote:
>>>
>>>> In fact, it turns out that it's necessary to get rid of an AST which
>>>> emulates an interrupt (for example the keyboard) with ASTX$ before the
>>>> "interrupt" code executes. That's because there's no guarantee that
>>>> the "interrupt" code will return along the path which issues an ASTX$.
>>>> It's a matter of rebuilding the AST stack.
>>>
>>> I'm not sure I understand the problem.
>>> So, you press a key. RSX generates an AST. You call the interrupt code
>>> in RT-11. Is RT-11 assuming that this is a real interrupt? Ie., do RT-11
>>> return with an RTI? I would have thought you'd want to create an
>>> interrupt stack frame before calling into RT-11 in that case.
>>> Or are you stepping in at a higher level where the hardware interrupt
>>> have already been dealt with, and it's just a call into somewhere? Still
>>> seems weird if it don't do a return sooner or later?
>>>
>>> I must be missing something here.
>>
>> Yes, RT-11 (i.e. RUST/SJ) assumes its an interrupt, so I have to build
>> an interrupt stack (PC, PS). However, I need to get rid of the AST
>> stack frame first.
>
>Cool. But why get rid of the AST frame? Have the RTI return to your AST
>code, which then do the ASTX$ would be the natural thing, I would have
>thought.
See below.
However there is another reason as well. An AST blocks *all* other
ASTs, whereas an interrupt only blocks *some* other interrupts. For
example, a keyboard AST, which could take quite extensive processing,
can block a timer AST.
>> To do that I move the AST frame down the stack to make space for the
>> keyboard vector PC/PS. Then I execute ASTX$ which gets rid of the AST
>> frame and enters the keyboard ISR. And that works (most of the time).
>
>Hmm. It should work, except that you need to keep track of your stack.
>Some ASTs push some extra stuff on the stack, which I hope you are aware of.
Yes, I get rid of the ISB address which comes with a QIO AST.
The one thing that did confuse me was that the documentation spoke
about the "event flag word" which ended up being *four* words in
practice. The ASTX system code cleared that up.
>> The keyboard interrupt usually returns, but may abort if two ^C's are
>> received.
>
>What do it do in that case? Jump to some random point, while just
>setting a new PSW?
Standard operating procedure for program abort in an (unmapped) single
process RT-11/RUST system is to issue an abort I/O to each driver,
cancel timer requests etc and then restart the monitor. Abort can
occur in mainline or AST state. It's more dignified in RUST/XM etc.
In RTX that would mean that an ASTX could be lost in an abort.
>>>> The only problem I have at present is that every so often I enter XDT
>>>> with an unidentified CRASH. I've searched through all the RSX media I
>>>> have but I can't find the source of the CRASH. It always occurs when
>>>> I'm typing characters--in fact, the keyboard is the only asynchronous
>>>> event at present. The crash is intermittent. It might have something
>>>> to do with my ASTX$ trickery.
>>>
>>> Isn't that done at user level? I can't see how you could cause a crash
>>> by that. Or did you poke in the internals of RSX to modify how ASTX$ works?
>>
>> Yes, its at user level and, no, there's no poking around. And yes, I
>> shouldn't be able to cause a system crash in user mode.
>
>Interesting how you manage, then... This will be fun to find out.
That's what I've been thinking.
>>> You should search through RSX11M.MAP to find which module this is, and
>>> where in that module. And then look at the code and figure out what is
>>> going on.
>>>
>>> Also, if you get to XDT, what you could do is just to do a crash dump,
>>> and then run the crash dump analyzer on the output after reboot, and
>>> find out more details on what happened, and why.
>>
>> I can't find CDA on any of the RSX .DSK files I have here. I'll keep
>> looking.
>
>Um... What version of RSX are you actually running?
I am in a complete mess in that department. I've downloaded various
system disks over the years. I develop mostly under V11 which doesn't
support I/D space or MSCP, so I don't run M+ or large disks.
The last system I managed to put together was in response to some
issues you were having with RMS a couple of years ago (I think). It
reports the following:
RSX-11M V4.4 BL46 512.K MAPPED
>Maybe you've found a nice bug. There have been some bug fixes related to
>ASTs over the years, as far as I can remember.
My guess is that I'm doing something naive like I did with the user
mode vector table for SVTK$.
It took me awhile to work out that I needed to use Set Multiple
Characteristics to set up full duplex mode. Before I worked that out I
tried having separate LUNs for for the keyboard and terminal output,
and I have not gone back to a single LUN.
Keyboard input is asynchronous with an AST and passall. At present
terminal output is synchronous with no AST. The problem might be
related to this usage, but I can't imagine that what I've done there
would crash RSX. It can't be that easy.
I've wrapped both keyboard and terminal output QIOs in DSAR/ENARs, but
that doesn't stop the intermittent bug. There is a also a chance that
I could have a bug in V11. I've started working on the driver which
talks to the RSX file system. Once that's done RTX.TSK will be
operative under E11 and SimH (and real hardware) which would further
test the bug.
I have a question. RTX.TSK itself will go into [1,54], but I'm going
to need a separate RSX directory to hold the RTX.TSK system files and
applications--would there be any problems if I just chose a default
directory name such as [1,64] and use that? I can make the name
configurable in a .INI file, but I like to have a reliable default for
these things.
Ian
next prev parent reply other threads:[~2013-02-17 13:02 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-26 13:22 Access to RSTS/E IOPAGE Registers Jerome H. Fine
2012-12-26 15:35 ` Bill Gunshannon
2012-12-27 0:10 ` glen herrmannsfeldt
2012-12-27 21:13 ` Johnny Billquist
2012-12-27 21:25 ` glen herrmannsfeldt
2012-12-27 21:37 ` Johnny Billquist
2012-12-27 13:38 ` Jerome H. Fine
2012-12-27 21:16 ` Johnny Billquist
2012-12-28 6:32 ` paramucho
2012-12-28 15:01 ` Johnny Billquist
2012-12-30 2:04 ` paramucho
2012-12-30 3:25 ` Johnny Billquist
2012-12-30 18:25 ` jgharston
2012-12-30 21:44 ` Johnny Billquist
2012-12-31 0:34 ` Jerome H. Fine
2012-12-31 0:52 ` Johnny Billquist
2012-12-31 16:04 ` paramucho
2012-12-31 16:23 ` Bob Eager
2012-12-31 16:33 ` Johnny Billquist
2013-01-01 3:28 ` paramucho
2012-12-31 16:30 ` Johnny Billquist
2013-01-01 4:55 ` paramucho
2013-01-01 18:37 ` Johnny Billquist
2013-01-13 8:01 ` paramucho
2013-01-13 14:13 ` Johnny Billquist
2013-01-14 6:30 ` paramucho
2013-01-14 11:50 ` Johnny Billquist
2013-01-15 14:20 ` paramucho
2013-01-15 21:10 ` Johnny Billquist
2013-01-16 3:25 ` Jerome H. Fine
2013-01-16 4:39 ` Johnny Billquist
2013-01-16 13:43 ` paramucho
2013-01-16 18:59 ` Johnny Billquist
2013-01-17 11:56 ` paramucho
2013-01-22 9:53 ` Hartmut Brandt
2013-01-22 13:52 ` Johnny Billquist
2013-01-23 14:11 ` paramucho
2013-01-23 19:53 ` Johnny Billquist
2013-01-25 13:43 ` paramucho
2013-01-25 23:39 ` Johnny Billquist
2013-01-28 7:47 ` paramucho
2013-01-28 18:06 ` Johnny Billquist
2013-01-30 12:16 ` paramucho
2013-01-30 18:50 ` Johnny Billquist
2013-02-02 12:51 ` paramucho
2013-02-02 16:15 ` Johnny Billquist
2013-02-03 16:16 ` Jerome H. Fine
2013-02-04 12:03 ` paramucho
2013-02-04 16:58 ` Johnny Billquist
2013-02-15 12:34 ` paramucho
2013-02-15 13:08 ` Johnny Billquist
2013-02-15 15:15 ` paramucho
2013-02-15 16:04 ` Johnny Billquist
2013-02-17 13:02 ` paramucho [this message]
2013-02-17 13:43 ` Johnny Billquist
2013-02-19 14:09 ` paramucho
2013-02-20 11:18 ` paramucho
2013-02-21 0:23 ` Johnny Billquist
2013-02-21 0:22 ` Johnny Billquist
2013-02-24 14:10 ` paramucho
2013-02-24 15:00 ` Johnny Billquist
2013-03-06 15:33 ` paramucho
2013-03-06 23:51 ` Johnny Billquist
2013-03-20 10:15 ` paramucho
2013-03-20 13:01 ` Johnny Billquist
2013-03-20 21:42 ` Johnny Billquist
2013-04-14 16:48 ` paramucho
2013-04-14 18:28 ` Johnny Billquist
2013-04-15 10:30 ` Johnny Billquist
2013-03-20 17:33 ` Jerome H. Fine
2013-03-25 15:55 ` paramucho
2013-03-06 15:33 ` paramucho
2013-02-24 14:12 ` paramucho
2013-01-23 14:10 ` paramucho
2013-01-14 9:13 ` Hartmut Brandt
2013-01-14 8:08 ` John Santos
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox