From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucio De Re To: 9fans mailing list <9fans@cse.psu.edu> Message-ID: <20020127155513.G9246@cackle.proxima.alt.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [9fans] delay and aamloop Date: Sun, 27 Jan 2002 15:55:14 +0200 Topicbox-Message-UUID: 4667e634-eaca-11e9-9e20-41e7f4b1d025 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