home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-16  |  5.9 KB  |  226 lines

  1. /* $Id: protos.h,v 3.7 95/12/16 18:37:10 Martin_Apel Exp $ */
  2.  
  3. /* bitmap.c */
  4. int InitMap (ULONG);
  5. void KillMap (void);
  6. ULONG AllocSlotNextTo (ULONG);
  7. void FreeSlot (ULONG);
  8. ULONG AllocMultipleSlots (ULONG*);
  9.  
  10. /* cache.c */
  11. int InitCache (void);
  12. void KillCache (void);
  13. BOOL ReadPage (ULONG , struct TrapStruct*);
  14. BOOL WritePage (ULONG , struct TrapStruct*);
  15. ULONG AllocPageOnDisk (void);
  16. void FreePageOnDisk (ULONG);
  17. ULONG SlotsUsed (void);
  18. void AllocNewCache (void);
  19. void NewCache (char *buffer, ULONG size);
  20.  
  21. /* config.c */
  22. int ReadConfigFile(char *name);
  23.  
  24. /* debug.c */
  25. #ifdef DEBUG
  26. BOOL OpenDebugWindow(void);
  27. void CloseDebugWindow(void);
  28. void PrintDebugMsg(char * , long );
  29. void PrintTrapStruct(struct TrapStruct * );
  30. void CheckMemList (void);
  31. #endif
  32.  
  33. /* fault.c */
  34. void AddFree (struct TrapStruct *ThisFault);
  35. void AddPageReq (struct TrapStruct *ThisFault);
  36. void CheckWaitingFaults(void);
  37. void HandlePageFault(void);
  38. void ReadReturned (struct TrapStruct *ThisFault);
  39. void WriteReturned (struct TrapStruct *ThisFault);
  40. BOOL AddFrame (ULONG priority);
  41. void RemAllFrames (void);
  42. void HandleFreeMsg (void);
  43.  
  44. /* ffs.c */
  45. BOOL IsPseudoPart (ULONG header_block, ULONG *first_block, ULONG *last_block);
  46. int CreatePseudoPart (ULONG header_block, ULONG *first_block, ULONG *last_block);
  47. int IsValidFFSPartition (void);
  48. int GetDiskType (char *name, ULONG *DiskType);
  49.  
  50. /* find_dev_params.c */
  51. BOOL FindDevParams(char * , struct DOSDevParams *);
  52. BOOL GetPartName  (char *, char *);
  53.  
  54. /* forbidden_tasks.c */
  55. void ExtCheckVirtMem(struct Task *AskingTask);
  56. BOOL CodePagingAllowed (char *filename);
  57. int EnterTask(char * , ULONG, ULONG, BOOL, BOOL);
  58. BOOL RemoveTask (char*);
  59. void NoMoreVM (void);
  60. int InitTaskTable (void);
  61. void KillTaskTable (void);
  62.  
  63. /* globals.c */
  64. void InitError (int);
  65. void RunTimeError (int);
  66. void FatalError (int);
  67. void ReportError (char *error_string, UWORD error_level);
  68. void *AllocAligned (ULONG size, ULONG flags, ULONG alignment, ULONG priority);
  69. void GetNthString (char *from, char *to, int n);
  70. void StrToHex (char *string, ULONG *val);
  71. void EmptyPageCollector (void);
  72.  
  73. /* mem_tracking.c */
  74. int InitTrackInfo (void);
  75. void KillTrackInfo (void);
  76. ULONG *CreateTrackInfo (ULONG *buffer, ULONG orig_size);
  77. void ChangeOwner (ULONG *buffer);
  78. void FreeTrackInfo (void *TrackBuffer);
  79. void VMUsageInfo (struct VMMsg *UsageMsg);
  80.  
  81. /* mmu_table.c */
  82. int MarkAddress (ULONG start, ULONG length, ULONG type, ULONG phys_addr,
  83.                  BOOL Small);
  84. int SetupMMUTable (void);
  85. BOOL KillPageTable (ULONG *pt, BOOL FreePages);
  86. BOOL KillPointerTable (ULONG *pt, BOOL FreePages);
  87. void KillMMUTable (void);
  88. void AllowZorroIICaching (BOOL Allowed);
  89. int AllocAddressRange (void);
  90. int SwitchFastROM (BOOL On);
  91. void MarkPage (ULONG addr, ULONG CacheMode);
  92.  
  93. /* pagehandler.c */
  94. void PageHandler (void);
  95.  
  96. /* pageio.c */
  97. int OpenPageFile(void);
  98. void ClosePageFile(void);
  99. void WriteSinglePage(ULONG , struct TrapStruct * );
  100. void ReadSinglePage(ULONG , struct TrapStruct * );
  101. void WriteMultiplePages (ULONG, void*, ULONG);
  102. void HandleReturn(void);
  103.  
  104. /* prepager.c */
  105. void PrePager(void);
  106.  
  107. /* reset_handler.c */
  108. void *InstallResetHandler (void (*func) (void), LONG priority);
  109. void RemoveResetHandler (void* ResetHandlerParams);
  110. void ResetHandlerDone (void *ResetHandlerParams);
  111.  
  112. /* stat.c */
  113. void Statistics (void);
  114.  
  115. /* timer.c */
  116. void *InitTimer (int, UWORD *);
  117. void CloseTimer (void *);
  118. BOOL AddTimedFunction (void *, ULONG secs, ULONG micros, void (*function) ());
  119. void HandleTimerReturn (void *);
  120.  
  121. /* VM_Manager.c */
  122. void VM_Manager (void);
  123.  
  124. /* mem_trace.asm */
  125. void AllocVM (void);
  126. void AllocMemPatch (void);
  127. void FreeMemPatch (void);
  128. void AvailMemPatch (void);
  129. void *DoOrigAllocMem (ULONG, ULONG);
  130. ULONG DoOrigAvailMem (ULONG);
  131.  
  132. /* parthandler.asm */
  133. void PartHandler (void);
  134.  
  135. /* sv_regs40.asm */
  136. long ReadVBR (void);
  137. void CPushP40 (ULONG address);
  138. void CPushL40 (ULONG address);
  139. void PFlushP40 (ULONG address);
  140. void PFlushA40 (void);
  141. void ReadMMUState40 (struct MMUState40*);
  142. void SetMMUState40 (struct MMUState40*);
  143. void SaveMMUState40 (void);
  144. void RestoreMMUState40 (void);
  145. ULONG GenDescr40 (ULONG LogicalAddr);
  146. ULONG GetPageSize40 (void);
  147. void EmptyFunc (void);
  148.  
  149. /* sv_regs30.asm */
  150. long ReadVBR (void);
  151. void PFlushA30( void );
  152. void PFlushP30( ULONG address );
  153. void ReadMMUState30 (struct MMUState30*);
  154. void SetMMUState30 (struct MMUState30*);
  155. void SaveMMUState30 (void);
  156. void RestoreMMUState30 (void);
  157. ULONG GenDescr30 (ULONG LogicalAddr);
  158. void ColdRebootPatch (void);
  159. ULONG GetPageSize30 (void);
  160.  
  161. /* sv_regs851.asm */
  162. BOOL MMU68851 (void);
  163. void ReadMMUState851 (struct MMUState30*);
  164. void SetMMUState851 (struct MMUState30*);
  165. void SaveMMUState851 (void);
  166. void RestoreMMUState851 (void);
  167. ULONG GenDescr851 (ULONG LogicalAddr);
  168.  
  169. /* sv_regs60.asm */
  170. BOOL Is68060 (void);
  171. void CPushP60 (ULONG address);
  172. void CPushL60 (ULONG address);
  173.  
  174. #define PFlushP60 PFlushP40
  175. #define PFlushA60 PFlushA40
  176. #define GetPageSize60 GetPageSize40
  177. #define GenDescr60 GenDescr40
  178.  
  179. /* switch_patch.asm */
  180. void SwitchPatch (void);
  181. void AddTaskPatch (void);
  182. void WaitPatch (void);
  183. #ifdef DEBUG
  184. void RemTaskPatch (void);
  185. void OpenPatch (void);
  186. void StackSwapPatch (void);
  187. #endif
  188.  
  189. /* traphandler60.asm */
  190. void TrapHandler60(void);
  191. void DynMMUTrap60 (void);
  192.  
  193. /* traphandler40.asm */
  194. void TrapHandler40(void);
  195. void DynMMUTrap40 (void);
  196.  
  197. /* traphandler30.asm */
  198. void TrapHandler30(void);
  199. void DynMMUTrap30 (void);
  200.  
  201. /* loadseg_patch.asm */
  202. void LoadSegPatch (void);
  203. void NewLoadSegPatch (void);
  204. #ifdef DEBUG
  205. void CrashHandler (void);
  206. void FindHunk (ULONG address);
  207. void AlertPatch (void);
  208. #endif
  209.  
  210. /* dma_patch.asm */
  211. void CachePreDMAPatch (void);
  212. void CachePostDMAPatch (void);
  213.  
  214. /* wb_patch.asm */
  215. void SetWindowTitlesPatch (void);
  216.  
  217. /* semaphores.asm */
  218. void VMMObtainSemaphore (struct SignalSemaphore*);
  219. void VMMReleaseSemaphore (struct SignalSemaphore*);
  220. void VMMInitSemaphore (struct SignalSemaphore*);
  221.  
  222. /* external definitions used are put here, so we don't have to include
  223.  * stdio.h.
  224.  */
  225. int sprintf(char *, char *, ...);
  226.