home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gdb-4.9 / gdb / 29k-share / udi / udiproc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-12  |  8.5 KB  |  321 lines

  1. /******************************************************************************
  2.  * Copyright 1991 Advanced Micro Devices, Inc.
  3.  *
  4.  * This software is the property of Advanced Micro Devices, Inc  (AMD)  which
  5.  * specifically  grants the user the right to modify, use and distribute this
  6.  * software provided this notice is not removed or altered.  All other rights
  7.  * are reserved by AMD.
  8.  *
  9.  * AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
  10.  * SOFTWARE.  IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
  11.  * DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
  12.  * USE OF THIS SOFTWARE.
  13.  *
  14.  * Comments about this software should be directed to udi@amd.com. If access
  15.  * to electronic mail isn't available, send mail to:
  16.  *
  17.  * Advanced Micro Devices, Inc.
  18.  * 29K Support Products
  19.  * Mail Stop 573
  20.  * 5900 E. Ben White Blvd.
  21.  * Austin, TX 78741
  22.  *
  23.  * For more detailed information about the values, types, and functions
  24.  * defined and declared here, see the corresponding UDI spec available
  25.  * from AMD at the address above.
  26.  *****************************************************************************
  27.  *       $Id: udiproc.h,v 1.1 1992/04/22 20:40:47 grossman Exp $
  28.  *     $Id: @(#)udiproc.h    2.11, AMD
  29.  */
  30.  
  31. /* local type decs. and macro defs. not in a .h  file ************* MACRO/TYPE
  32. */
  33. #include "udiphcfg.h"    /* Get host specific configuration */
  34. #include "udiptcfg.h"    /* Get target specific configuration */
  35.  
  36. /* Here are all of the CPU Families for which UDI is currently defined */
  37. #define Am29K        1    /* AMD's Am290xx and Am292xx parts */
  38.  
  39. typedef UDIInt        UDIError;
  40. typedef UDIInt        UDISessionId;
  41. typedef    UDIInt        UDIPId;
  42. typedef    UDIInt        UDIStepType;
  43. typedef    UDIInt        UDIBreakType;
  44. typedef    UDIUInt        UDIBreakId;
  45. typedef UDIUInt        UDIMode;
  46.  
  47. typedef UDIStruct
  48. {            
  49.     CPUSpace    Space;
  50.     CPUOffset    Offset;
  51. } UDIResource;
  52.  
  53. typedef    UDIStruct
  54. {
  55.     CPUOffset    Low;
  56.     CPUOffset    High;
  57. } UDIRange;
  58.  
  59. typedef UDIStruct
  60. {
  61.     CPUSpace    Space;
  62.     CPUOffset    Offset;
  63.     CPUSizeT    Size;
  64.     } UDIMemoryRange;
  65.  
  66. /* Values for UDIStepType parameters */
  67. #define UDIStepNatural        0x0000
  68. #define UDIStepOverTraps    0x0001
  69. #define UDIStepOverCalls    0x0002
  70. #define UDIStepInRange        0x0004
  71. #define UDIStepNatural        0x0000
  72.  
  73. /* Values for UDIBreakType parameters */
  74. #define UDIBreakFlagExecute    0x0001
  75. #define UDIBreakFlagRead    0x0002
  76. #define UDIBreakFlagWrite    0x0004
  77. #define UDIBreakFlagFetch    0x0008
  78.  
  79. /* Special values for UDIWait MaxTime parameter */
  80. #define UDIWaitForever    (UDIInt32) -1    /* Infinite time delay */
  81.  
  82. /* Special values for PId */
  83. #define UDIProcessProcessor    -1    /* Raw Hardware, if possible */
  84.  
  85. /* Values for UDIWait StopReason */
  86. #define UDIGrossState        0xff
  87. #define UDITrapped        0    /* Fine state - which trap */
  88. #define UDINotExecuting        1
  89. #define UDIRunning        2
  90. #define UDIStopped        3
  91. #define UDIWarned        4
  92. #define UDIStepped        5
  93. #define UDIWaiting        6
  94. #define UDIHalted        7
  95. #define UDIStdoutReady        8    /* fine state - size */
  96. #define UDIStderrReady        9    /* fine state - size */
  97. #define UDIStdinNeeded        10    /* fine state - size */
  98. #define UDIStdinModeX          11    /* fine state - mode */
  99. #define UDIBreak        12    /* Fine state - Breakpoint Id */
  100. #define UDIExited        13    /* Fine state - exit code */
  101.  
  102. /* Enumerate the return values from the callback function
  103.    for UDIEnumerateTIPs.
  104. */
  105. #define UDITerminateEnumeration    0
  106. #define UDIContinueEnumeration    1
  107.  
  108. /* Enumerate values for Terminate parameter to UDIDisconnect */
  109. #define UDITerminateSession    1
  110. #define UDIContinueSession    0
  111.  
  112. /* Error codes */
  113. #define UDINoError            0    /* No error occured */
  114. #define UDIErrorNoSuchConfiguration    1
  115. #define UDIErrorCantHappen        2
  116. #define UDIErrorCantConnect        3
  117. #define UDIErrorNoSuchConnection    4
  118. #define UDIErrorNoConnection        5
  119. #define UDIErrorCantOpenConfigFile    6
  120. #define UDIErrorCantStartTIP        7
  121. #define UDIErrorConnectionUnavailable    8
  122. #define UDIErrorTryAnotherTIP        9
  123. #define UDIErrorExecutableNotTIP    10
  124. #define UDIErrorInvalidTIPOption    11
  125. #define UDIErrorCantDisconnect        12
  126. #define UDIErrorUnknownError        13
  127. #define UDIErrorCantCreateProcess    14
  128. #define UDIErrorNoSuchProcess        15
  129. #define UDIErrorUnknownResourceSpace    16
  130. #define UDIErrorInvalidResource        17
  131. #define UDIErrorUnsupportedStepType    18
  132. #define UDIErrorCantSetBreakpoint    19
  133. #define UDIErrorTooManyBreakpoints    20
  134. #define UDIErrorInvalidBreakId        21
  135. #define UDIErrorNoMoreBreakIds        22
  136. #define UDIErrorUnsupportedService    23
  137. #define UDIErrorTryAgain        24
  138. #define UDIErrorIPCLimitation        25
  139. #define UDIErrorIncomplete        26
  140. #define UDIErrorAborted            27
  141. #define UDIErrorTransDone        28
  142. #define UDIErrorCantAccept        29
  143. #define UDIErrorTransInputNeeded    30
  144. #define UDIErrorTransModeX        31
  145. #define UDIErrorInvalidSize        32
  146. #define UDIErrorBadConfigFileEntry    33
  147. #define UDIErrorIPCInternal        34
  148. /* TBD */
  149.  
  150. /****************************************************************** PROCEDURES
  151. */
  152.  
  153. UDIError UDIConnect UDIParams((
  154.   char        *Configuration,        /* In */
  155.   UDISessionId    *Session        /* Out */
  156.   ));
  157.  
  158. UDIError UDIDisconnect UDIParams((
  159.   UDISessionId    Session,        /* In */
  160.   UDIBool    Terminate        /* In */
  161.   ));
  162.  
  163. UDIError UDISetCurrentConnection UDIParams((
  164.   UDISessionId    Session            /* In */
  165.   ));
  166.  
  167. UDIError UDICapabilities UDIParams((
  168.   UDIUInt32    *TIPId,            /* Out */
  169.   UDIUInt32    *TargetId,        /* Out */
  170.   UDIUInt32    DFEId,            /* In */
  171.   UDIUInt32    DFE,            /* In */
  172.   UDIUInt32    *TIP,            /* Out */
  173.   UDIUInt32    *DFEIPCId,        /* Out */
  174.   UDIUInt32    *TIPIPCId,        /* Out */
  175.   char        *TIPString        /* Out */
  176.   ));
  177.  
  178. UDIError UDIEnumerateTIPs UDIParams((
  179.   UDIInt    (*UDIETCallback)    /* In */
  180.     UDIParams(( char *Configuration ))    /* In to callback() */
  181.   ));
  182.  
  183. UDIError UDIGetErrorMsg UDIParams((
  184.   UDIError    ErrorCode,        /* In */
  185.   UDISizeT    MsgSize,        /* In */
  186.   char        *Msg,            /* Out */
  187.   UDISizeT    *CountDone        /* Out */
  188.   ));
  189.  
  190. UDIError UDIGetTargetConfig UDIParams((
  191.   UDIMemoryRange KnownMemory[],        /* Out */
  192.   UDIInt    *NumberOfRanges,    /* In/Out */
  193.   UDIUInt32    ChipVersions[],        /* Out */
  194.   UDIInt    *NumberOfChips        /* In/Out */
  195.   ));
  196.  
  197. UDIError UDICreateProcess UDIParams((
  198.   UDIPId    *PId            /* Out */
  199.   ));
  200.  
  201. UDIError UDISetCurrentProcess UDIParams((
  202.   UDIPId    PId            /* In */
  203.   ));
  204.  
  205. UDIError UDIDestroyProcess UDIParams((
  206.   UDIPId    PId            /* In */
  207.   ));
  208.  
  209. UDIError UDIInitializeProcess UDIParams((
  210.   UDIMemoryRange ProcessMemory[],    /* In */
  211.   UDIInt    NumberOfRanges,        /* In */
  212.   UDIResource    EntryPoint,        /* In */
  213.   CPUSizeT    StackSizes[],        /* In */
  214.   UDIInt    NumberOfStacks,        /* In */
  215.   char        *ArgString        /* In */
  216.   ));
  217.  
  218. UDIError UDIRead UDIParams((
  219.   UDIResource    From,            /* In */
  220.   UDIHostMemPtr    To,            /* Out */
  221.   UDICount    Count,            /* In */
  222.   UDISizeT    Size,            /* In */
  223.   UDICount    *CountDone,        /* Out */
  224.   UDIBool    HostEndian        /* In */
  225.   ));
  226.  
  227. UDIError UDIWrite UDIParams((
  228.   UDIHostMemPtr    From,            /* In */
  229.   UDIResource    To,            /* In */
  230.   UDICount    Count,            /* In */
  231.   UDISizeT    Size,            /* In */
  232.   UDICount    *CountDone,        /* Out */
  233.   UDIBool    HostEndian        /* In */
  234.   ));
  235.  
  236. UDIError UDICopy UDIParams((
  237.   UDIResource    From,            /* In */
  238.   UDIResource    To,            /* In */
  239.   UDICount    Count,            /* In */
  240.   UDISizeT    Size,            /* In */
  241.   UDICount    *CountDone,        /* Out */
  242.   UDIBool    Direction        /* In */
  243.   ));
  244.  
  245. UDIError UDIExecute UDIParams((
  246.   void
  247.   ));
  248.  
  249. UDIError UDIStep UDIParams((
  250.   UDIUInt32    Steps,            /* In */
  251.   UDIStepType   StepType,        /* In */
  252.   UDIRange      Range            /* In */
  253.   ));
  254.  
  255. UDIVoid UDIStop UDIParams((
  256.   void
  257.   ));
  258.  
  259. UDIError UDIWait UDIParams((
  260.   UDIInt32    MaxTime,        /* In */
  261.   UDIPId    *PId,            /* Out */
  262.   UDIUInt32    *StopReason        /* Out */
  263.   ));
  264.  
  265. UDIError UDISetBreakpoint UDIParams((
  266.   UDIResource    Addr,            /* In */
  267.   UDIInt32    PassCount,        /* In */
  268.   UDIBreakType    Type,            /* In */
  269.   UDIBreakId    *BreakId        /* Out */
  270.   ));
  271.  
  272. UDIError UDIQueryBreakpoint UDIParams((
  273.   UDIBreakId    BreakId,        /* In */
  274.   UDIResource    *Addr,            /* Out */
  275.   UDIInt32    *PassCount,        /* Out */
  276.   UDIBreakType    *Type,            /* Out */
  277.   UDIInt32    *CurrentCount        /* Out */
  278.   ));
  279.  
  280. UDIError UDIClearBreakpoint UDIParams((
  281.   UDIBreakId    BreakId            /* In */
  282.   ));
  283.  
  284. UDIError UDIGetStdout UDIParams((
  285.   UDIHostMemPtr    Buf,            /* Out */
  286.   UDISizeT    BufSize,        /* In */
  287.   UDISizeT    *CountDone        /* Out */
  288.   ));
  289.  
  290. UDIError UDIGetStderr UDIParams((
  291.   UDIHostMemPtr    Buf,            /* Out */
  292.   UDISizeT    BufSize,        /* In */
  293.   UDISizeT    *CountDone        /* Out */
  294.   ));
  295.  
  296. UDIError UDIPutStdin UDIParams((
  297.   UDIHostMemPtr    Buf,            /* In */
  298.   UDISizeT    Count,            /* In */
  299.   UDISizeT    *CountDone        /* Out */
  300.   ));
  301.  
  302. UDIError UDIStdinMode UDIParams((
  303.   UDIMode    *Mode            /* Out */
  304.   ));
  305.  
  306. UDIError UDIPutTrans UDIParams((
  307.   UDIHostMemPtr    Buf,            /* In */
  308.   UDISizeT    Count,            /* In */
  309.   UDISizeT    *CountDone        /* Out */
  310.   ));
  311.  
  312. UDIError UDIGetTrans UDIParams((
  313.   UDIHostMemPtr    Buf,            /* Out */
  314.   UDISizeT    BufSize,        /* In */
  315.   UDISizeT    *CountDone        /* Out */
  316.   ));
  317.  
  318. UDIError UDITransMode UDIParams((
  319.   UDIMode    *Mode            /* Out */
  320.   ));
  321.