|
The comments are owned by the author. We aren't responsible for their content.
Author | Thread |
---|---|
ssolie |
Published: 2008/5/7 18:36 Updated:
2008/5/7 18:36
|
Amigans Defender
Joined: 11/26/2006
From: Canada
Comments: 986
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
It is a pity you were unable resolve the issue regarding AmigaOS 4.0 DMA support. Otherwise, looks like a good product.
|
mboehmer |
Published: 2008/5/7 18:44 Updated:
2008/5/7 18:44
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
It seems that the bug is inside the CachePreDMA() and CachePostDMA() functions. In initial release, they are broken, and in February update they improved, but are not stable, especially if the RAM gets heavily fragmented.
Basic problem is that "old" software usually takes AllocVec() or AllocMem() to get buffer memory for DMA, which is not linear in OS4 anymore. This could be solved by a complex scatter / gather DMA engine, but reduces efficiency for DMA transactions. Anyhow, even with the update it doesn't work, and as PIO works fine we didn't follow this issue. Nevertheless, DMA works in classic 3.x systems, and PIO also in OS 4.x Classic. Michael |
ssolie |
Published: 2008/5/7 18:54 Updated:
2008/5/7 18:54
|
Amigans Defender
Joined: 11/26/2006
From: Canada
Comments: 986
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
You are supposed to use AllocVecTags() to allocate memory for DMA use. You cannot use the old deprecated methods on AmigaOS 4.0.
Unfortunately, this is not yet available in the public SDK but access to it can still be arranged in other ways. Try emailing Evert Carton (EvertC at hyperion-entertainment dot biz) and he should be able to get you access to the headers and autodocs necessary to get the job done. As for the CachePreDMA() and CachePostDMA() functions, those may still be broken. But it certainly isn't helping the situation when DMA memory is not being allocated in the correct manner. |
mboehmer |
Published: 2008/5/7 20:13 Updated:
2008/5/7 20:13
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Even as we get offtopic: your help is appreciated, but load of "depreciated" software running in JIT is using these "depreciated" way of allocating memory.
If such a memory is given to Poseidon as DMA buffer, then this is out of control, and the (as you say) still broken CachePreDMA() and CachePostDMA() functions lead to hell in this case. In OS3.x AllocVec() was the way to get memory. In OS4.x this compatibility has been broken for reasons unknown to me, with all bad consequences for hardware and software. Sorry, from my limited point of view (being a hardware guy) this was a bad decision, as old software cannot be changed, and this software is bound to compatibility. Michael |
amigakit |
Published: 2008/5/7 21:58 Updated:
2008/5/7 21:58
|
Quite a regular
Joined: 12/04/2006
From: www.amigakit.com
Comments: 728
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
We will be stocking Deneb USB card
Full product information here: http://amigakit.leamancomputing.com/c ... _info.php?products_id=795 |
joerg |
Published: 2008/5/8 1:09 Updated:
2008/5/8 1:09
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
Quote: Basic problem is that "old" software usually takes AllocVec() or AllocMem() to get buffer memory for DMA, which is not linear in OS4 anymore. Unlike AmigaOS 2.x and 3.x AmigaOS4 does have a function to allocate physically contiguous memory, but with a m68k driver you can't use it, like all new exec V50+ functions it's only callable from PPC native code. |
mboehmer |
Published: 2008/5/8 6:49 Updated:
2008/5/8 6:49
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
Unlike AmigaOS 2.x and 3.x AmigaOS4 does have a function to allocate physically contiguous memory, but with a m68k driver you can't use it, like all new exec V50+ functions it's only callable from PPC native code. Which in turn renders all M68k DMA related stuff *useless* and non-working. Apparently all programmers doing DMA related stuff did rely on this assumption, as otherwise Zorro III DMA cards would work in AOS4 Classic. If this "side effect" would have been taken into account when designing the new OS4 memory allocation functions quite some discussions and lot of complaining about non-working DMA would have been avoided. Why introducing some incompatibility / inconsistency when not absolutely necessary? Still, we are offtopic again. OS4 DMA is not related to DENEB. Michael |
Crumb |
Published: 2008/5/8 13:01 Updated:
2008/5/8 13:01
|
Just popping in
Joined: 12/11/2006
From:
Comments: 30
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Relax guys... I'm sure some solution to this small problem could be found.
perhaps making an OS4 native driver that uses that special memory allocation functions or changing os4 to reserve a small memory zone with real addresses and not real addresses to use old DMA drivers so old DMA cards work. |
rwo |
Published: 2008/5/8 17:35 Updated:
2008/5/8 17:35
|
Not too shy to talk
Joined: 12/01/2006
From: Skærbæk. Denmark
Comments: 304
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
If I wanted to rebuild my old a1200 this card is really a must for me. Then there is the question about doing an native hw version for Sirion, and I might be intrested in that aswell. But is it possible to get hold of youre HW specs/docs? RWO |
joerg |
Published: 2008/5/8 18:03 Updated:
2008/5/8 18:03
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
Quote: Which in turn renders all M68k DMA related stuff *useless* and non-working. |
ssolie |
Published: 2008/5/8 20:39 Updated:
2008/5/8 20:39
|
Amigans Defender
Joined: 11/26/2006
From: Canada
Comments: 986
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@joerg
To me it sounds like mboehmer is depending on an undocumented side effect in his driver and the real solution is to use the Cache(Pre|Post)DMA() functions correctly to obtain access to the DMA areas. The fact it seems to work on AmigaOS 3.x is only a coincidence. That said, mboehmer does have some ground to stand on in the backwards compatibility arena. What is the harm in changing the 68k accessible version of Alloc(Mem|Vec)() to return contiguous RAM? That way all the broken 68k drivers will work until they can be replaced with properly coded versions or even better PPC native versions. Will this kind of hack break anything else? |
TSK |
Published: 2008/5/8 22:21 Updated:
2008/5/8 22:21
|
Just can't stay away
Joined: 02/23/2007
From: Finland, the land of Santa, sauna, sisu and salmiakki
Comments: 1209
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
So why it must be 68k and why there's not native OS4 drivers ? |
joerg |
Published: 2008/5/9 1:04 Updated:
2008/5/9 1:04
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@ssolie
Quote: That said, mboehmer does have some ground to stand on in the backwards compatibility arena. *) What isn't, and can't be, compatible is the CPU cache line size. m68k CPUs have 16 bytes cache lines, PPC CPUs 32 bytes. On m68k 16 bytes alignment was enough for DMA, on PPC it's not and using less than 32 bytes can in rare cases cause data corruption (2 successive, 16 bytes aligned buffers used for DMA at the same time). Quote: What is the harm in changing the 68k accessible version of Alloc(Mem|Vec)() to return contiguous RAM? |
mboehmer |
Published: 2008/5/9 10:15 Updated:
2008/5/9 10:15
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
Only in case of broken DMA drivers not using Cache(Pre|Post)DMA() We are using those functions, and we are using them correctly as far as a hardware guy like me can judge. Maybe you can explain me what's wrong in our case: - we get a pointer to a DMA buffer (longword aligned) - we do the CachePreDMA() stuff - in case we have one full block we do DMA on the physical address returned from CachePreDMA() - in case we have fragmented memory we do PIO - of course, CachePostDMA() follows after the dirty work is done in case of DMA That's a workaround in some way, but this *should* work. Even with February update, it doesn't, while both DMA and PIO driver work flawlessly under OS3.x What are we doing wrong in your opinion? About your opinion of "broken DMA drivers": it's easy to drop backward compatibility and skip support for all DMA stuff on Classic, but not a wise decision. Especially the A4000T internal SCSI is missing for many people, same for Fastlane. Michael |
mboehmer |
Published: 2008/5/9 10:18 Updated:
2008/5/9 10:18
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
So why it must be 68k and why there's not native OS4 drivers ? Because there's no need to reinvent the wheel again if there's a working JIT with good performance (besides other political issues on MOS and OS4.x). Anyhow, if someone volunteers to implement a native DENEB driver for the OS4 USB stack, please contact me. |
mboehmer |
Published: 2008/5/9 10:25 Updated:
2008/5/9 10:25
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
To me it sounds like mboehmer is depending on an undocumented side effect in his driver No, damnit, we use the Cache/(Pre|Post)DMA() functions as explained in one post here. And they *fail* even with the February update, which honestly said did improve the situation compared against the initial release version of OS4. Quote: ... the fact it seems to work on AmigaOS 3.x is only a coincidence. Ah, really? So you think after two years of development we "just had luck" with DENEB DMA working perfectly and with high performance on Amiga Classic? Sounds to me like you never did low level stuff in neither hardware nor software. |
mboehmer |
Published: 2008/5/9 10:27 Updated:
2008/5/9 10:27
|
Just popping in
Joined: 01/16/2008
From:
Comments: 14
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
No, it is (nearly *) 100% backward compatible if the m68k DMA driver is implemented correctly using Cache(Post|Pre)DMA(). So please show me working M68k DMA drivers for - Fastlane Z3 - A4091 - internal A4000T SCSI Why don't they work? |
joerg |
Published: 2008/5/9 14:53 Updated:
2008/5/9 14:53
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
Quote: Maybe you can explain me what's wrong in our case: Quote: - of course, CachePostDMA() follows after the dirty work is done in case of DMA |
Spirantho |
Published: 2008/5/9 14:56 Updated:
2008/5/9 14:56
|
Quite a regular
Joined: 11/27/2006
From:
Comments: 535
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Just to add my own experiences....
I've found limited use of CachePreDMA etc. - whenever I've tried to allocate more than about 2K it'll just fail and return nothing useful. However, I am still using an old version of the SDK (the current version, 51.22) which dates from before the large memory change. Hopefully the new SDK will come out which may help. On the other hand, if this function is working then the driver should be able to support it. Every other OS supports scatter/gather as far as I know, you need to if you're going to use a proper modern memory system such as the one OS 4 uses. So while I greatly appreciate the work that E3B have done (and have voted with my wallet, too!), I do think that there is no reason why an OS4 driver shouldn't be written, so hopefully someone with more time than I will volunteer to have a crack at it. I could possibly even have a hack at it myself if necessary but whoever it is will need the SDK supporting the memory system changes which is still not public (the last SDK was 11/Apr/2006). I think people perhaps need to stop thinking of OS4 as being OS3.9 with bells and whistles - it's not, there's some major changes and modernisations gone on which are necessary - the changing of the memory system was one of them. Hence accusing OS4 of being broken is wrong because it's not, it's just evolved, and the cost of that evolution is that you can't rely on old assumptions. Is that clear? Probably not! :) |
joerg |
Published: 2008/5/9 15:03 Updated:
2008/5/9 15:06
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
Quote: - internal A4000T SCSI |
joerg |
Published: 2008/5/9 15:19 Updated:
2008/5/9 15:19
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1929
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@Spirantho
Quote: Just to add my own experiences.... |
ssolie |
Published: 2008/5/9 16:57 Updated:
2008/5/9 16:57
|
Amigans Defender
Joined: 11/26/2006
From: Canada
Comments: 986
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
Quote:
Sounds to me like you never did low level stuff in neither hardware nor software. I think it is best not assume such things and stick to discussing the ideas being presented so that the driver and/or OS functionality can be fixed. |
pjs |
Published: 2008/5/10 15:58 Updated:
2008/5/10 15:58
|
Not too shy to talk
Joined: 12/02/2006
From: VA, USA
Comments: 378
|
Re: Zorro II/III DMA USB 2.0 controller for all Zorro cap...
@mboehmer
I hope you can extend your assistance and expertise to anyone working on native OS4 support of your Deneb card! I have an A4000 and I would really like a USB card for it, but I don't intend to buy any more hardware that doesn't work with our OS4 future. On the other hand, I WILL vote with my wallet if there will be a native OS4 driver for your new card. Thanks for your great work Amiga hardware and I look forward to OS4 support! PJS |