hi Brantley,
Now I start to understand what's going on.
But do you mean 0744 by 0743?
0743 mov (sp), r0
0744 mov $_u, r0
And 2230 should be 2229, which is:
2229 sureg();
Thanks &
Regards,
Qinglai
On 10/3/06, Brantley Coile <brantley(a)coraid.com> wrote:
> Rp->p_addr is the address of the swappable image in core. The process
> image begins with the user segment for that process. Line 0743 maps
> the upage into the current address space (KISA6) and _retu loads
> previously saved sp and r5 from there. Notice that on line 2230
> Ken reloads the other memory mapping registers.
>
> Read the section `Memory Management' starting on page 2-4 for background
> on this.
>
>
> U.u_rsave is just a constant location in memory. Notice that rp->p_addr
> isn't a byte address but a core click address in units of 64 bytes.
>
> Hope that helps.
>
> Brantley
>
> > The final question is about how savu/retu work.
> >
> > savu:
> > line 0729 and line 0730: r5 and sp are saved to (r0) and (r0)+, which
> > are the address of u.u_rsav.
> >
> > retu:
> > 0746 and 0747: sp and r5 are read from (r0) and (r0)+, which is
> > "rp->p_addr" (see line 2228). It looks weird to me. (Okay...I have to
> > confess I look stupid here...) When making call to retu, why bother
> > "retu(rp->p_addr)"? Why not calling with "retu(u.u_rsav)"? Does it
> > mean that rp->p_addr == u.u_rsav?
>
>
hi All,
Again, I run into problems when reading slp.c and savu/retu.
Actually, I have 3 questions.
First, I doubt whether all processes share one "u" or each process has
its own "u".
line 0402: One allocated per process.
It seems that each process has its own user structure.
But the "u" is defined as a universal variable (line 0459), and the
line 0407 clearly states that the "u" resides at virtual kernel loc
140000.
So isn't it saying that there's only one "u" in the core memory?
This concept is very important, because it's bound tightly with
savu/retu mechanism.
---------------------------------------------------------------------------
Now comes the second question:
The savu procedure is supposed to save r5 and sp to u.u_rsav,
and the retu is supposed to reset the r5 and sp with the saved values.
If each process has its own u, then savu/retu simply work fine.
But if all processes share one u, the newest call to savu will
overwrite the previously saved values of r5 and sp, so that retu is
not able to get back the r5/sp again!
The story is like this:
1889: r5/sp of process #1 are saved to u.u_rsav
2189: r5/sp of process #0 are saved! Thus overwriting the values of process #1.
So when we are coming to 2228, how can retu work in a way as it is expected to?
-----------------------------------------------------------------------------
The final question is about how savu/retu work.
savu:
line 0729 and line 0730: r5 and sp are saved to (r0) and (r0)+, which
are the address of u.u_rsav.
retu:
0746 and 0747: sp and r5 are read from (r0) and (r0)+, which is
"rp->p_addr" (see line 2228). It looks weird to me. (Okay...I have to
confess I look stupid here...) When making call to retu, why bother
"retu(rp->p_addr)"? Why not calling with "retu(u.u_rsav)"? Does it
mean that rp->p_addr == u.u_rsav?
OMG, I am totally confused...
--------------------------------------------------------------------------------
I guess It's kind of boring to read my question...but hopefully
someone can give me some hint...Thanks in advance!
Regards,
Qinglai
hi all,
I just started to read the source code of V6 with Lion's book.
But before I went far I was stopped by m40.s
0636: mov $USIZE-1/<8|6, (r1)+
What does the slash "/" stand for?
I guess this line should be
mov $USIZE-1<<8|6, (r1)+
Is "/<" the same as "<<"?
I checked in Unix PDP11 Assemble Refrence Manual but didn't find a clue.
Is it the right place to ask such question?
Thanks in advance
Regards,
Qinglai
Whilst looking for a recent AUUGN mine eyes espied a pile of old AUUGNs,
from Vol 1 No 1 (October 1978) to Vol 3 No 6 (Aug/Sep 1981). And I know I
have the rest of them somewhere, but they're probably packed away.
It contains the famous Thrust Meter, a few papers by Yours Truly, and I
think it has the short assembly program that would bring a PDP-11/70 to
its knees (the infamous "SPL" firmware bug).
Free to an *organisation* that can use them, on condition they never get
chucked out and are available for viewing (even if as a PDF). Due to a
"senior moment" I've already made this offer to AUUG.
-- Dave
Hi,buddies
Nice to meet you all.I am a new comer from ChengDu,China.I am very
interested in Unix and PDP an now I am reading the book <Lions'
Commentary on UNIX 6th Edition with Source Code> ,which make me so
excited.It's indeed an great book for me to understand the principle and
detail of the UNIX, however, I am a self-learner without chance to
discuss with others around me, so I am glad to join you and have a
chance to learn from all of you. Thanks!
Best Regards
Tian Wen
You know Pat I looked under PDP and BSD 4.2 directories and I don't
think I'm finding the distro you are meaning. I looked under the VAX
directory to and I'm not finding the system you mentioned.
Bill
I've already posted all sorts of information previously, but the
thread seems to have gotten caught in some downtime over the weekend.
Anyway, does anybody have any idea what I might be doing wrong?
Prior posts are in the web archive.
Michael "Madcrow" K.