TABLE OF CONTENTS powerpc.library/AllocVec32 powerpc.library/AllocXMsg powerpc.library/CausePPCInterrupt powerpc.library/CreatePPCTask powerpc.library/FreeVec32 powerpc.library/FreeXMsg powerpc.library/GetCPU powerpc.library/GetPPCState powerpc.library/PowerDebugMode powerpc.library/PutXMsg powerpc.library/RunPPC powerpc.library/SPrintF68K powerpc.library/WaitForPPC powerpc.library/AddHeadPPC powerpc.library/AddPortPPC powerpc.library/AddSemaphorePPC powerpc.library/AddTailPPC powerpc.library/AddTimePPC powerpc.library/AllocPooledPPC powerpc.library/AllocSignalPPC powerpc.library/AllocVecPPC powerpc.library/AllocXMsgPPC powerpc.library/AttemptSemaphorePPC powerpc.library/AttemptSemaphoreSharedPPC powerpc.library/CauseInterrupt powerpc.library/ChangeMMU powerpc.library/ClearExcMMU powerpc.library/CmpTimePPC powerpc.library/CopyMemPPC powerpc.library/CreateMsgPortPPC powerpc.library/CreatePoolPPC powerpc.library/CreateTaskPPC powerpc.library/DeleteMsgPortPPC powerpc.library/DeletePoolPPC powerpc.library/DeleteTaskPPC powerpc.library/EndSnoopTask powerpc.library/EnqueuePPC powerpc.library/FindNamePPC powerpc.library/FindPortPPC powerpc.library/FindSemaphorePPC powerpc.library/FindTagItemPPC powerpc.library/FindTaskByID powerpc.library/FindTaskPPC powerpc.library/FreeAllMem powerpc.library/FreePooledPPC powerpc.library/FreeSemaphorePPC powerpc.library/FreeSignalPPC powerpc.library/FreeVecPPC powerpc.library/FreeXMsgPPC powerpc.library/GetHALInfo powerpc.library/GetInfo powerpc.library/GetMsgPPC powerpc.library/GetSysTimePPC powerpc.library/GetTagDataPPC powerpc.library/InitSemaphorePPC powerpc.library/InsertPPC powerpc.library/LockTaskList powerpc.library/ModifyFPExc powerpc.library/NewListPPC powerpc.library/NextTagItemPPC powerpc.library/ObtainSemaphorePPC powerpc.library/ObtainSemaphoreSharedPPC powerpc.library/ProcurePPC powerpc.library/PutMsgPPC powerpc.library/PutXMsgPPC powerpc.library/ReleaseSemaphorePPC powerpc.library/RemExcHandler powerpc.library/RemHeadPPC powerpc.library/RemovePPC powerpc.library/RemPortPPC powerpc.library/RemTailPPC powerpc.library/RemSemaphorePPC powerpc.library/ReplyMsgPPC powerpc.library/Run68K powerpc.library/SetCache powerpc.library/SetExceptPPC powerpc.library/SetExcHandler powerpc.library/SetExcMMU powerpc.library/SetHardware powerpc.library/SetNiceValue powerpc.library/SetReplyPortPPC powerpc.library/SetScheduling powerpc.library/SetSignalPPC powerpc.library/SetTaskPriPPC powerpc.library/Signal68K powerpc.library/SignalPPC powerpc.library/SnoopTask powerpc.library/SPrintF powerpc.library/SubTimePPC powerpc.library/Super powerpc.library/TrySemaphorePPC powerpc.library/UnLockTaskList powerpc.library/User powerpc.library/VacatePPC powerpc.library/WaitFor68K powerpc.library/WaitPortPPC powerpc.library/WaitPPC powerpc.library/WaitTime powerpc.library/AllocVec32 powerpc.library/AllocVec32 NAME AllocVec32 - allocates memory which is correctly aligned (V7) CPU 680x0 SYNOPSIS memblock = AllocVec32(memsize, attributes) d0 d0 d1 void *AllocVec32(ULONG, ULONG); FUNCTION This function allocates memory via exec/AllocVec and aligns the memory block properly, so that this memory block can be shared with PPC tasks. The minimal alignment of the memory block is 32. INPUTS memsize - size of memory to be allocated attributes - the desired memory attributes (see exec/AllocMem for a description of these attributes) RESULT memblock - The address of the allocated memory block NOTES Memory blocks allocated with 'AllocVec32' must be freed using 'FreeVec32'. SEE ALSO FreeVec32, exec/AllocMem powerpc.library/AllocXMsg powerpc.library/AllocXMsg NAME AllocXMsg - allocates a message for Inter-CPU communication (V12) CPU 680x0 SYNOPSIS message = AllocXMsg(bodysize, replyport) d0 d0 a0 struct Message *AllocXMsg(ULONG, struct MsgPort *); FUNCTION This function allocates memory for a message which can be used for Inter-CPU communication. Some fields of the message are initialized. After this function was called, the message body must be created before sending this message. INPUTS bodysize - the size of the message body (max. 65535-MN_SIZE) replyport - the reply port RESULT message - The address of an initialized message (except for the message body, which must be initialized by the programmer). NOTES Calling this function is the only way allowed to create a message which can be sent to a PPC task. A message allocated with 'AllocXMsg' should be freed using 'FreeXMsg' if it is not used anymore. Since V14, it is allowed to free the messsage using 'FreeXMsgPPC' on the PPC side (which is internally done using a cross call). An Inter-CPU message must be sent with 'PutXMsg' to a PPC task. It is possible not to specify a replyport (simply set replyport to NULL). If you want to be compatible to earlier versions, you shouldn't free InterCPU messages by the foreign task. SEE ALSO FreeXMsg, PutXMsg powerpc.library/CausePPCInterrupt powerpc.library/CausePPCInterrupt NAME CausePPCInterrupt - invokes all interrupt handlers on PPC side (V15) CPU 680x0 SYNOPSIS CausePPCInterrupt() void CausePPCInterrupt(); FUNCTION Invokes all PPC interrupt handlers, which were added using SetExcHandler and an exception ID = EXCF_INTERRUPT. NOTES This function allows to run PPC code very quickly from the 68K side, much faster than through a regular PPC call. WarpOS does not enforce any kind of cache consistency for such an operation. Don't use this function, except if you know exactly what you are doing. SEE ALSO CauseInterrupt powerpc.library/CreatePPCTask powerpc.library/CreatePPCTask NAME CreatePPCTask - creates a new PPC task (V15) CPU 680x0 SYNOPSIS TaskPPC = CreatePPCTask(TagItems) d0 a0 struct TaskPPC *CreatePPCTask(struct TagItem *); FUNCTION This function creates a new PPC task under control of the tags passed. All memory (inclusive stack) is allocated automatically. This function does nothing else then calling powerpc/CreateTaskPPC through a context switch. It is a convenience function. INPUTS TagItems - pointer to a tagitem array. Refer to the documentation of CreateTaskPPC for a description of all supported tags. RESULT TaskPPC - pointer to a TaskPPC structure or NULL for failure NOTES See powerpc/CreateTaskPPC SEE ALSO CreateTaskPPC, powerpc/tasksPPC.i powerpc.library/FreeVec32 powerpc.library/FreeVec32 NAME FreeVec32 - frees memory allocated with 'AllocVec32' (V7) CPU 680x0 SYNOPSIS FreeVec32(memblock) a1 void FreeVec32(void *); FUNCTION This function frees a memory block which was allocated using 'AllocVec32'. INPUTS memblock - The address of the allocated memory block SEE ALSO AllocVec32 powerpc.library/FreeXMsg powerpc.library/FreeXMsg NAME FreeXMsg - frees a message allocated with 'AllocXMsg' (V12) CPU 680x0 SYNOPSIS FreeXMsg(message) a0 void FreeXMsg(struct Message *); FUNCTION This function frees a memory allocated using 'AllocXMsg'. INPUTS message - a message allocated by 'AllocXMsg'. NOTES There were some restrictions in earlier versions using FreeXMsg. Since V14, a XMessage created by AllocXMsg can be freed either by another 68K task (if the message isn't used anymore) or by a PPC task using FreeXMsgPPC. SEE ALSO AllocXMsg, PutXMsg powerpc.library/GetCPU powerpc.library/GetCPU NAME GetCPU - gets the PowerPC CPU type (V7) CPU 680x0 SYNOPSIS CPUType = GetCPU d0 ULONG GetCPU (void); FUNCTION This function reads the PowerPC CPU type. A longword is returned with one specific bit set (see the include file 'powerpc/powerpc.i' for a description of the different CPU types) RESULT CPUType - A longword with one specific bit set. powerpc.library/GetPPCState powerpc.library/GetPPCState NAME GetPPCState - returns the state of the PPC and PPC applications (V13) CPU 680x0 SYNOPSIS PPCState = GetPPCState d0 ULONG GetPPCState (void); FUNCTION This function returns the current state of the PPC processor and the state of custom applications. A bitmask is returned with the values defined in 'powerpc.i'. RESULT PPCState - A bitmask. The following bits are supported (the description is valid if the bit is 1): PPCSTATEF_POWERSAVE - PPC is currently in power save mode. PPCSTATEF_APPACTIVE - PPC application tasks are currently - active resp. installed in the system. PPCSTATEF_APPRUNNING - At least one PPC application tas...
wssmia