Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions relating to GC authentication #833

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions db/360/SceSblGcAuthMgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ modules:
SceSblGcAuthMgr:
nid: 0xDB1A9016
libraries:
SceSblGcAuthMgrDrmBBForDriver:
nid: 0x1926B182
kernel: true
functions:
ksceSblGcAuthMgrDrmBBClearCartSecret: 0xBB451E83
ksceSblGcAuthMgrDrmBBGetCartSecret: 0xBB70DDC0
SceSblGcAuthMgrGcAuthForDriver:
nid: 0xC6627F5E
kernel: true
functions:
ksceSblGcAuthMgrGcAuthCartAuthentication: 0x68781760
SceSblGcAuthMgr:
kernel: false
nid: 0x7B13BCF7
Expand Down
3 changes: 3 additions & 0 deletions docs/definitions.dox
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
*
* \defgroup SceSblSsComm SM Loader
* Interface for sm loading/CallFunc
*
* \defgroup SceSblGcAuthMgr game cart Authentication Manager
* Interface for authentication with game carts
* \}
*
* \defgroup update Update
Expand Down
13 changes: 13 additions & 0 deletions include/psp2kern/kernel/gcauthmgr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr.h}
*/


#ifndef _PSP2KERN_KERNEL_GCAUTHMGR_H_
#define _PSP2KERN_KERNEL_GCAUTHMGR_H_

#include <psp2kern/kernel/gcauthmgr/drm_bb.h>
#include <psp2kern/kernel/gcauthmgr/gc_auth.h>

#endif /* _PSP2KERN_KERNEL_GCAUTHMGR_H_ */
35 changes: 35 additions & 0 deletions include/psp2kern/kernel/gcauthmgr/drm_bb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr/drm_bb.h,SceSblGcAuthMgrDrmBBForDriver_stub}
*/

#ifndef __PSP2KERN_GCAUTHMGR_DRM_BB_H__
#define __PSP2KERN_GCAUTHMGR_DRM_BB_H__

#include <psp2kern/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Removes derived cart secret from memory.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrDrmBBClearCartSecret(void);

/**
* @brief Gets derived cart secret from memory.
*
* @param[in] secret - Pointer to 0x20 bytes.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrDrmBBGetCartSecret(void* secret);

#ifdef __cplusplus
}
#endif

#endif /* __PSP2KERN_GCAUTHMGR_DRM_BB_H__ */
28 changes: 28 additions & 0 deletions include/psp2kern/kernel/gcauthmgr/gc_auth.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* \kernelgroup{SceSblGcAuthMgr}
* \usage{psp2kern/kernel/gcauthmgr/gc_auth.h,SceSblGcAuthMgrGcAuthForDriver_stub}
*/

#ifndef __PSP2KERN_GCAUTHMGR_GC_AUTH_H__
#define __PSP2KERN_GCAUTHMGR_GC_AUTH_H__

#include <psp2kern/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Runs gamecart authentication
*
* @param[in] key_id - Not used for anything but must be < 0x10000.
*
* @return 0 on success, < 0 on error.
*/
int ksceSblGcAuthMgrGcAuthCartAuthentication(SceUInt32 key_id);

#ifdef __cplusplus
}
#endif

#endif /* __PSP2KERN_GCAUTHMGR_GC_AUTH_H__ */
1 change: 1 addition & 0 deletions include/vitasdkkern.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <psp2kern/kernel/dipsw.h>
#include <psp2kern/kernel/dmac.h>
#include <psp2kern/kernel/excpmgr.h>
#include <psp2kern/kernel/gcauthmgr.h>
#include <psp2kern/kernel/intrmgr.h>
#include <psp2kern/kernel/iofilemgr.h>
#include <psp2kern/kernel/modulemgr.h>
Expand Down