ipc_common.h

00001 /*
00002         libbroadway - A general purpose library to control the Wii.
00003         Common IPC definition
00004 
00005 Copyright (C) 2008, 2009        Haxx Enterprises <bushing@gmail.com>
00006 Copyright (C) 2008, 2009        Hector Martin "marcan" <marcan@marcansoft.com>
00007 Copyright (C) 2009              Andre Heider "dhewg" <dhewg@wiibrew.org>
00008 Copyright (C) 2009              John Kelley <wiidev@kelley.ca>
00009 Copyright (C) 2008, 2009        Sven Peter <svenpeter@gmail.com>
00010 Copyright (C) 2010              Alex Marshall <trap15@raidenii.net>
00011 
00012 # This code is licensed to you under the terms of the GNU GPL, version 2;
00013 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
00014 */
00015 
00016 #ifndef __IPC_COMMON_H__
00017 #define __IPC_COMMON_H__
00018 
00019 /* For the sake of interface compatibility between mini and powerpc code,
00020    you should try to commit any enhancements you make back upstream so
00021    that they can be assigned a standard request number.  Otherwise, if
00022    you are creating a new device, you MUST assign it a device ID >= 0x80.
00023 
00024    Likewise, if you add functionality to any of the existing drivers,
00025    your must assign it to a request ID >= 0x8000.  This will prevent
00026    problems if a mismatch between ARM and PPC code occurs.  Similarly,
00027    if you add functions, you should always add them to the end, to
00028    prevent someone from calling the wrong function.
00029 
00030    Even still, you are encouraged to add in sanity checks and version
00031    checking to prevent strange bugs or even data loss.  --bushing */
00032 
00033 #define MINIMUM_MINI_VERSION    (0x00010004)
00034 
00035 #define IPC_FAST                0x01
00036 #define IPC_SLOW                0x00
00037 
00038 #define IPC_DEV_SYS             0x00
00039 #define IPC_DEV_NAND            0x01
00040 #define IPC_DEV_SDHC            0x02
00041 #define IPC_DEV_KEYS            0x03
00042 #define IPC_DEV_AES             0x04
00043 #define IPC_DEV_BOOT2           0x05
00044 #define IPC_DEV_PPC             0x06
00045 #define IPC_DEV_SDMMC           0x07
00046 
00047 #define IPC_DEV_SLAVE           0x80
00048 //#define IPC_DEV_USER1         0x81
00049 
00050 #define IPC_SYS_PING            0x0000
00051 #define IPC_SYS_JUMP            0x0001
00052 #define IPC_SYS_GETVERS         0x0002
00053 #define IPC_SYS_GETGITS         0x0003
00054 #define IPC_SYS_WRITE32         0x0100
00055 #define IPC_SYS_WRITE16         0x0101
00056 #define IPC_SYS_WRITE8          0x0102
00057 #define IPC_SYS_READ32          0x0103
00058 #define IPC_SYS_READ16          0x0104
00059 #define IPC_SYS_READ8           0x0105
00060 #define IPC_SYS_SET32           0x0106
00061 #define IPC_SYS_SET16           0x0107
00062 #define IPC_SYS_SET8            0x0108
00063 #define IPC_SYS_CLEAR32         0x0109
00064 #define IPC_SYS_CLEAR16         0x010a
00065 #define IPC_SYS_CLEAR8          0x010b
00066 #define IPC_SYS_MASK32          0x010c
00067 #define IPC_SYS_MASK16          0x010d
00068 #define IPC_SYS_MASK8           0x010e
00069 
00070 #define IPC_NAND_RESET          0x0000
00071 #define IPC_NAND_GETID          0x0001
00072 #define IPC_NAND_READ           0x0002
00073 #define IPC_NAND_WRITE          0x0003
00074 #define IPC_NAND_ERASE          0x0004
00075 #define IPC_NAND_STATUS         0x0005
00076 #define IPC_NAND_SETMINPAGE     0x0006
00077 #define IPC_NAND_GETMINPAGE     0x0007
00078 //#define IPC_NAND_USER0        0x8000
00079 //#define IPC_NAND_USER1        0x8001
00080 // etc.
00081 
00082 #define IPC_SDHC_DISCOVER       0x0000
00083 #define IPC_SDHC_EXIT           0x0001
00084 
00085 #define IPC_SDMMC_ACK           0x0000
00086 #define IPC_SDMMC_READ          0x0001
00087 #define IPC_SDMMC_WRITE         0x0002
00088 #define IPC_SDMMC_STATE         0x0003
00089 #define IPC_SDMMC_SIZE          0x0004
00090 
00091 #define IPC_KEYS_GETOTP         0x0000
00092 #define IPC_KEYS_GETEEP         0x0001
00093 
00094 #define IPC_AES_RESET           0x0000
00095 #define IPC_AES_SETIV           0x0001
00096 #define IPC_AES_SETKEY          0x0002
00097 #define IPC_AES_DECRYPT         0x0003
00098 
00099 #define IPC_BOOT2_RUN           0x0000
00100 #define IPC_BOOT2_TMD           0x0001
00101 
00102 #define IPC_PPC_BOOT            0x0000
00103 #define IPC_PPC_BOOT_FILE       0x0001
00104 
00105 #define IPC_SLAVE_LOAD          0x0000
00106 #define IPC_SLAVE_EXECUTE       0x0001
00107 #define IPC_SLAVE_RESULTS       0x0002
00108 #define IPC_SLAVE_PARAMS        0x0003
00109 #define IPC_SLAVE_EXECUTING     0x0004
00110 
00111 #define IPC_CODE(f,d,r)         (((f)<<24)|((d)<<16)|(r))
00112 
00113 #endif
00114 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3