9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans mailing list <9fans@cse.psu.edu>
Subject: [9fans] delay and aamloop
Date: Sun, 27 Jan 2002 15:55:14 +0200	[thread overview]
Message-ID: <20020127155513.G9246@cackle.proxima.alt.za> (raw)

It all started with an Am97c690 controller :-(

Now I have to get Plan 9 to run on the PCD-4Lsx because I want to
finish off the PCnet driver and the only version of the controller
I have access to is on one particular motherboard.

I've narrowed down _a_ boot problem to the execution of delay(10)
within floppyrevive() in /sys/src/boot/pc/devfloppy.c but I have
trouble making head or tail of the symptoms: mp->name is no longer
pointing to the "fd0" value assigned to it in floppyinitdev() once
the first delay(10) is executed.

Now, delay() is a simple procedure in /sys/src/boot/pc/clock.c
which in turn uses aamloop() in /sys/src/boot/pc/l.s and reduces
to a very simple loop.  The AAM instruction means precisely nothing
to me, my knowledge of Intel assembler stopped at the 80186, but
given that it does not explicitly change the value of mp->name, I
wonder how it could conceivably cause it to change indirectly and
the only explanation seems that it causes some changes in memory
mappings.  I am aware that this type of flight of fancy on my part
generally causes me to be publicly embarrassed, still, I can't
think of anything else.

I have replaced the delay(10) calls with C loops and the mp->name
value is now left undamaged.  There could be something strange in
the operation or design of the PCD-4Lsx (made by Fujitsu, it was
marketed in Europe by Siemens-Nixdorf; my particular unit has a
486SX-25 and 32Meg of RAM), I'm sure I'll come across further
oddities, but I would like an opinion from the bits-n-bytes folks
here how AAM can conceivably cause memory to shift underfoot.

Hazarding a totally uninformed opinion, is it possible that at the
time floppyrevive() is called within 9load the memory management
is not yet stable and AAM causes it to misbehave?

Are there any experiments I ought to conduct to assist in diagnosing
and curing the problem?  The most obvious visible sign is the
display by 9load of a very ugly "using" message that does not
include "fd0" anywhere in it.

My next step is to install the modified 9load on an installation
floppy and see if I make any progress towards getting the kernel to
run.

++L


             reply	other threads:[~2002-01-27 13:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-27 13:55 Lucio De Re [this message]
2002-01-27 19:20 Russ Cox
2002-01-28  5:50 ` Lucio De Re

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020127155513.G9246@cackle.proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).