mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-09 10:10:01 +01:00
iodev: add kayman/reg device stub
This commit is contained in:
parent
f6369c710a
commit
d0d22529f9
|
|
@ -48,6 +48,7 @@ add_executable(rpcsx-os
|
|||
iodev/sshot.cpp
|
||||
iodev/lvdctl.cpp
|
||||
iodev/icc_power.cpp
|
||||
iodev/cayman_reg.cpp
|
||||
|
||||
main.cpp
|
||||
backtrace.cpp
|
||||
|
|
|
|||
|
|
@ -48,3 +48,4 @@ IoDevice *createSrtcCharacterDevice();
|
|||
IoDevice *createScreenShotCharacterDevice();
|
||||
IoDevice *createLvdCtlCharacterDevice();
|
||||
IoDevice *createIccPowerCharacterDevice();
|
||||
IoDevice *createCaymanRegCharacterDevice();
|
||||
|
|
|
|||
39
rpcsx-os/iodev/cayman_reg.cpp
Normal file
39
rpcsx-os/iodev/cayman_reg.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/file.hpp"
|
||||
#include "orbis/thread/Thread.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
|
||||
struct CaymanRegDevice : IoDevice {
|
||||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path,
|
||||
std::uint32_t flags, std::uint32_t mode,
|
||||
orbis::Thread *thread) override;
|
||||
};
|
||||
|
||||
static orbis::ErrorCode cayman_reg_ioctl(orbis::File *file,
|
||||
std::uint64_t request, void *argp,
|
||||
orbis::Thread *thread) {
|
||||
ORBIS_LOG_FATAL("Unhandled cayman_reg ioctl", request);
|
||||
thread->where();
|
||||
return {};
|
||||
}
|
||||
|
||||
static const orbis::FileOps fileOps = {
|
||||
.ioctl = cayman_reg_ioctl,
|
||||
};
|
||||
|
||||
orbis::ErrorCode CaymanRegDevice::open(orbis::Ref<orbis::File> *file,
|
||||
const char *path, std::uint32_t flags,
|
||||
std::uint32_t mode,
|
||||
orbis::Thread *thread) {
|
||||
auto newFile = orbis::knew<orbis::File>();
|
||||
newFile->ops = &fileOps;
|
||||
newFile->device = this;
|
||||
|
||||
*file = newFile;
|
||||
return {};
|
||||
}
|
||||
|
||||
IoDevice *createCaymanRegCharacterDevice() {
|
||||
return orbis::knew<CaymanRegDevice>();
|
||||
}
|
||||
|
|
@ -474,6 +474,7 @@ static void ps4InitDev() {
|
|||
rx::vfs::addDevice("lvdctl", createLvdCtlCharacterDevice());
|
||||
rx::vfs::addDevice("lvd0", createHddCharacterDevice(0x100000000));
|
||||
rx::vfs::addDevice("icc_power", createIccPowerCharacterDevice());
|
||||
rx::vfs::addDevice("cayman/reg", createCaymanRegCharacterDevice());
|
||||
|
||||
// mbus->emitEvent({
|
||||
// .system = 2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue