psploadcore.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * psploadcore.h - Interface to LoadCoreForKernel.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: psploadcore.h 1095 2005-09-27 21:02:16Z jim $
00013  */
00014 
00015 #ifndef PSPLOADCORE_H
00016 #define PSPLOADCORE_H
00017 
00018 #include <pspkerneltypes.h>
00019 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00029 
00031 typedef struct SceModule {
00032         struct SceModule        *next;
00033         unsigned short          attribute;
00034         unsigned char           version[2];
00035         char                            modname[27];
00036         char                            terminal;
00037         unsigned int            unknown1;
00038         unsigned int            unknown2;
00039         SceUID                          modid;
00040         unsigned int            unknown3[4];
00041         void *                          ent_top;
00042         unsigned int            ent_size;
00043         void *                          stub_top;
00044         unsigned int            stub_size;
00045         unsigned int            unknown4[4];
00046         unsigned int            entry_addr;
00047         unsigned int            gp_value;
00048         unsigned int            text_addr;
00049         unsigned int            text_size;
00050         unsigned int            data_size;
00051         unsigned int            bss_size;
00052         unsigned int            nsegment;
00053         unsigned int            segmentaddr[4];
00054         unsigned int            segmentsize[4];
00055 } SceModule;
00056 
00059 typedef struct SceLibraryEntryTable {
00061         const char *            libname;
00063         unsigned char           version[2];
00065         unsigned short          attribute;
00067         unsigned char           len;
00069         unsigned char           vstubcount;
00071         unsigned short          stubcount;
00074         void *                          entrytable;
00075 } SceLibraryEntryTable;
00076 
00079 typedef struct SceLibraryStubTable {
00080         /* The name of the library we're importing from. */
00081         const char *            libname;
00083         unsigned char           version[2];
00084         /* Import attributes. */
00085         unsigned short          attribute;
00087         unsigned char           len;
00089         unsigned char           vstubcount;
00091         unsigned short          stubcount;
00093         unsigned int *          nidtable;
00095         void *                          stubtable;
00097         void *                          vstubtable;
00098 } SceLibraryStubTable;
00099 
00100 
00108 SceModule * sceKernelFindModuleByName(const char *modname);
00109 
00117 SceModule * sceKernelFindModuleByAddress(unsigned int addr);
00118 
00126 SceModule * sceKernelFindModuleByUID(SceUID modid);
00127 
00133 int sceKernelModuleCount(void);
00134 
00138 void sceKernelIcacheClearAll(void);
00139 
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145 
00146 #endif /* PSPLOADCORE_H */

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2