TABLE OF CONTENTS ppc.library/PPCAddPortList ppc.library/PPCAllocMem ppc.library/PPCAllocVec ppc.library/PPCAllocVecPooled ppc.library/PPCCacheClearE ppc.library/PPCCacheInvalidE ppc.library/PPCCacheTrashE ppc.library/PPCCreateMessage ppc.library/PPCCreatePool ppc.library/PPCCreatePort ppc.library/PPCCreatePortList ppc.library/PPCCreateTask ppc.library/PPCDeleteMessage ppc.library/PPCDeletePool ppc.library/PPCDeletePort ppc.library/PPCDeletePortList ppc.library/PPCDeleteTask ppc.library/PPCFindTask ppc.library/PPCFindTaskObject ppc.library/PPCFreeMem ppc.library/PPCFreeVec ppc.library/PPCFreeVecPooled ppc.library/PPCGetAttrs ppc.library/PPCGetMessage ppc.library/PPCGetMessageAttr ppc.library/PPCGetObjectAttrs ppc.library/PPCGetPortListAttr ppc.library/PPCGetTaskAttrs ppc.library/PPCLoadObject ppc.library/PPCLoadObjectTagList ppc.library/PPCObtainPort ppc.library/PPCReadByte ppc.library/PPCReadLong ppc.library/PPCReadWord ppc.library/PPCReleasePort ppc.library/PPCRemPortList ppc.library/PPCReplyMessage ppc.library/PPCRunKernelObject ppc.library/PPCRunKernelObjectFPU ppc.library/PPCRunObject ppc.library/PPCSendMessage ppc.library/PPCSetAttrs ppc.library/PPCSetPortListAttr ppc.library/PPCSetTaskAttrs ppc.library/PPCSignalTask ppc.library/PPCStartTask ppc.library/PPCStopTask ppc.library/PPCUnLoadObject ppc.library/PPCWaitPort ppc.library/PPCWaitPortList ppc.library/PPCWriteByte ppc.library/PPCWriteLong ppc.library/PPCWriteLongFlush ppc.library/PPCWriteWord ppc.library/PPCAddPortList ppc.library/PPCAddPortList NAME PPCAddPortList -- Add a port to the PPCPortList object SYNOPSIS Success = PPCAddPortList(PPCPortList,PPCPort) D0 A0 A1 BOOL PPCAddPortList(void*,void*); FUNCTION This function adds a new Port to your PPCPortList object. INPUT PPCPortList - a pointer to the PPCPortList object PPCPort - a pointer to the PPC Message port RESULT Success - A Boolean tells you if the operation was successful. SEE ALSO PPCCreatePortList(), ppclib/message.h ppc.library/PPCAllocMem ppc.library/PPCAllocMem NAME PPCAllocMem -- Alloc a PPC cache aligned memory block SYNOPSIS Memory = PPCAllocMem(size,attributes ) D0 D0 D1 void *PPCAllocMem(ULONG,ULONG); FUNCTION Allocates a memoryblock which is aligned to the PPC cache lines. You should only use the PPC with memblocks allocated through this function. INPUTS Size - memory block size Attributes - memory attributes o exec/memory.h attributes o MEMF_NOCACHESYNCPPC for a synchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHESYNCM68K for a synchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHEPPC for a nonsynchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_NOCACHEM68K for a nosynchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_WRITETHROUGHPPC for writethrough mapped memory area on the PPC side. The 68k side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. o MEMF_WRITETHROUGH68K for writethrough mapped memory area on the 68k side. The PPC side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. If you use the M68k and PPC attribute at the same time the memory is mapped noncacheable on both sides. This also means that your allocation is 4096 Bytes aligned that may waste memory if you need less ram. RESULT Memory - ptr to the memory block NOTES The reason for this routine is that there's a serious cache copyback problem when ppc and 68060 cache lines cross borders. Then the contents of the memory isn't guranteed. The cache issue is explained in detail in Docs/PowerUP.guide SEE ALSO AllocMem(), FreeMem(), exec/memory.h ppc.library/PPCAllocVec ppc.library/PPCAllocVec NAME PPCAllocVec -- allocate memory and keep track of the size SYNOPSIS memoryBlock = PPCAllocVec(byteSize, attributes) D0 D0 D1 void *PPCAllocVec(ULONG, ULONG); INPUTS Size - memory block size Attributes - memory attributes o exec/memory.h attributes o MEMF_NOCACHESYNCPPC for a synchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHESYNCM68K for a synchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHEPPC for a nonsynchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_NOCACHEM68K for a nosynchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_WRITETHROUGHPPC for writethrough mapped memory area on the PPC side. The 68k side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. o MEMF_WRITETHROUGH68K for writethrough mapped memory area on the 68k side. The PPC side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. If you use the M68k and PPC attribute at the same time the memory is mapped noncacheable on both sides. This also means that your allocation is 4096 Bytes aligned that may waste memory if you need less ram. RESULT Memory - ptr to the memory block FUNCTION This function works identically to AllocMem(), but tracks the size of the allocation. See the PPCAllocMem() documentation for details. WARNING The result of any memory allocation MUST be checked, and a viable error handling path taken. ANY allocation may fail if memory has been filled. The cache issue is explained in detail in Docs/PowerUP.guide SEE ALSO PPCFreeVec(), PPCAllocMem() ppc.library/PPCAllocVecPooled ppc.library/PPCAllocVecPooled NAME PPCAllocVecPooled -- allocate Pool memory and keep track of the size SYNOPSIS memoryBlock = PPCAllocVecPooled(Pool,byteSize) D0 A0 D0 void *PPCAllocVec(void*, ULONG); FUNCTION This function works identically to PPCAllocPooled(), but tracks the size of the allocation. See the PPCAllocPooled() documentation for details. SEE ALSO PPCFreeVecPooled() ppc.library/PPCCacheClearE ppc.library/PPCCacheClearE NAME PPCCacheClearE - Cache clearing with extended control SYNOPSIS PPCCacheClearE(address,length,caches) a0 d0 d1 void PPCCacheClearE(APTR,ULONG,ULONG); FUNCTION This function does the same the CacheClearE() function does with the difference that it actually flushes only the memory area you specified instead of flushing all by default. As it seems the system has problems with an optimized CacheClearE() function it is now integrated in the ppc.library INPUTS address - Address to start the operation. This may be rounded due to hardware granularity. length - Length of area to be cleared, or $FFFFFFFF to indicate all addresses should be cleared. caches - Bit flags to indicate what caches to affect. The current supported flags are: CACRF_ClearI ;Clear instruction cache CACRF_ClearD ;Clear data cache All other bits are reserved for future definition. ppc.library/PPCCacheInvalidE ppc.library/PPCCacheInvalidE NAME PPCCacheInvalidE - Cache Invaliding with extended control SYNOPSIS PPCCacheInvalidE(address,length,caches) a0 d0 d1 void PPCCacheInvalidE(APTR,ULONG,ULONG); FUNCTION This function does invalids the contents of the cache for the area you specified. This means that dirty lines of the cache aren`t written back which may cause wrong data if not used correctly. ATTENTION If you`re address area you specify isn`t line aligned you're system will run havoc quite fast. Because of the wrong data in the cache which may be used by other tasks which crosses the invalid page borders. INPUTS address - Address to start the operation. This may be rounded due to hardware granularity. MUST BE LINESIZE(16 Bytes) ALIGNED !!!!!!!!!!!!!!! length - Length of area to be Invalided, or $FFFFFFFF to indicate all addresses should be pushed.(NOT INVALID possible here) MUST BE LINESIZE(16 Bytes) ALIGNED !!!!!!!!!!!!!!! caches - Bit flags to indicate what caches to affect. The current supported flags are: CACRF_ClearI ;Invalid instruction cache CACRF_ClearD ;Invalid data cache All other bits are reserved for future definition. ppc.library/PPCCacheTrashE ppc.library/PPCCacheTrashE NAME PPCCacheTrashE - Cache Trashing with extended control SYNOPSIS PPCCacheTrashE(address,length,caches) a0 d0 d1 void PPCCacheTrashE(APTR,ULONG,ULONG); FUNCTION This function does clean the contents of the cache for the area you specified. This means you have no controll if dirty contents is written back or ignored. The fastest method to clean the cache for a ram area where you don`t care for the contents. INPUTS address - Address to start the operation. This may be rounded due to hardware granularity. length - Length of area to be Invalided. caches - Bit flags to indicate what caches to affect. The current supported flags are: CACRF_ClearI ;Trash instruction cache CACRF_ClearD ;Trash data cache All other bits are reserved for future definition. NOTE This was the old CacheInvalidE() but some people demanded a real CacheInvalidE so they got it. ppc.library/PPCCreateMessage ppc.library/PPCCreateMessage NAME PPCCreateMessage -- Create a Message for a PPCMsgPort SYNOPSIS Message = PPCCreateMessage(PPCPort,Length) D0 A0 D0 void* PPCCreateMessage(void*,ULONG); FUNCTION Creates a Message for PPCPort communication. The Length parameter may be useful in the future to optimize messages in certain addressspace mappings for IPC in a MP system. It isn`t necessary to specify a Length which is > max(DataSize) but it may result in a performance win in the future. A message and msgdata can`t be reused or touched after a SendMessage until the message was replied. INPUTS PPCPort - Ptr to an object generated by PPCCreatePort Length - Max Length for Messages RESULT PPCMessage - PPCMessage Object ptr. SEE ALSO PPCDeleteMessage(), ppclib/message.h ppc.library/PPCCreatePool ppc.library/PPCCreatePool NAME PPCCreatePool -- Generate a private memory pool header (V39) SYNOPSIS newPool=PPCCreatePool(memFlags,puddleSize,threshSize) d0 d0 d1 d2 void *PPCCreatePool(ULONG,ULONG,ULONG); FUNCTION Allocate and prepare a new memory pool header. Each pool is a separate tracking system for memory of a specific type. Any number of pools may exist in the system. Pools automatically expand and shrink based on demand. Fixed sized "puddles" are allocated by the pool manager when more total memory is needed. Many small allocations can fit in a single puddle. Allocations larger than the threshSize are allocation in their own puddles. At any time individual allocations may be freed. Or, the entire pool may be removed in a single step. INPUTS memFlags - a memory flags specifier, as taken by AllocMem. o exec/memory.h attributes o MEMF_NOCACHESYNCPPC for a synchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHESYNCM68K for a synchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Synchronized means that accesses to that memory are in order for the CPU which is typically used for IO memory. o MEMF_NOCACHEPPC for a nonsynchronized non cacheable mapped memory area on the PPC side. The Amiga side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_NOCACHEM68K for a nosynchronized non cacheable mapped memory area on the M68k side. The PPC side is still copyback then. Not Synchronized means that accesses to that memory may not be in order for the CPU which is typically used for framebuffer memory. o MEMF_WRITETHROUGHPPC for writethrough mapped memory area on the PPC side. The 68k side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. o MEMF_WRITETHROUGH68K for writethrough mapped memory area on the 68k side. The PPC side is still copyback then. Writethrough means that the cache updates every write to the cache at once to the memory. If you use the M68k and PPC attribute at the same time the memory is mapped noncacheable on both sides. This also means that your allocation is 4096 Bytes aligned that may waste memory if you need less ram. puddleSize - the size of Puddles... threshSize - the largest allocation that goes into normal puddles This *MUST* be less than or equal to puddleSize (CreatePool() will fail if it is not) RESULT The address of a new pool header, or NULL for error. SEE ALSO PPCDeletePool(), PPCAllocPooled(), PPCFreePooled(), exec/memory.h ppc.library/PPCCreatePort ppc.library/PPCCreatePort NAME PPCCreatePort -- Create a PPC Message Port SYNOPSIS Port = PPCCreatePort(Tags) D0 A0 void* PPCCreatePort(struct TagItem*); FUNCTION Creates a local PPC MsgPort to receive messages from the PPC. With a specified name you can mark it public to the ppc.library. This shouldn`t be missunderstood as a public system port because PPCPorts and Amigaports are different entities. INPUTS Tags - Tags to specify a public port for example. o PPCPORTTAG_NAME,"Name" defines the name of a public PPC port. o PPCPORTTAG_ERROR,(ULONG*) ErrorPtr defines the ptr for a more precise return error result RESULT Port - the PPCPort object or NULL SEE ALSO PPCDeletePort(), ppclib/message.h ppc.library/PPCCreatePortList ppc.library/PPCCreatePortList NAME PPCCreatePortList -- Create a List of Ports to wait for SYNOPSIS PPCPortList = PPCCreatePortList(PPCPortArray,ExtSignals) D0 A0 D0 void* PPCCreatePortList(void**,ULONG); FUNCTION This function creates a multi PPCPort object you can use to wait for several ports at once. If necessary, the Wait function will be called to wait for the port signal. If a message is already present at the port, this function will return immediately. The return value is always a pointer to the first PPC Message queued (but it is not removed from the queue. INPUT PPCPortArray - a pointer to a PPC Message port array..NULL terminated ExtSignals - mask of extended signals you wanna wait for additionally to the PPCPorts. RESULT PPCMessage - a pointer to the first available PPC Message or NULL. SEE ALSO PPCGetMessage(), ppclib/message.h ppc.library/PPCCreateTask ppc.library/PPCCreateTask NAME PPCCreateTask -- Create PPC Task SYNOPSIS TaskObject = PPCCreateTask( ElfObject, Tags ) D0 A0 A1 void *PPCCreateTask(void*); FUNCTION Creates a PPCTask on the PPC Kernel with the given ElfObject. The ElfObject contains all kinds of informations the loaded .elf object provided. This function first creates a Msg M68k Process which is used for all kinds of IO handling the PPCTask needs. Basicly the PPC sends small internal msgs which tell the 68k Task to allocate ram, open files or call certain OS functions for example. It`s obvious that all OS functions you call work on the level of this message process which means that certain operations which depend on this process in an asynchron manner make no sense. Or Task manupulations like RemTask(NULL) or simular things also make no sense from the PPC side. Well..if you think a little bit about it you should understand what you can do and what not. ADDON (V45) Now the Tags are also passed to the M68k Msg CreateProcess which is created inside this function. This way you have the complete controll over the Filehandles when the PPC M68k process exits. This makes the PPCTASKTAG_INPUTHANDLE, PPCTASKTAG_OUTPUTHANDLE and PPCTASKTAG_INPUTHANDLE obsolete. But if you still use these tags you overrule following NP_ CreateNewProc() tags. INPUTS ElfObject - ElfObject created by PPCLoadObject Tags - Tags to specify a the PPCTasks attributes o PPCTASKTAG_NAME,"TaskName" specifies the PPCTask`s name. The M68k parallel Process is called "PPC:MsgHandler "|"TaskName" o PPCTASKTAG_ARG1,Arg1 specifies the gpr3 register when the PPCTask is started which is equal to the first parameter in the System V ABI. So main(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8) can be used in C. o PPCTASKTAG_ARG2,Arg2 specifies the gpr4 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG3,Arg3 specifies the gpr5 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG4,Arg4 specifies the gpr6 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG5,Arg5 specifies the gpr7 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG6,Arg6 specifies the gpr8 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG7,Arg7 specifies the gpr9 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_ARG8,Arg8 specifies the gpr10 register when the PPCTask is started. See PPCTASKTAG_ARG1 explaination. o PPCTASKTAG_CACHEFLUSH,Boolean (Default TRUE) this flag defines if the Kernel would do the automatic CacheFlush or if you know it better. Well..this function is more a relict from the past...it`s only really useful for taking over the cacheflush for IO memory areas yourself. A good suggestion is to let this handle the Kernel. o PPCTASKTAG_ERROR,(ULONG*) ErrorPtr defines the ptr for a more precise return error result o PPCTASKTAG_STACKSIZE,(ULONG) (Default 8192) defines the PPCTask stacksize o PPCTASKTAG_PRIORITY,(int) (Default 0) defines the PPCTask priority o PPCTASKTAG_INPUTHANDLE,BPTR (Default "nil:") defines the M68k Message Task`s Input Handle. Read the Process`s pr_Input description in dos/dosextens.h (V45) Obsolete...use NP_ CreateNewProc() tags o PPCTASKTAG_OUTPUTHANDLE,BPTR (Default "nil:") defines the M68k Message Task`s Output Handle. Read the Process`s pr_Output description in dos/dosextens.h (V45) Obsolete...use NP_ CreateNewProc() tags o PPCTASKTAG_ERRORHANDLE,BPTR (Default "nil:") defines the M68k Message Task`s Error Handle. Read the Process`s pr_Error description in dos/dosextens.h (V45) Obsolete...use NP_ CreateNewProc() tags o PPCTASKTAG_STOPTASK,Boolean (Default FALSE) stops the Task before it runs on the PPC to let the debugger controll the initial execution. o PPCTASKTAG_EXCEPTIONHOOK,(struct Hook*) (Default NULL=SystemHook) sets a custom debugger ExceptionHook for the Task. The M68k Hook is called when a PPC TaskObject gets an exception which can be processor or software(Kernel Msg) related. That`s the way the ppc.library calls the Hook: BOOL CallHookPkt(hook,TaskObject,ExceptionMsg); The Hook Function is NOT allowed to call PPCLibBase functions to avoid deadlocks. After the Hook function returns the ExceptionMsg contents IS NOT valid anymore. So you should copy the ExceptionMsg contents to a private buffer and then signal your debugger control task about the event. The Hook return BOOL should tell the ppc.library if all worked fine. The ExceptionMsg contains a Type field which describes the exception type and then the PPCTask`s context frame. There are 2 different Types of exceptions. The cpu exceptions like PROGRAM Exceptions and Kernel exception which tell you about important events like a STOPTASK and a FINISHTASK. o PPCTASKTAG_MSGPORT,PPCPort (Default NULL) creates PPCPort which belongs to the PPCTask, so you don`t have to create one yourself in the PPC task if you need it. Supported by PPCGetTaskAttr(). o PPCTASKTAG_STARTUP_MSG,PPCMessage (Default NULL) provides a PPCTask startup msg. This msg will be replied by the ppc.library after the PPC Task ends so you can use this to know that the PPCTask is gone so a PPCUnloadObject() is save. Supported by PPCGetTaskAttr() o PPCTASKTAG_STARTUP_MSGDATA,Data the data ptr or if the length is 0 the additional msgid for the message. o PPCTASKTAG_STARTUP_MSGLENGTH,Length the length for the message. o PPCTASKTAG_STARTUP_MSGID,MsgID the length for the message. o PPCTASKTAG_WAITFINISH,Boolean (Default FALSE) runs the task in a synchron way, so you don`t have to care for the PPCTask communication that much. The function doesn`t return until the task completes and the return value is not the TaskObject but the Task`s return value. To check if the task runned correctly check out the o PPCTASKTAG_BREAKSIGNAL,Boolean (Default FALSE) activates the CTRL-C;D;E;F PPCTask gateway, so you don`t need to use PPCCallOS to check for breaksignals. o PPCTASKTAG_ERROR fieldptr. With this Tag you can do the same what the old RunTaskObject does which interface is a bit limited(compatibility to the first ppc.library version) o PPCTASKTAG_CPUHINT,ULONG The CPU number the task should start on. This is only a hint and no gurantee. RESULT result - the PPCTask Object(maybe NULL) or the Result code of the PPCTask when used in synchron mode NOTE It doesn't free the ElfObject because you may wanna be able to reuse it. EXAMPLE SEE ALSO PPCCreateTask,PPCRunObject,PowerUP/ppclib/Tasks.h ppc.library/PPCDeleteMessage ppc.library/PPCDeleteMessage NAME PPCDeleteMessage -- Delete a PPC Message SYNOPSIS PPCDeleteMessage(PPCMessage) A0 void PPCDeleteMessage(void*); FUNCTION Deletes a PPC Message. You can only delete a msg your task allocated and which hasn`t yet been replied. INPUTS PPCMessage - Ptr to an object generated by PPCCreateMessage SEE ALSO PPCCreatePort(), ppclib/message.h ppc.library/PPCDeletePool ppc.library/PPCDeletePool NAME PPCDeletePool -- Drain an entire memory pool (V39) SYNOPSIS PPCDeletePool(poolHeader) a0 void PPCDeletePool(void *); FUNCTION Frees all memory in all pudles of the specified pool header, then deletes the pool header. Individual free calls are not needed. INPUTS poolHeader - as returned by CreatePool(). SEE ALSO PPCCreatePool(), PPCAllocPooled(), PPCFreePooled() ppc.library/PPCDeletePort ppc.library/PPCDeletePort NAME PPCDeletePort -- Delete a PPC Message Port SYNOPSIS Success = PPCDeletePort(PPCPort) D0 A0 BOOL PPCDeletePort(void*); FUNCTION Deletes a local PPC MsgPort when the Port isn`t obtained by somebody else. If it`s obtained it returns FALSE so you have to decide yourself how you wanna recover this problem which maybe caused by a synchronizing problem between your M68k and PPC applications INPUTS PPCPort - PPCPort object generated by PPCCreatePort SEE ALSO PPCCreatePort(), ppclib/message.h ppc.library/PPCDeletePortList ppc.library/PPCDeletePortList NAME PPCDeletePortList -- Deletes a PortList object SYNOPSIS PPCDeletePortList(PPCPortList) A0 BOOL PPCDeletePortList(void*); FUNCTION This function deletes the PPCPortList object. INPUT PPCPortList - a pointer to the PPCPortList object RESULT Success - A Boolean tells you if the operation was successful. SEE ALSO PPCCreatePortList(), ppclib/message.h ppc.library/PPCDeleteTask ppc.library/PPCDeleteTask NAME PPCDeleteTask -- Delete PPC Task SYNOPSIS Success PPCDeleteTask(TaskObject) A0 BOOL PPCDeleteTask(void*); FUNCTION Removes a PPC Task INPUTS TaskObject - ptr to the TaskObject returned by PPCCreateTask INPUTS Result - if the remove was successful. SEE ALSO PPCLoadObject,PPCDeleteTask,PPCRunObject,PowerUP/ppclib/Tasks.h ppc.library/PPCFindTask ppc.library/PPCFindTask NAME PPCFindTask -- Find PPC Task SYNOPSIS TaskObject PPCFindTask(Name) A0 void* PPCFindTask(char*); FUNCTION Find PPC Task by Name INPUTS Name - Name of the PPC Task to search for. Result returns a TaskObject with the given name or NULL. SEE ALSO PPCCreateTask,PowerUP/ppclib/Tasks.h ppc.library/PPCFindTaskObject ppc.library/PPCFindTaskObject NAME PPCFindTaskObject -- Check if the PPC TaskID exists SYNOPSIS TaskObject PPCFindTaskObject(TaskObject) A0 void* PPCFindTaskObject(ULONG); FUNCTION Check if the TaskObject really exists INPUTS TaskObject - TaskObject you search for RESULT TaskObject - TaskObject you searched for or NULL SEE ALSO PPCCreateTask,PPCFindTask,PowerUP/ppclib/Tasks.h ppc.library/PPCFreeMem ppc.library/PPCFreeMem NAME PPCFreeMem -- Frees a PPC cache aligned memory block SYNOPSIS PPCFreeMem(Memory,size) a1 D0 void PPCFreeMem(APTR,ULONG); FUNCTION Frees a memoryblock which was allocated by PPCAllocMem INPUTS MemoryBlock - memory block Size - memory block size NOTES The reason for this routine is that there's a serious cache copyback problem when ppc cache line and 68060 cache line cross borders. Then the contents of the memory isn't guranteed. The cache issue is explained in detail in Docs/PowerUP.guide SEE ALSO AllocMem(), FreeMem(), exec/memory.h ppc.library/PPCFreeVec ppc.library/PPCFreeVec NAME PPCFreeVec -- return PPCAllocVec() memory to the system SYNOPSIS PPCFreeVec(memoryBlock) A1 void PPCFreeVec(void *); FUNCTION Free an allocation made by the PPCAllocVec() call. The memory will be returned to the system pool from which it came. NOTE If a block of memory is freed twice, the system will Guru. The Alert is AN_FreeTwice ($01000009). If you pass the wrong pointer, you will probably see AN_MemCorrupt $01000005. Future versions may add more sanity checks to the memory lists. INPUTS memoryBlock - pointer to the memory block to free, or NULL. SEE ALSO PPCAllocVec(), exec/memory.h ppc.library/PPCFreeVecPooled ppc.library/PPCFreeVecPooled NAME PPCFreeVecPooled -- return PPCAllocVecPooled() memory to the system SYNOPSIS PPCFreeVecPooled(Pool,memoryBlock) A0 A1 void PPCFreeVecPooled(void*,void *); FUNCTION Free an allocation made by the PPCAllocVecPooled() call. The memory will be returned to the system pool from which it came. INPUTS memoryBlock - pointer to the memory block to free, or NULL. SEE ALSO PPCAllocVecPooled() ppc.library/PPCGetAttrs ppc.library/PPCGetAttrs NAME PPCGetAttrs -- Get PPC Attrs PPCGetAttrsTags -- Varargs Stub for PPCGetAttrs() SYNOPSIS Result = PPCGetAttrs(Tags ) D0 A0 ULONG PPCGetAttrs(struct TagItem*); ULONG PPCGetAttrsTags(...); FUNCTION Gives you infos about the PPC enviroment depending on the tag. INPUTS Tags - The supported tags o PPCINFOTAG_CPU returns the version of the processor to detect the PPC type the system is running on. See your PowerPC Manuals "pvr" descriptions and check out the include "/ppclib/ppc.h. Use the ti_Data field as the processor number. o PPCINFOTAG_CPUREV returns the revision of the processor. Use the ti_Data field as the processor number. o PPCINFOTAG_CPUCOUNT returns the numbers of processors o PPCINFOTAG_CPUCLOCK returns the clock of the cpu in Mhz. Use the ti_Data field as the processor number. o PPCINFOTAG_CPUPLL (V45) returns the clock devider of the cpu. Use the ti_Data field as the processor number. o PPCINFOTAG_EXCEPTIONHOOK (V45) returns the global exception Hook or NULL. RESULT result - depends on the requested Tags SEE ALSO PPCSetAttrs(), ppclib/ppc.h ppc.library/PPCGetMessage ppc.library/PPCGetMessage NAME PPCGetMessage -- Gets a PPC Message from a PPC Port SYNOPSIS Message = PPCGetMessage(PPCPort) D0 A0 void* PPCGetMessage(void*); FUNCTION Checks for a message in the PPCPort`s msglist and removes it from the queue. Until you haven`t replied the PPC Message you can read from the embedded Data field informations. You MUST NOT write to these informations. INPUTS PPCPort - Ptr to PPC Port RESULT PPCMessage - First PPC Message in the PPC Port msglist or NULL if the the msglist is empty. SEE ALSO PPCReplyMessage(), PPCCreateMessage(), ppclib/message.h ppc.library/PPCGetMessageAttr ppc.library/PPCGetMessageAttr NAME PPCGetMessageAttr -- Get Infos about a PPC Message SYNOPSIS Result = PPCGetMessageAttr(PPCMessage,Attr) D0 A0 D0 ULONG PPCGetMessageAttr(void*,ULONG); FUNCTION Returns informations about a PPC Message. This way you can get a Ptr to the Data the message transports and the length of the message. INPUTS PPCMessage - Ptr to an object generated by PPCCreateMessage Attr - Information Attribute o PPCMSGTAG_DATA returns the Data parameter of the PPC Message. The Data field is most of a time a memory ptr but if the length of the message is 0 it can also be used as an additional msgid. o PPCMSGTAG_DATALENGTH returns the Length of the PPC Message. If the Length is NULL this Message needed no cacheflush and therefore is very fast. If Length is NULL the the Data field can be used as an additional msgid. o PPCMSGTAG_MSGID returns the MSGID of the PPC Message. This may be useful to mark certain msgs to be from a certain type which may simplify the handling of messages. RESULT Result - Returns the informations you requested by the attribute. SEE ALSO PPCGetMessage(), ppclib/message.h ppc.library/PPCGetObjectAttrs ppc.library/PPCGetObjectAttrs NAME PPCGetObjectAttrs -- Get Elf Object File(s) information PPCGetObjectAttrsTags -- Varargs Stub for PPCGetObjectAttrs SYNOPSIS Result = PPCGetObjectAttrs(ElfObject,PPCObjectInfo,Tags ) D0 A0 A1 A2 ULONG PPCGetObjectAttrs(void*,struct PPCObjectInfo*,struct TagItem*); ULONG PPCGetObjectAttrsTags(void*,struct PPCObjectInfo*,...); FUNCTION Gives you certain informations about an ELF PPC binary object or all loaded Elf objects. This way you could get certain symbols,types and all that. INPUTS ElfObject - ElfObject returned by PPCLoadObject Tags - Array of Tags RESULT NOTES ELF will be the only format allowed the PowerUP. We don't want alien formats. BUGS Probably a lot SEE ALSO PPCLoadObject(), ppclib/object.h ppc.library/PPCGetPortListAttr ppc.library/PPCGetPortListAttr NAME PPCGetPortListAttr -- Get Infos about a PPC PortList SYNOPSIS Result = PPCGetPortListAttr(PPCPortList,Attr) D0 A0 D0 ULONG PPCGetPortListAttr(void*,ULONG); FUNCTION Returns informations about a PPC PortList. This way you can get the needed received signal mask in the case you use the extended signalmask INPUTS PPCPortList - Ptr to a PPCPortList object Attr - Information Attribute o PPCPORTLISTTAG_EXTENDEDSIGNALS returns the extended signal mask. o PPCPORTLISTTAG_RECEIVEDSIGNALS returns the received signal mask. You need this to see if a msg was received AND if you also got a signal from the extended signalmask. SEE ALSO PPCCreatePortList(), PPCPortList(), ppclib/message.h ppc.library/PPCGetTaskAttrs ppc.library/PPCGetTaskAttrs NAME PPCGetTaskAttrs -- Get PPC Task Info PPCGetTaskAttrsTags -- Varargs Stub for PPCGetTaskAttrs() SYNOPSIS Result PPCGetTaskAttrs(TaskObject,Tags ) D0 A0 A1 ULONG PPCGetTaskAttrs(void*,struct TagItem*); ULONG PPCGetTaskAttrsTags(void*,...); FUNCTION Gives you infos about a Task or all Tasks. It depends on the tags if you get back values or ptrs to a node or list of entries which describe a task or tasks. INPUTS TaskObject - The Task you want infos about or NULL if you mean ALL Tags - The Tags you want. o PPCTASKINFOTAG_NAME returns the name of the TaskObject o PPCTASKINFOTAG_PRIORITY returns the priority of the TaskObject o PPCTASKINFOTAG_CACHEFLUSH returns the cacheflush flag of the TaskObject. see PPCTASKTAG_CACHEFLUSH for more informations o PPCTASKINFOTAG_STACKSIZE returns the stacksize of the TaskObject o PPCTASKINFOTAG_STATE returns the state of the TaskObject. see exec/task.h TS_* for more informations o PPCTASKINFOTAG_TASK,TaskObject overrules the TaskObject parameter of the function o PPCTASKINFOTAG_ALLTASK,Boolean means that the PPCTASKINFOTAG_HOOK Hook is called for all PPCTasks, so you can get informations for all PPCTasks o PPCTASKINFOTAG_HOOK,(struct Hook*) the Hook function is called for every PPCTask so you can ask for informations about every single task. You must not specify a PPCTASKINFOTAG_ALLTASK in such Hook to avoid a deadlock in such Hook function. Msg Parameter is NULL for now. Object Parameter is the TaskObject HookFunc(Hook, TaskObject, NULL); o PPCTASKINFOTAG_SIGALLOC returns the signal allocmask of a PPCTask o PPCTASKINFOTAG_SIGWAIT returns the signal waitmask of a PPCTask o PPCTASKINFOTAG_SIGRECVD returns the signal received mask of a PPCTask o PPCTASKINFOTAG_USEDSTACK returns how much bytes of the stack is used. o PPCTASKINFOTAG_INPUTHANDLE returns the inputhandle file of the M68k MsgTask o PPCTASKINFOTAG_OUTPUTHANDLE returns the outputhandle file of the M68k MsgTask o PPCTASKINFOTAG_ERRORHANDLE returns the errorhandle file of the M68k MsgTask o PPCTASKINFOTAG_VALUEPTR,(void*) specifies the address where to return register values which may not fit into 32bit. o PPCTASKINFOTAG_STARTUP_MSG (V45) returns the PPCTask`s startup msg. This msg will be replied by the ppc.library after the PPC Task ends so you can use this to know that the PPCTask is gone so a PPCUnloadObject() is save. On the PPC side you can use it as a method to pass data. o PPCTASKINFOTAG_STARTUP_MSGDATA (V45) returns the startup`s MsgData. This data field can be used to pass startup data to the PPC. Like some M68k msgport for example. o PPCTASKINFOTAG_STARTUP_MSGLENGTH (V45) returns the startup`s MsgLength. o PPCTASKINFOTAG_STARTUP_MSGID (V45) returns the startup`s MsgID. o PPCTASKINFOTAG_MSGPORT (V45) returns the PPCPort which belongs to the PPCTask. If you haven`t asked for one in PPCCreateTask() the function returns NULL. o PPCTASKINFOTAG_ELFOBJECT (V45) returns the ElfObject for the TaskObject. This may be useful for debugger like tools. Through the ElfObject you can also find out the filename and other things. o PPCTASKINFOTAG_EXCEPTIONHOOK,(struct Hook*) (V45) installs a new ExceptionHandler Hook. Useful in the combination with a CreateTaskHook function. o PPCTASKINFOTAG_PC,void* ValuePtr returns the SRR0 of the task at the ti_Data ValuePtr address or PPCTASKINFOTAG_VALUEPTR is used if it exists. SRR0 is the program counter. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_MSR,void* ValuePtr returns the SRR1 of the task at the ti_Data ValuePtr address or PPCTASKINFOTAG_VALUEPTR is used if it exists. SRR1 is the MSR The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_CR returns the CR of the task as the function result. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_XER returns the CR of the task as the function result. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_LR,void* ValuePtr returns the LR of the task at the ti_Data ValuePtr address or PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_CTR,void* ValuePtr returns the CTR of the task at the ti_Data ValuePtr address or PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_FPSCR,void* ValuePtr returns the FPSCR of the task at the ti_Data ValuePtr address or PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_GPR,RegNum returns the GPR[RegNum] of the task at the ValuePtr address. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_FPR,RegNum returns the GPR[RegNum] of the task at the ValuePtr address. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_WAITFINISHTASK (V45) returns the parent process in which you created a synchron PPC Task. Synchron PPC Task`s are created with the PPCTASKTAG_WAITINFISH,TRUE or outdated a PPCRunObject. The reason for this function is to find the shell task easily and check for a CTRL-C for example. RESULT result - depends on the requested Tags SEE ALSO PPCSetTaskAttrs,PowerUP/PPCLib/ppc_tasks.h ppc.library/PPCLoadObject ppc.library/PPCLoadObject NAME PPCLoadObject -- Load ELF PPC File SYNOPSIS ElfObject = PPCLoadObject(Name) d0 a0 void *PPCLoadObject(char*); FUNCTION Loads an ELF PPC binary which is created by gcc for example. It can only handle relocatable ELF binaries (ld -r option) INPUTS name - filename RESULT object - ELF Program object which can be started by PPCRunObject NOTE ELF will be the only format allowed the PowerUP. We don't want alien formats. SEE ALSO PPCUnloadObject(), PPCRunObject(), ppclib/object.h ppc.library/PPCLoadObjectTagList ppc.library/PPCLoadObjectTagList NAME PPCLoadObjectTagList -- Create a PPC Object from an ELF Stream (V45) PPCLoadObjectTags -- Varargs Stub for PPCLoadObjectTagList SYNOPSIS ElfObject = PPCLoadObjectTagList(Tags ) D0 A0 void *PPCLoadObjectTagList(struct TagItem*); void *PPCLoadObjectTags(...); FUNCTION Creates an PPC Object from an ELF PPC binary which is created by gcc for example. It can only handle relocatable ELF binaries (ld -r option). This call is similar to PPCLoadObject but allows to create objects from ELF files that are already resident in memory. INPUTS tags - The Tags you want. o PPCELFLOADTAG_ELFNAME pointer to a filename of the elf file or the name of the stram. o PPCELFLOADTAG_ELFADDRESS pointer to the elf stream resident in memory. PPCELFLOBJTAG_ELFNAME is the object name then. o PPCELFLOADTAG_ELFLENGTH length of the elf stream. This tag is optional o PPCELFLOADTAG_HOOK Stream IO hook which can be used to replace the open,read,seek stream functions. APTR CallHookPkt(hook,StreamHandle,ElfStreamMsg); The result of this function must be Type depended. Please read ppclib/object.h for more informations. RESULT object - ELF Program object which can be started by PPCRunObject NOTES ELF will be the only format allowed the PowerUP. We don't want alien formats. PPCLOBJTAG_ELFNAME and PPCLOBJTAG_ELFADDRESS are mutually exclusive. SEE ALSO PPCUnloadObject(), PPCLoadObjectPPCRunObject(), ppc_protos.h, ppc_pragmas.h ppc.library/PPCObtainPort ppc.library/PPCObtainPort NAME PPCObtainPort -- Obtain a PPC Message Port SYNOPSIS Port = PPCObtainPort(Tags) D0 A0 void* PPCObtainPort(struct TagItem*); FUNCTION searches a public PPC MsgPort on the local processor or all processor. A search on the network may also be possible in the future. INPUTS Tags - Tags to specify a public port for example. o PPCPORTTAG_NAME,"Name" defines the name of the PPC port you want to obtain o PPCPORTTAG_ERROR,(ULONG*) ErrorPtr defines the ptr for a more precise return error result RESULT PPCPort - PPCPort object generated by PPCCreatePort SEE ALSO PPCReleasePort(), ppclib/message.h ppc.library/PPCReadByte ppc.library/PPCReadByte NAME PPCReadByte -- Read a Long from the PPC SYNOPSIS Result=PPCReadByte(Address) d0 a0 ULONG PPCReadByte(UBYTE*); FUNCTION This function reads a long by the PPC processor. Quick way to read small amounts of data without cache effects RESULT Result - UBYTE read from the address SEE ALSO PPCWriteByte() ppc.library/PPCReadLong ppc.library/PPCReadLong NAME PPCReadLong -- Read a Long from the PPC SYNOPSIS Result=PPCReadLong(Address) d0 a0 ULONG PPCReadLong(ULONG*); FUNCTION This function reads a long by the PPC processor. Quick way to read small amounts of data without cache effects RESULT Result - ULONG read from the address SEE ALSO PPCWriteLong() ppc.library/PPCReadWord ppc.library/PPCReadWord NAME PPCReadWord -- Read a Long from the PPC SYNOPSIS Result=PPCReadWord(Address) d0 a0 ULONG PPCReadWord(ULONG*); FUNCTION This function reads a long by the PPC processor. Quick way to read small amounts of data without cache effects RESULT Result - UWORD read from the address SEE ALSO PPCWriteWord() ppc.library/PPCReleasePort ppc.library/PPCReleasePort NAME PPCReleasePort -- Releases an obtained PPC Message Port SYNOPSIS Success = PPCReleasePort(PPCPort) D0 A0 void PPCReleasePort(void*); FUNCTION Releases a PPC MsgPort, so it may be removed after nobody needs it anymore. INPUTS PPCPort - Ptr to an object generated by PPCCreatePort RESULT Success - Boolean which says if the PPCPort could be released successfully. If this fails the PPCPort is still obtained by somebody else. SEE ALSO PPCObtainPort(), ppclib/message.h ppc.library/PPCRemPortList ppc.library/PPCRemPortList NAME PPCRemPortList -- Remove a port from the PPCPortList object SYNOPSIS PPCRemPortList(PPCPortList,PPCPort) A0 A1 void PPCRemPortList(void*,void*); FUNCTION This function removes a PPCPort from your PPCPortList object. INPUT PPCPortList - a pointer to the PPCPortList object PPCPort - a pointer to the PPC Message port SEE ALSO PPCCreatePortList(), ppclib/message.h ppc.library/PPCReplyMessage ppc.library/PPCReplyMessage NAME PPCReplyMessage -- Reply a PPC Message SYNOPSIS Success = PPCReplyMessage(PPCMessage) D0 A0 BOOL PPCReplyMessage(void*); FUNCTION Reply a PPC Message. After this operation the embedded Data informations in the PPC Message isn`t valid anymore. The Message itself is also not valid anymore so any access to the object is not allowed. INPUTS PPCMessage - Ptr to an object generated by PPCCreateMessage RESULT Success - A Boolean tells you if the operation was successful. SEE ALSO PPCGetMessage(), ppclib/message.h ppc.library/PPCRunKernelObject ppc.library/PPCRunKernelObject NAME PPCRunKernelObject -- Run a Kernal Module SYNOPSIS Result = PPCRunKernalModule(ElfObject, KernalArgs ) D0 A0 A1 ULONG PPCRunKernalModule(void*,struct KernalArgs*); FUNCTION Runs a Kernal Module which can be used as a quick call server module mechanism. You only have to add some kind of dispatcher. It runs under the Superviser mode on the PPC and must not access any PPC Kernal functions. INPUTS Module - Module you get from CreateModuleID KernalArgs - Arguments for the Call RESULT Result - Result of the function call. SEE ALSO PPCLoadObject(), ppclib/interface.h ppc.library/PPCRunKernelObjectFPU ppc.library/PPCRunKernelObjectFPU NAME PPCRunKernelObjectFPU -- Run a Kernal Module SYNOPSIS Result = PPCRunKernalModule(ElfObject, KernalArgs ) FP0 A0 A1 DOUBLE PPCRunKernalModule(void*,struct KernalArgs*); FUNCTION Runs a Kernal Module which can be used as a quick call server module mechanism. You only have to add some kind of dispatcher. It runs under the Supervisor mode on the PPC and must not access any PPC Kernal functions. INPUTS Module - Module you get from CreateModuleID KernalArgs - Arguments for the Call RESULT Result - FPU Result of the function call. This is the only difference to PPCRunKernelObject() SEE ALSO PPCLoadObject(), ppclib/interface.h ppc.library/PPCRunObject ppc.library/PPCRunObject NAME PPCRunObject -- Runs an ELF PPC File SYNOPSIS ElfObject = PPCRunObject(ElfObject, Argument ) D0 A0 A1 void *PPCRunObject(void*,void*); FUNCTION Runs an ELF PPC Object and returns the result. INPUTS object - ptr to the object given by PPCLoadObject RESULT result - the ElfObject of the loaded PPC program. NOTES ELF will be the only format allowed for PowerUP. We don't want alien formats. If you think you can hack the format of the ElfObject be sure that we'll change the format. THIS FUNCTION IS OBSOLETE AND IT'S ONLY THERE TO BE COMPATIBLE WITH THE FIRST SINGLE TASK ppc.library. Use PPCCreateTask instead. SEE ALSO PPCUnloadObject,PPCRunObject,PowerUP/ppclib/Tasks.h ppc.library/PPCSendMessage ppc.library/PPCSendMessage NAME PPCSendMessage -- Sends a PPC Message to a PPC Port SYNOPSIS Success = PPCSendMessage(PPCPort,PPCMessage,Data,Length,MsgID) D0 A0 A1 A2 D0 D1 BOOL PPCSendMessage(void*,void*,void*,ULONG,ULONG); FUNCTION Sends a PPC Message to a PPC Port which may be controlled by the M68k oder PPC. This way you can pass data between the PPC and the M68k in an abstract way which will be source compatible on the A\BOX OS. After you`ve sent a message you MUST NOT change the Data until your task received a reply. If you only want to send a quick 32Bit Msg to the target task use Data as a 32bit Msg value and Length=0. This way no Cache is flushed. INPUTS PPCPort - Ptr to an object generated by PPCCreatePort PPCMessage - Ptr to an object generated by PPCCreateMessage Data - Ptr to the Data you wanna send or additional MsgID if the Length field is 0. Length - Length of the Data you wanna send. MsgID - MsgID code you may use for your msg type detection RESULT Success - A Boolean tells you if the operation was successful. SEE ALSO PPCReplyMessage(), ppclib/message.h ppc.library/PPCSetAttrs ppc.library/PPCSetAttrs NAME PPCSetAttrs -- Set PPC Attrs (V45) PPCSetAttrsTags -- Varargs Stub for PPCSetAttrs() SYNOPSIS Success = PPCSetAttrs(Tags) D0 A0 BOOL PPCSetAttrs(struct TagItem*); BOOL PPCSetAttrsTags(...); FUNCTION Sets certain flags for the PPC enviroment. INPUTS Tags - The tags you want infos about. o PPCINFOTAG_EXCEPTIONHOOK sets the global exception Hook. Check out the include "/ppclib/ppc.h and "ppclib/tasks.h" for more informations. o PPCINFOTAG_TASKHOOK adds a hook to the task hook event list. This hook is called if a task is created, deleted or changed in some way. This way you could add support to the debugger to catch the next created ppc task. Check out the include "/ppclib/ppc.h and "ppclib/tasks.h" for more informations. o PPCINFOTAG_TASKHOOK removes a task hook. RESULT success - If the operation was successful SEE ALSO PPCGetAttrs(), ppclib/ppc.h ppc.library/PPCSetPortListAttr ppc.library/PPCSetPortListAttr NAME PPCSetPortListAttr -- Set Infos about a PPC PortList SYNOPSIS PPCSetPortListAttr(PPCPortList,Attr) A0 D0 void PPCSetPortListAttr(void*,ULONG); FUNCTION changes certain PPC PortList attributes. This way you can change the Extended SignalMask for example. INPUTS PPCPortList - Ptr to a PPCPortList object Attr - Information Attribute o PPCPORTLISTTAG_EXTENDEDSIGNALS,ExtSignalMask changes the PPCPortList extended signalmask to the value you specify SEE ALSO PPCCreatePortList(), PPCPortList(), PPCGetSetPortListAttr(), ppclib/message.h ppc.library/PPCSetTaskAttrs ppc.library/PPCSetTaskAttrs NAME PPCSetTaskAttrs -- Set PPC Task Info PPCSetTaskAttrsTags -- Varargs Stub for PPCSetTaskAttrs() SYNOPSIS Boolean PPCSetTaskAttrs(TaskObject, Tags ) D0 A0 A1 ULONG PPCSetTaskAttrs(void*,struct TagItem*); ULONG PPCSetTaskAttrsStub(void*,...); FUNCTION Gives you the ability to change certain task informations. INPUTS TaskObject - The Task you want infos about or NULL if you mean ALL Tags - The Tags you want. o PPCTASKINFOTAG_PRIORITY,Priority changes the priority of the TaskObject o PPCTASKINFOTAG_CACHEFLUSH,BOOLEAN changes the cacheflush flag of the TaskObject. see PPCTASKTAG_CACHEFLUSH for more informations o PPCTASKINFOTAG_INPUTHANDLE,BPTR changes the inputhandle file of the M68k MsgTask o PPCTASKINFOTAG_OUTPUTHANDLE,BPTR changes the outputhandle file of the M68k MsgTask o PPCTASKINFOTAG_ERRORHANDLE,BPTR changes the errorhandle file of the M68k MsgTask o PPCTASKINFOTAG_VALUEPTR,(void*) specifies the address to read the register values from which may not fit into 32bit. o PPCTASKINFOTAG_EXCEPTIONHOOK,(struct Hook*) installs a new ExceptionHandler Hook. Useful in the combination with a CreateTaskHook function. o PPCTASKINFOTAG_STOPTASK, BOOL tells the Task that it must stop at the first instruction. This must only be called during a CreateTaskHook function and it makes only sense in the combination with an own trap handler. o PPCTASKINFOTAG_PC,void* ValuePtr changes the SRR0 of the task with the contents from the the ValuePtr address. If you`ve not specifed a ti_Data ValuePtr the valueptr from PPCTASKINFOTAG_VALUEPTR is used if it exists. SRR0 is the program counter. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_MSR,void* ValuePtr changes the SRR1 of the task with the contents from the the ValuePtr address. If you`ve not specifed a ti_Data ValuePtr the valueptr from PPCTASKINFOTAG_VALUEPTR is used if it exists. SRR1 is the MSR. o PPCTASKINFOTAG_CR,ULONG changes the CR register contents of the task. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_XER,ULONG changes the XER register contents of the task. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_LR,void* ValuePtr changes the LR of the task with the contents from the the ValuePtr address. If you`ve not specifed a ti_Data ValuePtr the valueptr from PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_CTR,void* ValuePtr changes the CTR of the task with the contents from the the ValuePtr address. If you`ve not specifed a ti_Data ValuePtr the valueptr from PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_FPSCR changes the FPSCR of the task with the contents from the the ValuePtr address. If you`ve not specifed a ti_Data ValuePtr the valueptr from PPCTASKINFOTAG_VALUEPTR is used if it exists. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_GPR,RegNum changes the GPR[RegNum] of the task with the contents from the the ValuePtr address which you must specify with PPCTASKINFOTAG_VALUEPTR. The stability of the value depends on PPCTask`s state. o PPCTASKINFOTAG_FPR,RegNum changes the FPR[RegNum] of the task with the contents from the the ValuePtr address which you must specify with PPCTASKINFOTAG_VALUEPTR. The stability of the value depends on PPCTask`s state. RESULT Boolean - to signal an error SEE ALSO PPCGetTaskAttrs,PPCDeleteTaskInfo,PowerUP/PPCLib/ppc_tasks.h ppc.library/PPCSignalTask ppc.library/PPCSignalTask NAME PPCSignalTask -- Signal PPC Task SYNOPSIS PPCSignalTask(TaskObject,SignalMask) A0 D0 void PPCSignalTask(void*,ULONG); FUNCTION Sends Signals to a PPC Task. INPUTS TaskObject - TaskObject returned by PPCCreateTask signalmask - SignalMask as known from exec/Signal SEE ALSO PPCCreateTask,PowerUP/ppclib/Tasks.h ppc.library/PPCStartTask ppc.library/PPCStartTask NAME PPCStartTask -- Restart a Task SYNOPSIS Result PPCStartTask(TaskObject,Tags) A0 A1 BOOL PPCStartTask(void*,struct TagItem*); FUNCTION This is a function only useful for debuggers. It allows a Debugger to restart a PPCTask again after it was stopped. Being stopped means PPCStopTask() or after an Exception where a Task goes into the stop state. INPUTS TaskObject - The Task you want infos about or NULL if you mean ALL Tags - The Tags you want. RESULT Result - Boolean to show if the function was successful SEE ALSO PPCStopTask(),ppclib/tasks.h ppc.library/PPCStopTask ppc.library/PPCStopTask NAME PPCStopTask -- Stop a Task SYNOPSIS Result PPCStopTask(TaskObject,Tags) A0 A1 BOOL PPCStopTask(void*,struct TagItem*); FUNCTION This is a function only useful for debuggers. It allows a Debugger to stop a running Task. INPUTS TaskObject - The Task you want infos about or NULL if you mean ALL Tags - The Tags you want. RESULT Result - Boolean to show if the function was successful SEE ALSO PPCStartTask(),ppclib/tasks.h ppc.library/PPCUnLoadObject ppc.library/PPCUnLoadObject NAME PPCUnLoadObject -- UnLoad ELF PPC Object SYNOPSIS PPCUnLoadObject( Object ) A0 void PPCUnLoadObject(void*); FUNCTION Unloads an Object created with PPCLoadObject. INPUTS object - ptr to the object given by PPCLoadObject SEE ALSO PPCUnloadObject(), PPCRunObject(), ppclib/object.h ppc.library/PPCWaitPort ppc.library/PPCWaitPort NAME PPCWaitPort -- wait for a given PPC Msgport to be non-empty SYNOPSIS PPCMessage = PPCWaitPort(PPCPort) D0 A0 void* PPCWaitPort(void*); FUNCTION This function waits for the given PPC Msgport to become non-empty. If necessary, the Wait function will be called to wait for the port signal. If a message is already present at the port, this function will return immediately. The return value is always a pointer to the first PPC Message queued (but it is not removed from the queue. INPUT PPCPort - a pointer to the PPC Message port RESULT PPCMessage - a pointer to the first PPC Message in the PPCPort msglist. SEE ALSO PPCGetMessage(), ppclib/message.h ppc.library/PPCWaitPortList ppc.library/PPCWaitPortList NAME PPCWaitPortList -- wait for a given PPC Msgport List to get a msg SYNOPSIS PPCPort = PPCWaitPortList(PPCPortList) D0 A0 void* PPCWaitPortList(void*) FUNCTION This function waits for a list of PPCPorts. If a message is received by one of the ports the port with the msg is returned so you can use PPCGetMessage on that port. NULL is returned if no signals were received or if an extended signal was received. You should always check the Received Signals in PPCWaitPort when you use an extended Signalmask, so you don`t miss signals. It could happen that you get a message and some private signal and the function returns the PPCPort where the message is. In this case you should check the received signalmask to not miss your private signals. INPUT PPCPortList - a pointer to a PPCPortList object created by PPCCreateWaitPortList() RESULT PPCPort - a pointer to a port which received a msg or NULL. SEE ALSO PPCGetMessage(), PPCWaitPort(), ppclib/message.h ppc.library/PPCWriteByte ppc.library/PPCWriteByte NAME PPCWriteByte -- Write a Long by the PPC SYNOPSIS PPCWriteByte(Address,Value) a0 d0 void PPCWriteByte(UBYTE*,ULONG); FUNCTION This function writes a long by the PPC processor. Quick way to write small amounts of data without cache effects SEE ALSO PPCReadByte() ppc.library/PPCWriteLong ppc.library/PPCWriteLong NAME PPCWriteLong -- Write a Long by the PPC SYNOPSIS PPCWriteLong(Address,Value) a0 d0 void PPCWriteLong(ULONG*,ULONG); FUNCTION This function writes a long by the PPC processor. Quick way to write small amounts of data without cache effects SEE ALSO PPCReadLong() ppc.library/PPCWriteLongFlush ppc.library/PPCWriteLongFlush NAME PPCWriteLongFlush -- Write a Long by the PPC and Flush Cache SYNOPSIS PPCWriteLongFlush(Address,Value) a0 d0 void PPCWriteLongFlush(ULONG*,ULONG); FUNCTION This function writes a long by the PPC processor and flushes the instruction cache. The only reason for this function is to write a breakpoint. SEE ALSO PPCWriteLong(),PowerUP/PPCCacheFlush ppc.library/PPCWriteWord ppc.library/PPCWriteWord NAME PPCWriteWord -- Write a Long by the PPC SYNOPSIS PPCWriteWord(Address,Value) a0 d0 void PPCWriteWord(UWORD*,ULONG); FUNCTION This function writes a long by the PPC processor. Quick way to write small amounts of data without cache effects SEE ALSO PPCReadWord() .