pspkernel.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  * pspkernel.h - Main include file that includes all major kernel headers.
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: pspkernel.h 1207 2005-10-23 05:50:29Z mrbrown $
00013  */
00014 
00015 #ifndef PSPKERNEL_H
00016 #define PSPKERNEL_H
00017 
00018 #include <pspuser.h>
00019 #include <pspiofilemgr_kernel.h>
00020 #include <psploadcore.h>
00021 #include <pspstdio_kernel.h>
00022 #include <pspsysreg.h>
00023 #include <pspkdebug.h>
00024 #include <pspintrman_kernel.h>
00025 #include <pspmodulemgr_kernel.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00038 #define pspKernelSetKernelPC()  \
00039 {     \
00040         __asm__ volatile (      \
00041         "la     $8, 1f\n\t"     \
00042         "lui    $9, 0x8000\n\t" \
00043         "or     $8, $9\n\t"     \
00044         "jr     $8\n\t"         \
00045         " nop\n\t"              \
00046         "1:\n\t"                \
00047         : : : "$8", "$9");      \
00048         sceKernelIcacheClearAll(); \
00049 }
00050 
00055 #define pspKernelSetUserPC()  \
00056 {     \
00057         __asm__ volatile (      \
00058         "la     $8, 1f\n\t"     \
00059         "li     $9, 0x7FFFFFFF\n\t" \
00060         "and    $8, $9\n\t"     \
00061         "jr     $8\n\t"         \
00062         " nop\n\t"              \
00063         "1:\n\t"                \
00064         : : : "$8", "$9");      \
00065         sceKernelIcacheClearAll(); \
00066 }
00067 
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071 
00072 #endif /* PSPKERNEL_H */

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