mirror of
https://github.com/ps5-payload-dev/sdk.git
synced 2026-10-23 20:03:32 -05:00
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
/* Copyright (C) 2023 John Törnblom
|
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by the
|
|
Free Software Foundation; either version 3, or (at your option) any
|
|
later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; see the file COPYING. If not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef PS5SDK_KERNEL_H
|
|
#define PS5SDK_KERNEL_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
extern const intptr_t KERNEL_ADDRESS_DATA_BASE;
|
|
extern const intptr_t KERNEL_ADDRESS_ALLPROC;
|
|
|
|
// Proc field offsets
|
|
extern const off_t KERNEL_OFFSET_PROC_P_UCRED;
|
|
extern const off_t KERNEL_OFFSET_PROC_P_PID;
|
|
|
|
// Ucred field offsets
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_UID;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_RUID;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_SVUID;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_RGID;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_SCEAUTHID;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_SCECAPS0;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_SCECAPS1;
|
|
extern const off_t KERNEL_OFFSET_UCRED_CR_SCEATTR0;
|
|
|
|
uint32_t kernel_get_fw_version(void);
|
|
|
|
int32_t kernel_copyin(const void *udaddr, intptr_t kaddr, size_t len);
|
|
int32_t kernel_copyout(const intptr_t kaddr, void *udaddr, size_t len);
|
|
|
|
intptr_t kernel_get_ucred(pid_t pid);
|
|
intptr_t kernel_get_proc(pid_t pid);
|
|
|
|
uint64_t kernel_get_proc_authid(pid_t pid);
|
|
int32_t kernel_set_proc_authid(pid_t pid, uint64_t authid);
|
|
|
|
#endif // PS5SDK_KERNEL_H
|