Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

412 lines
14 KiB

  1. #include <string.h>
  2. #include <stdio.h>
  3. #include <cellstatus.h>
  4. #include <sys/prx.h>
  5. #include <sys/exportcplusplus.h>
  6. #include <sys/ppu_thread.h>
  7. #include "tier0/platform.h"
  8. #include "logging.h"
  9. #include "dbg.h"
  10. #include "memalloc.h"
  11. #include "platform.h"
  12. #include "threadtools.h"
  13. #include "ps3/ps3_win32stubs.h"
  14. #include "unitlib/unitlib.h"
  15. #include "tier0/fasttimer.h"
  16. #include "tier0/mem.h"
  17. #include "tier0/tslist.h"
  18. #include "tier0/vatoms.h"
  19. #include "tier0/vprof.h"
  20. #include "tier0/miniprofiler.h"
  21. #include "tls_ps3.h"
  22. #include "ps3/ps3_helpers.h"
  23. #include "ps3/ps3_console.h"
  24. #ifdef _DEBUG
  25. #define tier0_ps3 tier0_dbg
  26. #else
  27. #define tier0_ps3 tier0_rel
  28. #endif
  29. PS3_PRX_SYS_MODULE_INFO_FULLMACROREPLACEMENTHELPER( tier0 );
  30. SYS_MODULE_START( _tier0_ps3_prx_entry );
  31. SYS_MODULE_EXIT( _tier0_ps3_prx_exit );
  32. SYS_LIB_DECLARE( tier0_ps3, SYS_LIB_AUTO_EXPORT | SYS_LIB_WEAK_IMPORT );
  33. #ifndef _CERT
  34. SYS_LIB_EXPORT( GetTLSGlobals, tier0_ps3 );
  35. #endif
  36. SYS_LIB_EXPORT( PS3_PrxGetModulesList, tier0_ps3 );
  37. SYS_LIB_EXPORT( LoggingSystem_RegisterLoggingChannel, tier0_ps3 );
  38. SYS_LIB_EXPORT( LoggingSystem_RegisterLoggingListener, tier0_ps3 );
  39. SYS_LIB_EXPORT( LoggingSystem_ResetCurrentLoggingState, tier0_ps3 );
  40. SYS_LIB_EXPORT( LoggingSystem_LogAssert, tier0_ps3 );
  41. SYS_LIB_EXPORT( LoggingSystem_LogDirect, tier0_ps3 );
  42. SYS_LIB_EXPORT( LoggingSystem_IsChannelEnabled, tier0_ps3 );
  43. SYS_LIB_EXPORT( LoggingSystem_SetChannelSpewLevel, tier0_ps3 );
  44. SYS_LIB_EXPORT( LoggingSystem_SetChannelSpewLevelByName, tier0_ps3 );
  45. SYS_LIB_EXPORT( LoggingSystem_SetChannelSpewLevelByTag, tier0_ps3 );
  46. SYS_LIB_EXPORT( LoggingSystem_SetGlobalSpewLevel, tier0_ps3 );
  47. SYS_LIB_EXPORT( LoggingSystem_SetChannelFlags, tier0_ps3 );
  48. SYS_LIB_EXPORT( LoggingSystem_SetLoggingResponsePolicy, tier0_ps3 );
  49. SYS_LIB_EXPORT( LoggingSystem_AddTagToCurrentChannel, tier0_ps3 );
  50. SYS_LIB_EXPORT( LoggingSystem_GetChannelFlags, tier0_ps3 );
  51. SYS_LIB_EXPORT( LoggingSystem_SetChannelColor, tier0_ps3 );
  52. SYS_LIB_EXPORT( LoggingSystem_GetChannelColor, tier0_ps3 );
  53. SYS_LIB_EXPORT( LoggingSystem_GetNextChannelID, tier0_ps3 );
  54. SYS_LIB_EXPORT( LoggingSystem_GetChannelCount, tier0_ps3 );
  55. SYS_LIB_EXPORT( LoggingSystem_GetChannel, tier0_ps3 );
  56. SYS_LIB_EXPORT( LoggingSystem_GetFirstChannelID, tier0_ps3 );
  57. SYS_LIB_EXPORT( LoggingSystem_PushLoggingState, tier0_ps3 );
  58. SYS_LIB_EXPORT( LoggingSystem_PopLoggingState, tier0_ps3 );
  59. SYS_LIB_EXPORT( LoggingSystem_FindChannel, tier0_ps3 );
  60. SYS_LIB_EXPORT( LoggingSystem_Log, tier0_ps3 );
  61. SYS_LIB_EXPORTPICKUP_CPP_FUNC( "LoggingSystem_Log(int, LoggingSeverity_t, Color, char const*, ...)", tier0_ps3 );
  62. SYS_LIB_EXPORT( ShouldUseNewAssertDialog, tier0_ps3 );
  63. SYS_LIB_EXPORT( DoNewAssertDialog, tier0_ps3 );
  64. SYS_LIB_EXPORT( GetCPUInformation, tier0_ps3 );
  65. SYS_LIB_EXPORT( _ExitOnFatalAssert, tier0_ps3 );
  66. #if !defined( DBGFLAG_STRINGS_STRIP )
  67. SYS_LIB_EXPORT( COM_TimestampedLog, tier0_ps3 );
  68. #endif
  69. SYS_LIB_EXPORT( Plat_SetBenchmarkMode, tier0_ps3 );
  70. SYS_LIB_EXPORT( Plat_IsInDebugSession, tier0_ps3 );
  71. SYS_LIB_EXPORT( Plat_IsInBenchmarkMode, tier0_ps3 );
  72. SYS_LIB_EXPORT( Plat_FloatTime, tier0_ps3 );
  73. SYS_LIB_EXPORT( Plat_MSTime, tier0_ps3 );
  74. SYS_LIB_EXPORT( Plat_GetClockStart, tier0_ps3 );
  75. SYS_LIB_EXPORT( Plat_GetLocalTime, tier0_ps3 );
  76. SYS_LIB_EXPORT( Plat_ConvertToLocalTime, tier0_ps3 );
  77. SYS_LIB_EXPORT( Platform_gmtime, tier0_ps3 );
  78. SYS_LIB_EXPORT( Plat_timegm, tier0_ps3 );
  79. SYS_LIB_EXPORT( Plat_timezone, tier0_ps3 );
  80. SYS_LIB_EXPORT( Plat_daylight, tier0_ps3 );
  81. SYS_LIB_EXPORT( Plat_GetTimeString, tier0_ps3 );
  82. SYS_LIB_EXPORT( Plat_DebugString, tier0_ps3 );
  83. SYS_LIB_EXPORT( Plat_SetWindowTitle, tier0_ps3 );
  84. SYS_LIB_EXPORT( Plat_GetModuleFilename, tier0_ps3 );
  85. SYS_LIB_EXPORT( Plat_ExitProcess, tier0_ps3 );
  86. SYS_LIB_EXPORT( Plat_GetCommandLine, tier0_ps3 );
  87. SYS_LIB_EXPORT( CommandLine, tier0_ps3 );
  88. SYS_LIB_EXPORT( Plat_GetPagedPoolInfo, tier0_ps3 );
  89. SYS_LIB_EXPORT( Plat_GetMemPageSize, tier0_ps3 );
  90. SYS_LIB_EXPORT( _AssertValidStringPtr, tier0_ps3 );
  91. SYS_LIB_EXPORT( _AssertValidReadPtr, tier0_ps3 );
  92. SYS_LIB_EXPORT( _AssertValidWritePtr, tier0_ps3 );
  93. SYS_LIB_EXPORT( MemAllocScratch, tier0_ps3 );
  94. SYS_LIB_EXPORT( MemFreeScratch, tier0_ps3 );
  95. SYS_LIB_EXPORT( ZeroMemory, tier0_ps3 );
  96. #if !defined( DBGFLAG_STRINGS_STRIP )
  97. SYS_LIB_EXPORT( Msg, tier0_ps3 );
  98. SYS_LIB_EXPORT( Warning, tier0_ps3 );
  99. SYS_LIB_EXPORT( DevMsg, tier0_ps3 );
  100. SYS_LIB_EXPORTPICKUP_CPP_FUNC( "DevMsg(int, char const*, ...)", tier0_ps3 );
  101. SYS_LIB_EXPORT( DevWarning, tier0_ps3 );
  102. SYS_LIB_EXPORTPICKUP_CPP_FUNC( "DevWarning(int, char const*, ...)", tier0_ps3 );
  103. #endif
  104. SYS_LIB_EXPORT( Error, tier0_ps3 );
  105. #if !defined( DBGFLAG_STRINGS_STRIP )
  106. SYS_LIB_EXPORT( ConMsg, tier0_ps3 );
  107. SYS_LIB_EXPORT( ConDMsg, tier0_ps3 );
  108. SYS_LIB_EXPORT( ConColorMsg, tier0_ps3 );
  109. #endif
  110. SYS_LIB_EXPORT( ThreadSetAffinity, tier0_ps3 );
  111. SYS_LIB_EXPORT( ThreadGetCurrentId, tier0_ps3 );
  112. SYS_LIB_EXPORT( ThreadGetPriority, tier0_ps3 );
  113. SYS_LIB_EXPORT( ThreadSetPriority, tier0_ps3 );
  114. SYS_LIB_EXPORT( ThreadSetDebugName, tier0_ps3 );
  115. SYS_LIB_EXPORT( ThreadSleep, tier0_ps3 );
  116. SYS_LIB_EXPORT( ThreadInMainThread, tier0_ps3 );
  117. SYS_LIB_EXPORT( ThreadGetCurrentHandle, tier0_ps3 );
  118. SYS_LIB_EXPORT( ReleaseThreadHandle, tier0_ps3 );
  119. SYS_LIB_EXPORT( CreateSimpleThread, tier0_ps3 );
  120. SYS_LIB_EXPORT( SetThreadedLoadLibraryFunc, tier0_ps3 );
  121. SYS_LIB_EXPORT( GetThreadedLoadLibraryFunc, tier0_ps3 );
  122. SYS_LIB_EXPORT( ThreadJoin, tier0_ps3 );
  123. SYS_LIB_EXPORT( vtune, tier0_ps3 );
  124. SYS_LIB_EXPORT( PublishAllMiniProfilers, tier0_ps3 );
  125. SYS_LIB_EXPORT( RunTSQueueTests, tier0_ps3 );
  126. SYS_LIB_EXPORT( RunTSListTests, tier0_ps3 );
  127. SYS_LIB_EXPORT( GetVAtom, tier0_ps3 );
  128. // BEGIN PICKUP
  129. // You must run build_prxexport_snc.bat AFTER building tier0 to regenerate prxexport.c, and THEN rebuild tier0 again for the changes to take effect.
  130. // This is required to get C++ class exports working
  131. SYS_LIB_EXPORTPICKUP_CLASS( "CThreadSpinRWLock@", tier0_ps3 );
  132. SYS_LIB_EXPORTPICKUP_CLASS( "CThread@", tier0_ps3 );
  133. SYS_LIB_EXPORTPICKUP_CLASS( "CWorkerThread@", tier0_ps3 );
  134. SYS_LIB_EXPORTPICKUP_CLASS( "CVProfile@", tier0_ps3 );
  135. SYS_LIB_EXPORTPICKUP_CLASS( "CVProfNode@", tier0_ps3 );
  136. // END PICKUP
  137. SYS_LIB_EXPORT_VAR( g_pMemAllocInternalPS3, tier0_ps3 );
  138. SYS_LIB_EXPORT( GetCurThreadPS3, tier0_ps3 );
  139. SYS_LIB_EXPORT( SetCurThreadPS3, tier0_ps3 );
  140. SYS_LIB_EXPORT( AllocateThreadID, tier0_ps3 );
  141. SYS_LIB_EXPORT( FreeThreadID, tier0_ps3 );
  142. #ifdef VPROF_ENABLED
  143. SYS_LIB_EXPORT_VAR( g_VProfCurrentProfile, tier0_ps3 );
  144. SYS_LIB_EXPORT_VAR( g_VProfSignalSpike, tier0_ps3 );
  145. #endif
  146. SYS_LIB_EXPORT_VAR( g_ClockSpeed, tier0_ps3 );
  147. SYS_LIB_EXPORT_VAR( g_dwClockSpeed, tier0_ps3 );
  148. SYS_LIB_EXPORT_VAR( g_ClockSpeedMicrosecondsMultiplier, tier0_ps3 );
  149. SYS_LIB_EXPORT_VAR( g_ClockSpeedMillisecondsMultiplier, tier0_ps3 );
  150. SYS_LIB_EXPORT_VAR( g_ClockSpeedSecondsMultiplier, tier0_ps3 );
  151. // Event handling
  152. SYS_LIB_EXPORT( XBX_NotifyCreateListener, tier0_ps3 );
  153. SYS_LIB_EXPORT( XBX_QueueEvent, tier0_ps3 );
  154. SYS_LIB_EXPORT( XBX_ProcessEvents, tier0_ps3 );
  155. SYS_LIB_EXPORT( XBX_DispatchEventsQueue, tier0_ps3 );
  156. // Accessors
  157. SYS_LIB_EXPORT( XBX_GetLanguageString, tier0_ps3 );
  158. SYS_LIB_EXPORT( XBX_IsLocalized, tier0_ps3 );
  159. SYS_LIB_EXPORT( XBX_IsAudioLocalized, tier0_ps3 );
  160. SYS_LIB_EXPORT( XBX_GetNextSupportedLanguage, tier0_ps3 );
  161. SYS_LIB_EXPORT( XBX_IsRestrictiveLanguage, tier0_ps3 );
  162. SYS_LIB_EXPORT( XBX_GetImageChangelist, tier0_ps3 );
  163. //
  164. // Storage devices management
  165. //
  166. SYS_LIB_EXPORT( XBX_ResetStorageDeviceInfo, tier0_ps3 );
  167. SYS_LIB_EXPORT( XBX_DescribeStorageDevice, tier0_ps3 );
  168. SYS_LIB_EXPORT( XBX_MakeStorageContainerRoot, tier0_ps3 );
  169. SYS_LIB_EXPORT( XBX_GetStorageDeviceId, tier0_ps3 );
  170. SYS_LIB_EXPORT( XBX_SetStorageDeviceId, tier0_ps3 );
  171. //
  172. // Information about game primary user
  173. //
  174. SYS_LIB_EXPORT( XBX_GetPrimaryUserId, tier0_ps3 );
  175. SYS_LIB_EXPORT( XBX_SetPrimaryUserId, tier0_ps3 );
  176. SYS_LIB_EXPORT( XBX_GetPrimaryUserIsGuest, tier0_ps3 );
  177. SYS_LIB_EXPORT( XBX_SetPrimaryUserIsGuest, tier0_ps3 );
  178. //
  179. // Disabling and enabling input from controllers
  180. //
  181. SYS_LIB_EXPORT( XBX_ResetUserIdSlots, tier0_ps3 );
  182. SYS_LIB_EXPORT( XBX_ClearUserIdSlots, tier0_ps3 );
  183. //
  184. // Mapping between game slots and controllers
  185. //
  186. SYS_LIB_EXPORT( XBX_GetUserId, tier0_ps3 );
  187. SYS_LIB_EXPORT( XBX_GetSlotByUserId, tier0_ps3 );
  188. SYS_LIB_EXPORT( XBX_SetUserId, tier0_ps3 );
  189. SYS_LIB_EXPORT( XBX_ClearSlot, tier0_ps3 );
  190. SYS_LIB_EXPORT( XBX_ClearUserId, tier0_ps3 );
  191. SYS_LIB_EXPORT( XBX_GetUserIsGuest, tier0_ps3 );
  192. SYS_LIB_EXPORT( XBX_SetUserIsGuest, tier0_ps3 );
  193. //
  194. // Number of game users
  195. //
  196. SYS_LIB_EXPORT( XBX_GetNumGameUsers, tier0_ps3 );
  197. SYS_LIB_EXPORT( XBX_SetNumGameUsers, tier0_ps3 );
  198. //
  199. // Invite related functions
  200. //
  201. SYS_LIB_EXPORT( XBX_GetInviteSessionId, tier0_ps3 );
  202. SYS_LIB_EXPORT( XBX_SetInviteSessionId, tier0_ps3 );
  203. SYS_LIB_EXPORT( XBX_GetInvitedUserXuid, tier0_ps3 );
  204. SYS_LIB_EXPORT( XBX_SetInvitedUserXuid, tier0_ps3 );
  205. SYS_LIB_EXPORT( XBX_GetInvitedUserId, tier0_ps3 );
  206. SYS_LIB_EXPORT( XBX_SetInvitedUserId, tier0_ps3 );
  207. //
  208. // VXConsole
  209. //
  210. SYS_LIB_EXPORT( ValvePS3ConsoleInit, tier0_ps3 );
  211. SYS_LIB_EXPORT( ValvePS3ConsoleShutdown, tier0_ps3 );
  212. SYS_LIB_EXPORT_VAR( g_pValvePS3Console, tier0_ps3 );
  213. SYS_LIB_EXPORT( EncodeBinaryToString, tier0_ps3 );
  214. SYS_LIB_EXPORT( DecodeBinaryFromString, tier0_ps3 );
  215. // PS3 system info
  216. CPs3ContentPathInfo *g_pPS3PathInfo = NULL;
  217. SYS_LIB_EXPORT_VAR( g_pPS3PathInfo, tier0_ps3 );
  218. typedef void * ( *GetProcAddressFunc )( void *pUnused, const char *pFuncName );
  219. #ifndef _CERT
  220. TLSGlobals * ( *g_pfnElfGetTlsGlobals )();
  221. extern "C" TLSGlobals *GetTLSGlobals()
  222. {
  223. Assert( g_pfnElfGetTlsGlobals || !"Accessing TLS from global constructors? Illegal on PS3!" );
  224. return g_pfnElfGetTlsGlobals();
  225. }
  226. #endif
  227. extern "C"
  228. {
  229. void(*g_pfnPushMarker)( const char * pName );
  230. void(*g_pfnPopMarker)();
  231. void(*g_pfnSwapBufferMarker)();
  232. void (*g_snRawSPULockHandler) (void);
  233. void (*g_snRawSPUUnlockHandler) (void);
  234. void (*g_snRawSPUNotifyCreation) (unsigned int uID);
  235. void (*g_snRawSPUNotifyDestruction) (unsigned int uID);
  236. void (*g_snRawSPUNotifyElfLoad) (unsigned int uID, unsigned int uEntry, const char *pFileName);
  237. void (*g_snRawSPUNotifyElfLoadNoWait) (unsigned int uID, unsigned int uEntry, const char *pFileName);
  238. void (*g_snRawSPUNotifyElfLoadAbs) (unsigned int uID, unsigned int uEntry, const char *pFileName);
  239. void (*g_snRawSPUNotifyElfLoadAbsNoWait) (unsigned int uID, unsigned int uEntry, const char *pFileName);
  240. void (*g_snRawSPUNotifySPUStopped) (unsigned int uID);
  241. void (*g_snRawSPUNotifySPUStarted) (unsigned int uID);
  242. PS3_GcmSharedData *g_pGcmSharedData = NULL;
  243. };
  244. SYS_LIB_EXPORT_VAR( g_pfnPushMarker, tier0_ps3 );
  245. SYS_LIB_EXPORT_VAR( g_pfnPopMarker, tier0_ps3 );
  246. SYS_LIB_EXPORT_VAR( g_pfnSwapBufferMarker, tier0_ps3 );
  247. SYS_LIB_EXPORT_VAR( g_pGcmSharedData, tier0_ps3 );
  248. SYS_LIB_EXPORT_VAR( g_pPhysicsMiniProfilers, tier0_ps3 );
  249. SYS_LIB_EXPORT_VAR( g_pOtherMiniProfilers, tier0_ps3 );
  250. SYS_LIB_EXPORT_VAR( g_pLastMiniProfiler, tier0_ps3 );
  251. SYS_LIB_EXPORT_VAR( g_nMiniProfilerFrame, tier0_ps3 );
  252. SYS_LIB_EXPORT_VAR( g_snRawSPULockHandler , tier0_ps3 );
  253. SYS_LIB_EXPORT_VAR( g_snRawSPUUnlockHandler , tier0_ps3 );
  254. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyCreation , tier0_ps3 );
  255. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyDestruction , tier0_ps3 );
  256. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyElfLoad , tier0_ps3 );
  257. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyElfLoadNoWait , tier0_ps3 );
  258. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyElfLoadAbs , tier0_ps3 );
  259. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifyElfLoadAbsNoWait , tier0_ps3 );
  260. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifySPUStopped , tier0_ps3 );
  261. SYS_LIB_EXPORT_VAR( g_snRawSPUNotifySPUStarted , tier0_ps3 );
  262. PS3_PrxModuleEntry_t ** g_ppPrxModuleEntryList;
  263. extern "C" PS3_PrxModuleEntry_t ** PS3_PrxGetModulesList()
  264. {
  265. return g_ppPrxModuleEntryList;
  266. }
  267. static u32_t g_nCLNumber = 0;
  268. extern "C" u32_t XBX_GetImageChangelist()
  269. {
  270. return g_nCLNumber;
  271. }
  272. extern void VirtualMemoryManager_Shutdown();
  273. void Tier0_ShutdownCallback()
  274. {
  275. Warning( "[PS3 SYSTEM] TIER0 IS SHUTTING DOWN @ %.3f\n", Plat_FloatTime() );
  276. // Shutdown virtual memory
  277. VirtualMemoryManager_Shutdown();
  278. // Shutdown memory allocator hooks
  279. malloc_managed_size mms;
  280. mms.current_inuse_size = 0x12345678;
  281. mms.current_system_size = 0x09ABCDEF;
  282. mms.max_system_size = 0;
  283. (void) malloc_stats( &mms );
  284. }
  285. extern "C" int _tier0_ps3_prx_entry( unsigned int args, void *pArg )
  286. {
  287. Assert( args >= sizeof( PS3_LoadTier0_Parameters_t ) );
  288. PS3_LoadTier0_Parameters_t *pParams = reinterpret_cast< PS3_LoadTier0_Parameters_t * >( pArg );
  289. Assert( pParams->cbSize >= sizeof( PS3_LoadTier0_Parameters_t ) );
  290. // copy the launch time to use as the baseline time
  291. extern int64_t g_fiosLaunchTime;
  292. g_fiosLaunchTime = pParams->fiosLaunchTime;
  293. if ( pParams->ppPrxModulesList )
  294. {
  295. g_ppPrxModuleEntryList = pParams->ppPrxModulesList;
  296. }
  297. g_pPS3PathInfo = pParams->pPS3PathInfo;
  298. g_pfnPopMarker = pParams->pfnPopMarker;
  299. g_pfnPushMarker = pParams->pfnPushMarker;
  300. g_pfnSwapBufferMarker = pParams->pfnSwapBufferMarker;
  301. g_pGcmSharedData = pParams->m_pGcmSharedData;
  302. g_nCLNumber = pParams->nCLNumber;
  303. // snlilb.h
  304. #ifndef _CERT
  305. g_snRawSPULockHandler = pParams->snRawSPULockHandler;
  306. g_snRawSPUUnlockHandler = pParams->snRawSPUUnlockHandler;
  307. g_snRawSPUNotifyCreation = pParams->snRawSPUNotifyCreation;
  308. g_snRawSPUNotifyDestruction = pParams->snRawSPUNotifyDestruction;
  309. g_snRawSPUNotifyElfLoad = pParams->snRawSPUNotifyElfLoad;
  310. g_snRawSPUNotifyElfLoadNoWait = pParams->snRawSPUNotifyElfLoadNoWait;
  311. g_snRawSPUNotifyElfLoadAbs = pParams->snRawSPUNotifyElfLoadAbs;
  312. g_snRawSPUNotifyElfLoadAbsNoWait = pParams->snRawSPUNotifyElfLoadAbsNoWait;
  313. g_snRawSPUNotifySPUStopped = pParams->snRawSPUNotifySPUStopped;
  314. g_snRawSPUNotifySPUStarted = pParams->snRawSPUNotifySPUStarted;
  315. #endif
  316. // Return tier0 shutdown callback
  317. pParams->pfnTier0Shutdown = Tier0_ShutdownCallback;
  318. if ( pParams->pfnGetTlsGlobals )
  319. {
  320. #ifndef _CERT
  321. g_pfnElfGetTlsGlobals = pParams->pfnGetTlsGlobals;
  322. #else
  323. // Validate that TLS globals are located correctly in PRX
  324. // modules and main ELF binary:
  325. // See description of quick TLS access implementation in
  326. // memoverride.cpp comments
  327. if ( GetTLSGlobals() != pParams->pfnGetTlsGlobals() )
  328. Error( "<vitaliy>: TLS globals location mismatch!\n" );
  329. #endif
  330. }
  331. return SYS_PRX_RESIDENT;
  332. }
  333. extern "C" int _tier0_ps3_prx_exit( unsigned int args, void *pArg )
  334. {
  335. return SYS_PRX_STOP_OK;
  336. }
  337. void _tier0_ps3_prx_required_for_linking()
  338. {
  339. }