home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / exec / execbase.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  7KB  |  215 lines

  1. #ifndef EXEC_EXECBASE_H
  2. #define EXEC_EXECBASE_H
  3. /*
  4. **    $VER: execbase.h 39.6 (18.1.93)
  5. **    Includes Release 40.15
  6. **
  7. **    Definition of the exec.library base structure.
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_LISTS_H
  14. #include "exec/lists.h"
  15. #endif /* EXEC_LISTS_H */
  16.  
  17. #ifndef EXEC_INTERRUPTS_H
  18. #include "exec/interrupts.h"
  19. #endif /* EXEC_INTERRUPTS_H */
  20.  
  21. #ifndef EXEC_LIBRARIES_H
  22. #include "exec/libraries.h"
  23. #endif /* EXEC_LIBRARIES_H */
  24.  
  25. #ifndef EXEC_TASKS_H
  26. #include "exec/tasks.h"
  27. #endif /* EXEC_TASKS_H */
  28.  
  29.  
  30. /* Definition of the Exec library base structure (pointed to by location 4).
  31. ** Most fields are not to be viewed or modified by user programs.  Use
  32. ** extreme caution.
  33. */
  34. struct ExecBase {
  35.     struct Library LibNode; /* Standard library node */
  36.  
  37. /******** Static System Variables ********/
  38.  
  39.     UWORD    SoftVer;    /* kickstart release number (obs.) */
  40.     WORD    LowMemChkSum;    /* checksum of 68000 trap vectors */
  41.     ULONG    ChkBase;    /* system base pointer complement */
  42.     APTR    ColdCapture;    /* coldstart soft capture vector */
  43.     APTR    CoolCapture;    /* coolstart soft capture vector */
  44.     APTR    WarmCapture;    /* warmstart soft capture vector */
  45.     APTR    SysStkUpper;    /* system stack base   (upper bound) */
  46.     APTR    SysStkLower;    /* top of system stack (lower bound) */
  47.     ULONG    MaxLocMem;    /* top of chip memory */
  48.     APTR    DebugEntry;    /* global debugger entry point */
  49.     APTR    DebugData;    /* global debugger data segment */
  50.     APTR    AlertData;    /* alert data segment */
  51.     APTR    MaxExtMem;    /* top of extended mem, or null if none */
  52.  
  53.     UWORD    ChkSum;    /* for all of the above (minus 2) */
  54.  
  55. /****** Interrupt Related ***************************************/
  56.  
  57.     struct    IntVector IntVects[16];
  58.  
  59. /****** Dynamic System Variables *************************************/
  60.  
  61.     struct    Task *ThisTask; /* pointer to current task (readable) */
  62.  
  63.     ULONG    IdleCount;    /* idle counter */
  64.     ULONG    DispCount;    /* dispatch counter */
  65.     UWORD    Quantum;    /* time slice quantum */
  66.     UWORD    Elapsed;    /* current quantum ticks */
  67.     UWORD    SysFlags;    /* misc internal system flags */
  68.     BYTE    IDNestCnt;    /* interrupt disable nesting count */
  69.     BYTE    TDNestCnt;    /* task disable nesting count */
  70.  
  71.     UWORD    AttnFlags;    /* special attention flags (readable) */
  72.  
  73.     UWORD    AttnResched;    /* rescheduling attention */
  74.     APTR    ResModules;    /* resident module array pointer */
  75.     APTR    TaskTrapCode;
  76.     APTR    TaskExceptCode;
  77.     APTR    TaskExitCode;
  78.     ULONG    TaskSigAlloc;
  79.     UWORD    TaskTrapAlloc;
  80.  
  81.  
  82. /****** System Lists (private!) ********************************/
  83.  
  84.     struct    List MemList;
  85.     struct    List ResourceList;
  86.     struct    List DeviceList;
  87.     struct    List IntrList;
  88.     struct    List LibList;
  89.     struct    List PortList;
  90.     struct    List TaskReady;
  91.     struct    List TaskWait;
  92.  
  93.     struct    SoftIntList SoftInts[5];
  94.  
  95. /****** Other Globals *******************************************/
  96.  
  97.     LONG    LastAlert[4];
  98.  
  99.     /* these next two variables are provided to allow
  100.     ** system developers to have a rough idea of the
  101.     ** period of two externally controlled signals --
  102.     ** the time between vertical blank interrupts and the
  103.     ** external line rate (which is counted by CIA A's
  104.     ** "time of day" clock).  In general these values
  105.     ** will be 50 or 60, and may or may not track each
  106.     ** other.  These values replace the obsolete AFB_PAL
  107.     ** and AFB_50HZ flags.
  108.     */
  109.     UBYTE    VBlankFrequency;    /* (readable) */
  110.     UBYTE    PowerSupplyFrequency;    /* (readable) */
  111.  
  112.     struct    List SemaphoreList;
  113.  
  114.     /* these next two are to be able to kickstart into user ram.
  115.     ** KickMemPtr holds a singly linked list of MemLists which
  116.     ** will be removed from the memory list via AllocAbs.  If
  117.     ** all the AllocAbs's succeeded, then the KickTagPtr will
  118.     ** be added to the rom tag list.
  119.     */
  120.     APTR    KickMemPtr;    /* ptr to queue of mem lists */
  121.     APTR    KickTagPtr;    /* ptr to rom tag queue */
  122.     APTR    KickCheckSum;    /* checksum for mem and tags */
  123.  
  124. /****** V36 Exec additions start here **************************************/
  125.  
  126.     UWORD    ex_Pad0;        /* Private internal use */
  127.     ULONG    ex_LaunchPoint;        /* Private to Launch/Switch */
  128.     APTR    ex_RamLibPrivate;
  129.     /* The next ULONG contains the system "E" clock frequency,
  130.     ** expressed in Hertz.    The E clock is used as a timebase for
  131.     ** the Amiga's 8520 I/O chips. (E is connected to "02").
  132.     ** Typical values are 715909 for NTSC, or 709379 for PAL.
  133.     */
  134.     ULONG    ex_EClockFrequency;    /* (readable) */
  135.     ULONG    ex_CacheControl;    /* Private to CacheControl calls */
  136.     ULONG    ex_TaskID;        /* Next available task ID */
  137.  
  138.     ULONG    ex_Reserved1[5];
  139.  
  140.     APTR    ex_MMULock;        /* private */
  141.  
  142.     ULONG    ex_Reserved2[3];
  143.  
  144. /****** V39 Exec additions start here **************************************/
  145.  
  146.     /* The following list and data element are used
  147.      * for V39 exec's low memory handler...
  148.      */
  149.     struct    MinList    ex_MemHandlers;    /* The handler list */
  150.     APTR    ex_MemHandler;        /* Private! handler pointer */
  151. };
  152.  
  153.  
  154. /****** Bit defines for AttnFlags (see above) ******************************/
  155.  
  156. /*  Processors and Co-processors: */
  157. #define AFB_68010    0    /* also set for 68020 */
  158. #define AFB_68020    1    /* also set for 68030 */
  159. #define AFB_68030    2    /* also set for 68040 */
  160. #define AFB_68040    3
  161. #define AFB_68881    4    /* also set for 68882 */
  162. #define AFB_68882    5
  163. #define    AFB_FPU40    6    /* Set if 68040 FPU */
  164. /*
  165.  * The AFB_FPU40 bit is set when a working 68040 FPU
  166.  * is in the system.  If this bit is set and both the
  167.  * AFB_68881 and AFB_68882 bits are not set, then the 68040
  168.  * math emulation code has not been loaded and only 68040
  169.  * FPU instructions are available.  This bit is valid *ONLY*
  170.  * if the AFB_68040 bit is set.
  171.  */
  172.  
  173. #define AFB_PRIVATE    15    /* Just what it says */
  174.  
  175. #define AFF_68010    (1L<<0)
  176. #define AFF_68020    (1L<<1)
  177. #define AFF_68030    (1L<<2)
  178. #define AFF_68040    (1L<<3)
  179. #define AFF_68881    (1L<<4)
  180. #define AFF_68882    (1L<<5)
  181. #define    AFF_FPU40    (1L<<6)
  182.  
  183. #define AFF_PRIVATE    (1L<<15)
  184.  
  185. /* #define AFB_RESERVED8   8 */
  186. /* #define AFB_RESERVED9   9 */
  187.  
  188.  
  189. /****** Selected flag definitions for Cache manipulation calls **********/
  190.  
  191. #define CACRF_EnableI        (1L<<0)  /* Enable instruction cache */
  192. #define CACRF_FreezeI        (1L<<1)  /* Freeze instruction cache */
  193. #define CACRF_ClearI        (1L<<3)  /* Clear instruction cache  */
  194. #define CACRF_IBE        (1L<<4)  /* Instruction burst enable */
  195. #define CACRF_EnableD        (1L<<8)  /* 68030 Enable data cache  */
  196. #define CACRF_FreezeD        (1L<<9)  /* 68030 Freeze data cache  */
  197. #define CACRF_ClearD        (1L<<11) /* 68030 Clear data cache     */
  198. #define CACRF_DBE        (1L<<12) /* 68030 Data burst enable */
  199. #define CACRF_WriteAllocate (1L<<13) /* 68030 Write-Allocate mode
  200.                     (must always be set!)     */
  201. #define    CACRF_EnableE        (1L<<30) /* Master enable for external caches */
  202.                      /* External caches should track the */
  203.                      /* state of the internal caches */
  204.                      /* such that they do not cache anything */
  205.                      /* that the internal cache turned off */
  206.                      /* for. */
  207. #define CACRF_CopyBack        (1L<<31) /* Master enable for copyback caches */
  208.  
  209. #define DMA_Continue        (1L<<1)  /* Continuation flag for CachePreDMA */
  210. #define DMA_NoModify        (1L<<2)  /* Set if DMA does not update memory */
  211. #define    DMA_ReadFromRAM     (1L<<3)  /* Set if DMA goes *FROM* RAM to device */
  212.  
  213.  
  214. #endif    /* EXEC_EXECBASE_H */
  215.