-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rpcsx-os] stub aout, av_control, hdmi, mbus_av, scanin devices
- Loading branch information
Showing
9 changed files
with
177 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/file.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct AoutFile : orbis::File {}; | ||
|
||
static orbis::ErrorCode aout_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
|
||
ORBIS_LOG_FATAL("Unhandled aout ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps fileOps = { | ||
.ioctl = aout_ioctl, | ||
}; | ||
|
||
struct AoutDevice : IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override { | ||
auto newFile = orbis::knew<AoutFile>(); | ||
newFile->ops = &fileOps; | ||
newFile->device = this; | ||
|
||
*file = newFile; | ||
return {}; | ||
} | ||
}; | ||
|
||
IoDevice *createAoutCharacterDevice() { return orbis::knew<AoutDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/file.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct AVControlFile : orbis::File {}; | ||
|
||
static orbis::ErrorCode av_control_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
|
||
ORBIS_LOG_FATAL("Unhandled av_control ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps fileOps = { | ||
.ioctl = av_control_ioctl, | ||
}; | ||
|
||
struct AVControlDevice : IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override { | ||
auto newFile = orbis::knew<AVControlFile>(); | ||
newFile->ops = &fileOps; | ||
newFile->device = this; | ||
|
||
*file = newFile; | ||
return {}; | ||
} | ||
}; | ||
|
||
IoDevice *createAVControlCharacterDevice() { return orbis::knew<AVControlDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/file.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct HDMIFile : orbis::File {}; | ||
|
||
static orbis::ErrorCode hdmi_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
|
||
ORBIS_LOG_FATAL("Unhandled hdmi ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps fileOps = { | ||
.ioctl = hdmi_ioctl, | ||
}; | ||
|
||
struct HDMIDevice : IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override { | ||
auto newFile = orbis::knew<HDMIFile>(); | ||
newFile->ops = &fileOps; | ||
newFile->device = this; | ||
|
||
*file = newFile; | ||
return {}; | ||
} | ||
}; | ||
|
||
IoDevice *createHDMICharacterDevice() { return orbis::knew<HDMIDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/file.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct MBusAVFile : orbis::File {}; | ||
|
||
static orbis::ErrorCode mbus_av_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
|
||
ORBIS_LOG_FATAL("Unhandled mbus_av ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps fileOps = { | ||
.ioctl = mbus_av_ioctl, | ||
}; | ||
|
||
struct MBusAVDevice : IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override { | ||
auto newFile = orbis::knew<MBusAVFile>(); | ||
newFile->ops = &fileOps; | ||
newFile->device = this; | ||
|
||
*file = newFile; | ||
return {}; | ||
} | ||
}; | ||
|
||
IoDevice *createMBusAVCharacterDevice() { return orbis::knew<MBusAVDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/file.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct ScaninFile : orbis::File {}; | ||
|
||
static orbis::ErrorCode scanin_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
|
||
ORBIS_LOG_FATAL("Unhandled scanin ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps fileOps = { | ||
.ioctl = scanin_ioctl, | ||
}; | ||
|
||
struct ScaninDevice : IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override { | ||
auto newFile = orbis::knew<ScaninFile>(); | ||
newFile->ops = &fileOps; | ||
newFile->device = this; | ||
|
||
*file = newFile; | ||
return {}; | ||
} | ||
}; | ||
|
||
IoDevice *createScaninCharacterDevice() { return orbis::knew<ScaninDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters