Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / m68k-all / exec / cachepostdma.c
blobe8db93529d7a11c1bd5da0992bc28d04c22fc38a
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CachePostDMA() - Do what is necessary for DMA.
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <exec/types.h>
11 #include <exec/execbase.h>
12 #include <aros/libcall.h>
14 extern void AROS_SLIB_ENTRY(CachePostDMA_00,Exec,128)(void);
15 extern void AROS_SLIB_ENTRY(CachePostDMA_30,Exec,128)(void);
16 extern void AROS_SLIB_ENTRY(CachePostDMA_40,Exec,128)(void);
18 #include <proto/exec.h>
20 /* See rom/exec/cachepostdma.c for documentation */
22 AROS_LH3(void, CachePostDMA,
23 AROS_LHA(APTR, address, A0),
24 AROS_LHA(ULONG *, length, A1),
25 AROS_LHA(ULONG, flags, D0),
26 struct ExecBase *, SysBase, 128, Exec)
28 AROS_LIBFUNC_INIT
29 void (*func)(void);
31 /* When called the first time, this patches up the
32 * Exec syscall table to directly point to the right routine.
34 Disable();
35 if (SysBase->AttnFlags & AFF_68040) {
36 /* 68040 support */
37 func = AROS_SLIB_ENTRY(CachePostDMA_40, Exec, 128);
38 } else if (SysBase->AttnFlags & AFF_68030) {
39 /* 68030 support */
40 func = AROS_SLIB_ENTRY(CachePostDMA_30, Exec, 128);
41 } else {
42 /* Everybody else (68000, 68010) */
43 func = AROS_SLIB_ENTRY(CachePostDMA_00, Exec, 128);
46 SetFunction((struct Library *)SysBase, -LIB_VECTSIZE * 128, func);
47 Enable();
49 /* Call 'myself', which is now pointing to the correct routine */
50 return CachePostDMA(address, length, flags);
52 AROS_LIBFUNC_EXIT
53 } /* CachePostDMA */