[ Fabrizio Oddone > Disk Charmer > * | Italian Recipes | Ricette Italiane | Y2K | Site Map | What's New ]


System 7.5.5: fixes that may affect Disk Charmer

Last updated: April 6, 1997


Tech Note 1069

Tech Note 1069 by Brian Bechtel describes in more detail the fixes that were rolled into System 7.5.5. Here I excerpt a few passages, liberally sprinkling comments hither and thither.

VM now holds some stack for Control and Status calls

VM now holds 2K of stack for all _Control and _Status calls. This 2K of stack was previously being held for _Read and _Write calls.

The note above looks quite incomprehensible to non-programmers, I know. I'm going to add something similarly confusing, so feel free to skip to the next section.

At last this was fixed! New Inside Macintosh:Memory was very unclear in discussing this topic. It stated that the buffer was being held for _Read and _Write calls, but not for _Control and _Status calls. Unfortunately it did not care to mention the stack, nor who ought to take care of that (the driver or the application?). Anyway I thought that at some point they would understand that a single _HoldMemory call in the Virtual Memory Manager is better than hundreds of calls in drivers and applications, so I removed the extra _HoldMemory calls in Disk Charmer.

But there is more. Disk Charmer calls _Control from a (preemptive) thread. I used to allocate 2.5K of stack for the thread. On some Mac models, usually PowerMacs or PowerBooks, this was evidently not enough, because crashes would intermittently occur. I fixed these crashes by asking for the default stack size, which is usually 4K. Thus, I infer that the Virtual Memory Manager had better hold 4K instead of 2K. Crashes might still occur (anywhere, not just in Disk Charmer) if the 2K stack limit is passed when PageFaultFatal() would return TRUE. This problem would occur rarely because VM holds the memory pages containing the 2K stack. Given that the page size is 4K on my Quadra 700, VM actually holds either 4K or 8K if the stack straddles a page boundary. In the former case, if the 2K are "on the wrong side of the page", the current MacOS may run into a trouble.

Update: according to a very knowledgeable source, the problem I found is due to an inordinate amount of stack being used by the ATA driver (in use with IDE hard drives), and perhaps the .Sony disk driver as well (SCSI stuff should be immune); this should be fixed in System 7.6.1 (see Tech Note 1096 by Lenae Rowland). By fixing this at the driver level, VM won't have to be changed.

Floppy disk insertion and asynchronous I/O bug

On a Macintosh 6100, 7100, or 8100 machine, when a floppy disk is inserted and there is asynchronous file system activity going on, the machine may hang. An internal routine was incorrect because the ROM was finalized while some experimentation was going on with how the file system works. Machines with later ROMs are fine. We patch the 6100/7100/8100 ROM to bring this ROM family up to date. This only affects these three classes of machine. It affects them at any clock speed.
The following was formerly described as a difficulty using floppy disks occurring on Power Macintosh 7500, 7600, 8500, or 9500 computers with a 180 MHz or faster PowerPC processor (source: Apple Information Alley). That note is now obsolete.

Floppy disk formatting

On fast processors (180 Mhz or better, 604e), floppy disk formatting would sometimes fail because the code didn't wait long enough to switch heads to the second side. This left the second side unformatted. We changed the timing in the floppy disk formatting routines for this case, and now format floppies correctly. Some machines may have an extension called "PowerMac Format Patch" which does the same thing. If System 7.5.5 installer detects this extension, it should delete it. (The extension will not install its code under System 7.5.5 or later.)

Emulator cache flush bug

If the emulator is requested to flush a non-existing memory range, the emulator gets stuck in an infinite loop. We now check the range to be flushed and exit if invalid memory is specified. This fix affects the PowerBook 5300, 2300, and PCI-based desktop Macintosh computers.

File Manager flush bug

The File Manager was making a request to flush a non-existing memory range. Because of the Emulator cache flush bug described above, the emulator would get stuck in an infinite loop. We patch _GetFPos, _SetFPos, and _Read to fix this problem. This fix affects the PowerBook 5300, 2300, and PCI-based desktop Macintosh computers.

Update: It's worth mentioning that System 7.6 did not include one bug fix made in the DR emulator for 7.5.5. This bug fix is back: see Tech Note 1096 by Lenae Rowland about 7.6.1.

This page was last built with Frontier on a Macintosh on Mon, Apr 22, 2002 at 9:39:29 PM by
Fabrizio Oddone, fab@kagi.com