[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] NetUSBee usb driver



David Gálvez wrote:
Also in the mass storage driver one of the assembler files has the
instruction "cpush" that I think isn't valid in 030 and may be in the
ColdFire either.

Here we go.

The cpushX instructions are for cache management, they are an example of what I call "supervisor instructions". They behave differently between 680x0 and ColdFire. So on ColdFire machines, they behave differently between EmuTOS (ColdFire without emulation) and FireTOS (68060 emulation). As you say, it may be even different on 68030. This is a problem for TOS programs managing the cache themselves, such as LDG.

But for MiNT programs or modules, don't panic. The kernel has functions to cleanly flush the cache, regardless to the actual CPU. Something like cpushi() to invalidate the instruction cache, and cpush() (don't remember exactly) to flush the data cache. You should use those from your driver. But I wonder why it could be required (DMA ?).

--
Vincent Rivière