home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / MMULib / Include / clib / mmu_protos.h < prev   
Encoding:
C/C++ Source or Header  |  1999-10-31  |  5.0 KB  |  101 lines

  1. /*************************************************************************
  2.  ** mmu.library                                                         **
  3.  **                                                                     **
  4.  ** a system library for arbitration and control of the MC68K MMUs      **
  5.  **                                                                     **
  6.  ** © 1998-1999 THOR-Software, Thomas Richter                           **
  7.  ** No commercial use, reassembly, modification without prior, written  **
  8.  ** permission of the authors.                                          **
  9.  ** Including this library in any commercial software REQUIRES a        **
  10.  ** written permission and the payment of a small fee.                  **
  11.  **                                                                     **
  12.  **---------------------------------------------------------------------**
  13.  ** mmu.library prototypes                        **
  14.  ** Version 40.50        31.10.1999                **
  15.  *************************************************************************/
  16.  
  17. #ifndef CLIB_MMU_PROTOS_H
  18. #define CLIB_MMU_PROTOS_H
  19.  
  20. #ifndef EXEC_LISTS_H
  21. #include <exec/lists.h>
  22. #endif
  23.  
  24. #ifndef UTILITY_TAGITEM_H
  25. #include <utility/tagitem.h>
  26. #endif
  27.  
  28. #ifndef MMU_CONTEXT_H
  29. #include <mmu/context.h>
  30. #endif
  31.  
  32. void *AllocAligned(ULONG bytesize,ULONG reqments,ULONG alignment);
  33. struct MinList *GetMapping(struct MMUContext *);
  34. void ReleaseMapping(struct MMUContext *,struct MinList *);
  35. void SetPropertyList(struct MMUContext *,struct MinList *);
  36. void TouchPropertyList(struct MinList *);
  37. ULONG GetPageSize(struct MMUContext *);
  38. ULONG RemapSize(struct MMUContext *);
  39. char GetMMUType(void);
  40. void LockMMUContext(struct MMUContext *);
  41. void UnlockMMUContext(struct MMUContext *);
  42. LONG AttemptLockMMUContext(struct MMUContext *);
  43. void LockContextList(void);
  44. void UnlockContextList(void);
  45. LONG AttemptLockContextList(void);
  46. BOOL SetPropertiesA(struct MMUContext *,ULONG flags,ULONG mask,ULONG lower,
  47.     ULONG size,struct TagItem *tags);
  48. BOOL SetProperties(struct MMUContext *,ULONG flags,ULONG mask,ULONG lower,
  49.     ULONG size,unsigned long tag1type, ... );
  50. ULONG GetPropertiesA(struct MMUContext *,ULONG lower,struct TagItem *tags);
  51. ULONG GetProperties(struct MMUContext *,ULONG lower,
  52.     unsigned long tag1type, ... );
  53. BOOL RebuildTree(struct MMUContext *);
  54. BOOL SetPagePropertiesA(struct MMUContext *,ULONG flags,ULONG mask,
  55.     ULONG lower,struct TagItem *tags);
  56. BOOL SetPageProperties(struct MMUContext *,ULONG flags,ULONG mask,
  57.     ULONG lower,unsigned long tag1type, ... );
  58. ULONG GetPagePropertiesA(struct MMUContext *,ULONG lower,
  59.     struct TagItem *tags);
  60. ULONG GetPageProperties(struct MMUContext *,ULONG lower,
  61.     unsigned long tag1type, ... );
  62. struct MMUContext *CreateMMUContextA(struct TagItem *tags);
  63. struct MMUContext *CreateMMUContext(unsigned long tag1type, ... );
  64. BOOL DeleteMMUContext(struct MMUContext *);
  65. void *AllocLineVec(ULONG bytesize,ULONG reqments);
  66. ULONG PhysicalPageLocation(struct MMUContext *,ULONG logical);
  67. struct MMUContext *SuperContext(struct MMUContext *);
  68. struct MMUContext *DefaultContext(void);
  69. struct MMUContext *CurrentContext(struct Task *);
  70. struct MMUContext *EnterMMUContext(struct MMUContext *,struct Task *);
  71. struct MMUContext *LeaveMMUContext(struct Task *);
  72. struct ExceptionHook *AddContextHookA(struct TagItem *tags);
  73. struct ExceptionHook *AddContextHook(unsigned long tag1type, ... );
  74. void RemContextHook(struct ExceptionHook *);
  75. struct ExceptionHook *AddMessageHookA(struct TagItem *tags);
  76. struct ExceptionHook *AddMessageHook(unsigned long tag1type, ... );
  77. void RemMessageHook(struct ExceptionHook *);
  78. void ActivateException(struct ExceptionHook *);
  79. void DeactivateException(struct ExceptionHook *);
  80. void DMAInitiate(struct MMUContext *,void **,ULONG *,BOOL);
  81. void DMATerminate(struct MMUContext *);
  82. ULONG PhysicalLocation(struct MMUContext *,void **,ULONG *);
  83. ULONG WithoutMMU(unsigned long (*userFunction)() );
  84. void SetBusError(void (*handler)(), void (**oldhandler)() );
  85. ULONG GetMMUContextData(struct MMUContext *,ULONG tag_id );
  86. void SetMMUContextDataA(struct MMUContext *,struct TagItem * );
  87. void SetMMUContextData(struct MMUContext *, unsigned long tag1type , ... );
  88. struct MinList *NewMapping(void);
  89. BOOL CopyMapping(struct MinList *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  90. struct MinList *DupMapping(struct MinList *);
  91. BOOL CopyContextRegion(struct MMUContext *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  92. BOOL SetPropertiesMapping(struct MMUContext *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  93. int SetMappingPropertiesA(struct MinList *,ULONG flags,ULONG mask,ULONG lower,ULONG size,struct TagItem *);
  94. int SetMappingProperties(struct MinList *,ULONG flags,ULONG mask,ULONG lower,ULONG size,unsigned long tag1type, ... );
  95. ULONG GetMappingPropertiesA(struct MinList *,ULONG lower,struct TagItem *);
  96. ULONG GetMappingProperties(struct MinList *,ULONG lower,unsigned long tag1type,...);
  97. ULONG BuildIndirect(struct MMUContext *,ULONG adr,ULONG props);
  98. void SetIndirect(ULONG *dest,ULONG logical, ULONG desc);
  99. void GetIndirect(struct MMUContext *,struct AbstractDescriptor *,ULONG *addr);
  100. #endif
  101.