mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
Partially replace printf with ORBIS_LOG
This commit is contained in:
parent
de973e369f
commit
1550bfc7b1
|
|
@ -1024,6 +1024,7 @@ inline const std::string opcodeToString(int op) {
|
|||
inline void dumpShader(const std::uint32_t *data) {
|
||||
int hackExit = 0;
|
||||
|
||||
flockfile(stdout);
|
||||
while (true) {
|
||||
auto instHex = *data;
|
||||
bool isEnd = instHex == 0xBF810000 || instHex == 0xBE802000;
|
||||
|
|
@ -1042,6 +1043,7 @@ inline void dumpShader(const std::uint32_t *data) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
funlockfile(stdout);
|
||||
}
|
||||
|
||||
enum BlendMultiplier {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "bridge.hpp"
|
||||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include "vm.hpp"
|
||||
#include <cinttypes>
|
||||
#include <cstddef>
|
||||
|
|
@ -94,12 +95,12 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
// flip control
|
||||
auto args = reinterpret_cast<FlipControlArgs *>(argp);
|
||||
|
||||
std::printf("dce: FlipControl(%d, %lx, %p, %lx)\n", args->id, args->arg2,
|
||||
args->ptr, args->size);
|
||||
ORBIS_LOG_NOTICE("dce: FlipControl", args->id, args->arg2, args->ptr,
|
||||
args->size);
|
||||
|
||||
if (args->id == 6) { // set flip rate?
|
||||
std::printf("dce: FlipControl(set flip rate, %lx, %p, %lx)\n", args->arg2,
|
||||
args->ptr, args->size);
|
||||
ORBIS_LOG_NOTICE("dce: FlipControl: set flip rate", args->arg2, args->ptr,
|
||||
args->size);
|
||||
} else if (args->id == 10) {
|
||||
if (args->size != sizeof(FlipControlStatus)) {
|
||||
return 0;
|
||||
|
|
@ -128,17 +129,17 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
status->x = 0;
|
||||
status->y = 0;
|
||||
} else if (args->id == 9) {
|
||||
std::printf("dce: FlipControl allocate(%u, %lx, %p, %lx)\n", args->id,
|
||||
args->arg2, args->ptr, args->size);
|
||||
ORBIS_LOG_NOTICE("dce: FlipControl allocate", args->id, args->arg2,
|
||||
args->ptr, args->size);
|
||||
*(std::uint64_t *)args->ptr = 0; // dev offset
|
||||
*(std::uint64_t *)args->size = 0x100000; // size
|
||||
} else if (args->id == 31) {
|
||||
bufferInUsePtr = (std::uint64_t *)args->size;
|
||||
std::printf("flipStatusPtr = %p\n", bufferInUsePtr);
|
||||
ORBIS_LOG_NOTICE("flipStatusPtr: ", bufferInUsePtr);
|
||||
return 0;
|
||||
} else if (args->id != 0 && args->id != 1) { // used during open/close
|
||||
std::printf("dce: UNIMPLEMENTED FlipControl(%u, %lx, %p, %lx)\n",
|
||||
args->id, args->arg2, args->ptr, args->size);
|
||||
ORBIS_LOG_NOTICE("dce: UNIMPLEMENTED FlipControl", args->id, args->arg2,
|
||||
args->ptr, args->size);
|
||||
|
||||
std::fflush(stdout);
|
||||
__builtin_trap();
|
||||
|
|
@ -148,12 +149,12 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
if (request == 0xc0308206) {
|
||||
auto args = reinterpret_cast<RegisterBuffer *>(argp);
|
||||
std::fprintf(stderr, "dce: RegisterBuffer(%lx, %lx, %lx, %lx)\n",
|
||||
args->attributeIndex, args->index, args->address, args->unk);
|
||||
ORBIS_LOG_ERROR("dce: RegisterBuffer", args->attributeIndex, args->index,
|
||||
args->address, args->unk);
|
||||
|
||||
if (args->index >= std::size(rx::bridge.header->buffers)) {
|
||||
// TODO
|
||||
std::fprintf(stderr, "dce: out of buffers!\n");
|
||||
ORBIS_LOG_FATAL("dce: out of buffers!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -171,16 +172,11 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
if (request == 0xc0308207) { // SCE_SYS_DCE_IOCTL_REGISTER_BUFFER_ATTRIBUTE
|
||||
auto args = reinterpret_cast<RegisterBufferAttributeArgs *>(argp);
|
||||
|
||||
std::fprintf(
|
||||
stderr,
|
||||
"dce: RegisterBufferAttributes(unk0=%lx, unk1=%x, unk2_flag=%x, "
|
||||
"unk3=%x, "
|
||||
"pixelFormat=%x, tilingMode=%x, pitch=%u, width=%u, "
|
||||
"height=%u, "
|
||||
"unk4_zero=%x, unk5_zero=%x, unk6=%x, unk7_-1=%lx, unk8=%x)\n",
|
||||
args->unk0, args->unk1, args->unk2_flag, args->unk3, args->pixelFormat,
|
||||
args->tilingMode, args->pitch, args->width, args->height,
|
||||
args->unk4_zero, args->unk5_zero, args->unk6, args->unk7, args->unk8);
|
||||
ORBIS_LOG_ERROR("dce: RegisterBufferAttributes", args->unk0, args->unk1,
|
||||
args->unk2_flag, args->unk3, args->pixelFormat,
|
||||
args->tilingMode, args->pitch, args->width, args->height,
|
||||
args->unk4_zero, args->unk5_zero, args->unk6, args->unk7,
|
||||
args->unk8);
|
||||
|
||||
dceInstance->bufferAttributes.pixelFormat = args->pixelFormat;
|
||||
dceInstance->bufferAttributes.tilingMode = args->tilingMode;
|
||||
|
|
@ -194,14 +190,9 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
// flip request
|
||||
auto args = reinterpret_cast<FlipRequestArgs *>(argp);
|
||||
|
||||
std::fprintf(
|
||||
stderr,
|
||||
"dce: FlipRequestArgs(%lx, displayBufferIndex = %x, flipMode = %lx, "
|
||||
"flipArg = %lx, "
|
||||
"%x, %x, %x, "
|
||||
"%x)\n",
|
||||
args->arg1, args->displayBufferIndex, args->flipMode, args->flipArg,
|
||||
args->arg5, args->arg6, args->arg7, args->arg8);
|
||||
ORBIS_LOG_ERROR("dce: FlipRequestArgs", args->arg1,
|
||||
args->displayBufferIndex, args->flipMode, args->flipArg,
|
||||
args->arg5, args->arg6, args->arg7, args->arg8);
|
||||
|
||||
rx::bridge.sendFlip(args->displayBufferIndex,
|
||||
/*args->flipMode,*/ args->flipArg);
|
||||
|
|
@ -213,7 +204,7 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
if (args->displayBufferIndex != -1) {
|
||||
if (bufferInUsePtr) {
|
||||
auto ptr = bufferInUsePtr + args->displayBufferIndex;
|
||||
std::printf(" ========== fill status to %p\n", ptr);
|
||||
ORBIS_LOG_NOTICE(" ========== fill status to:", ptr);
|
||||
*ptr = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -222,11 +213,11 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
if (request == 0x80088209) { // deallocate?
|
||||
auto arg = *reinterpret_cast<std::uint64_t *>(argp);
|
||||
std::fprintf(stderr, "dce: 0x80088209(%lx)\n", arg);
|
||||
ORBIS_LOG_ERROR("dce: 0x80088209", arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled dce ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled dce ioctl", request);
|
||||
std::fflush(stdout);
|
||||
__builtin_trap();
|
||||
return 0;
|
||||
|
|
@ -235,8 +226,7 @@ static std::int64_t dce_instance_ioctl(IoDeviceInstance *instance,
|
|||
static void *dce_instance_mmap(IoDeviceInstance *instance, void *address,
|
||||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
std::fprintf(stderr, "dce mmap: address=%p, size=%lx, offset=%lx\n", address,
|
||||
size, offset);
|
||||
ORBIS_LOG_FATAL("dce mmap", address, size, offset);
|
||||
return rx::vm::map(address, size, prot, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
struct DipswDevice : public IoDevice {};
|
||||
|
|
@ -9,7 +10,7 @@ struct DipswInstance : public IoDeviceInstance {};
|
|||
static std::int64_t dipsw_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
if (request == 0x40048806) { // is connected?
|
||||
std::fprintf(stderr, "dipsw ioctl 0x40048806(%p)\n", argp);
|
||||
ORBIS_LOG_ERROR("dipsw ioctl 0x40048806", argp);
|
||||
|
||||
*reinterpret_cast<std::uint32_t *>(argp) = 0;
|
||||
return 0;
|
||||
|
|
@ -19,7 +20,7 @@ static std::int64_t dipsw_instance_ioctl(IoDeviceInstance *instance,
|
|||
// 0x40088809
|
||||
|
||||
if (request == 0x40088808) {
|
||||
std::fprintf(stderr, "dipsw ioctl 0x40088808(%p)\n", argp);
|
||||
ORBIS_LOG_ERROR("dipsw ioctl 0x40088808", argp);
|
||||
*reinterpret_cast<std::uint32_t *>(argp) = 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -33,13 +34,12 @@ static std::int64_t dipsw_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr, "dipsw ioctl 0x8010880a(0x%lx, 0x%lx)\n",
|
||||
args->address, args->size);
|
||||
ORBIS_LOG_ERROR("dipsw ioctl 0x8010880a", args->address, args->size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled dipsw ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled dipsw ioctl", request);
|
||||
std::fflush(stdout);
|
||||
//__builtin_trap();
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include "vm.hpp"
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
|
@ -30,12 +31,12 @@ static std::int64_t dmem_instance_ioctl(IoDeviceInstance *instance,
|
|||
auto device = static_cast<DmemDevice *>(instance->device.get());
|
||||
switch (request) {
|
||||
case 0x4008800a: // get size
|
||||
std::fprintf(stderr, "dmem%u getTotalSize(%p)\n", device->index, argp);
|
||||
ORBIS_LOG_ERROR("dmem getTotalSize", device->index, argp);
|
||||
*(std::uint64_t *)argp = dmemSize;
|
||||
return 0;
|
||||
|
||||
case 0xc0208016: // get avaiable size
|
||||
std::fprintf(stderr, "dmem%u getAvaiableSize(%p)\n", device->index, argp);
|
||||
ORBIS_LOG_ERROR("dmem getAvaiableSize", device->index, argp);
|
||||
*(std::uint64_t *)argp = dmemSize - device->nextOffset;
|
||||
return 0;
|
||||
|
||||
|
|
@ -44,12 +45,9 @@ static std::int64_t dmem_instance_ioctl(IoDeviceInstance *instance,
|
|||
auto alignedOffset =
|
||||
(device->nextOffset + args->alignment - 1) & ~(args->alignment - 1);
|
||||
|
||||
std::fprintf(
|
||||
stderr,
|
||||
"dmem%u allocateDirectMemory(searchStart = %lx, searchEnd = %lx, len "
|
||||
"= %lx, alignment = %lx, memoryType = %x) -> 0x%lx\n",
|
||||
device->index, args->searchStart, args->searchEnd, args->len,
|
||||
args->alignment, args->memoryType, alignedOffset);
|
||||
ORBIS_LOG_ERROR("dmem allocateDirectMemory", device->index,
|
||||
args->searchStart, args->searchEnd, args->len,
|
||||
args->alignment, args->memoryType, alignedOffset);
|
||||
|
||||
if (alignedOffset + args->len > dmemSize) {
|
||||
return -1;
|
||||
|
|
@ -68,19 +66,16 @@ static std::int64_t dmem_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(
|
||||
stderr, "TODO: dmem%u releaseDirectMemory(address=0x%lx, size=0x%lx)\n",
|
||||
device->index, args->address, args->size);
|
||||
ORBIS_LOG_TODO("dmem releaseDirectMemory", device->index, args->address,
|
||||
args->size);
|
||||
// std::fflush(stdout);
|
||||
//__builtin_trap();
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled dmem%u ioctl %lx\n",
|
||||
static_cast<DmemDevice *>(instance->device.get())->index,
|
||||
request);
|
||||
|
||||
ORBIS_LOG_FATAL("Unhandled dmem ioctl", device->index, request);
|
||||
return 0;
|
||||
|
||||
std::fflush(stdout);
|
||||
|
|
@ -94,12 +89,10 @@ static void *dmem_instance_mmap(IoDeviceInstance *instance, void *address,
|
|||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
auto device = static_cast<DmemDevice *>(instance->device.get());
|
||||
std::fprintf(stderr, "WARNING: dmem%u mmap %lx -> %lx\n", device->index,
|
||||
offset, device->memBeginAddress + offset);
|
||||
auto target = device->memBeginAddress + offset;
|
||||
ORBIS_LOG_WARNING("dmem mmap", device->index, offset, target);
|
||||
|
||||
auto addr =
|
||||
rx::vm::map(reinterpret_cast<void *>(device->memBeginAddress + offset),
|
||||
size, prot, flags);
|
||||
auto addr = rx::vm::map(reinterpret_cast<void *>(target), size, prot, flags);
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "bridge.hpp"
|
||||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <atomic>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
|
@ -27,7 +28,7 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
switch (request) {
|
||||
case 0xc008811b: // get submit done flag ptr?
|
||||
// TODO
|
||||
std::fprintf(stderr, "gc ioctl 0xc008811b(%lx)\n", *(std::uint64_t *)argp);
|
||||
ORBIS_LOG_ERROR("gc ioctl 0xc008811b", *(std::uint64_t *)argp);
|
||||
*reinterpret_cast<void **>(argp) = &g_submitDoneFlag;
|
||||
return 0;
|
||||
|
||||
|
|
@ -40,8 +41,8 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr, "gc ioctl 0xc0108102(%x, %x, %p)\n", args->arg0,
|
||||
args->count, args->cmds);
|
||||
flockfile(stderr);
|
||||
ORBIS_LOG_ERROR("gc ioctl 0xc0108102", args->arg0, args->count, args->cmds);
|
||||
|
||||
for (int i = 0; i < args->count; ++i) {
|
||||
auto cmd = args->cmds + (i * 2);
|
||||
|
|
@ -62,6 +63,7 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
rx::bridge.sendCommandBuffer(cmdId, address, size);
|
||||
}
|
||||
funlockfile(stderr);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -74,8 +76,7 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr, "gc ioctl 0xc0088101(%x, %x)\n", args->arg0,
|
||||
args->arg1);
|
||||
ORBIS_LOG_ERROR("gc ioctl 0xc0088101\n", args->arg0, args->arg1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -90,8 +91,9 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr, "gc ioctl 0xc020810c(%x, %x, %p, %lx, %x)\n",
|
||||
args->arg0, args->count, args->cmds, args->arg3, args->arg4);
|
||||
flockfile(stderr);
|
||||
ORBIS_LOG_ERROR("gc ioctl 0xc020810c", args->arg0, args->count, args->cmds,
|
||||
args->arg3, args->arg4);
|
||||
|
||||
for (int i = 0; i < args->count; ++i) {
|
||||
auto cmd = args->cmds + (i * 2);
|
||||
|
|
@ -112,13 +114,14 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
rx::bridge.sendCommandBuffer(cmdId, address, size);
|
||||
}
|
||||
funlockfile(stderr);
|
||||
|
||||
// orbis::bridge.sendDoFlip();
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xc0048116: {
|
||||
std::fprintf(stderr, "gc ioctl 0xc0048116(%x)\n", *(std::uint32_t *)argp);
|
||||
ORBIS_LOG_ERROR("gc ioctl 0xc0048116", *(std::uint32_t *)argp);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -131,9 +134,8 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
};
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr,
|
||||
"gc ioctl set gs ring sizes: arg1=0x%x, arg2=0x%x, unk=0x%x\n",
|
||||
args->arg1, args->arg2, args->unk);
|
||||
ORBIS_LOG_ERROR("gc ioctl set gs ring sizes", args->arg1, args->arg2,
|
||||
args->unk);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -145,10 +147,8 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
std::uint32_t arg3;
|
||||
};
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
std::fprintf(
|
||||
stderr,
|
||||
"gc ioctl stats report control(unk=%x,arg1=%x,arg2=%x,arg3=%x)\n",
|
||||
args->unk, args->arg1, args->arg2, args->arg3);
|
||||
ORBIS_LOG_ERROR("gc ioctl stats report control", args->unk, args->arg1,
|
||||
args->arg2, args->arg3);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -159,8 +159,7 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
};
|
||||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
std::fprintf(stderr, "gc ioctl stats mask(arg1=%lx,arg2=%lx)\n", args->arg1,
|
||||
args->arg2);
|
||||
ORBIS_LOG_ERROR("gc ioctl stats mask", args->arg1, args->arg2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -178,13 +177,9 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
|
||||
std::fprintf(stderr,
|
||||
"gc ioctl map compute queue(pipeHi=%x, pipeLo=%x, queueId=%x, "
|
||||
"queuePipe=%x, ringBaseAddress=%lx, readPtrAddress=%lx, "
|
||||
"unkPtr=%lx, count=%u)\n",
|
||||
args->pipeHi, args->pipeLo, args->queueId, args->queuePipe,
|
||||
args->ringBaseAddress, args->readPtrAddress, args->dingDongPtr,
|
||||
args->count);
|
||||
ORBIS_LOG_ERROR("gc ioctl map compute queue", args->pipeHi, args->pipeLo,
|
||||
args->queueId, args->queuePipe, args->ringBaseAddress,
|
||||
args->readPtrAddress, args->dingDongPtr, args->count);
|
||||
|
||||
args->pipeHi = 0x769c766;
|
||||
args->pipeLo = 0x72e8e3c1;
|
||||
|
|
@ -209,11 +204,8 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
};
|
||||
|
||||
auto args = reinterpret_cast<Args *>(argp);
|
||||
std::fprintf(
|
||||
stderr,
|
||||
"gc ioctl ding dong for workload(pipeHi=%x, pipeLo=%x, queueId=%x, "
|
||||
"nextStartOffsetInDw=%x)\n",
|
||||
args->pipeHi, args->pipeLo, args->queueId, args->nextStartOffsetInDw);
|
||||
ORBIS_LOG_ERROR("gc ioctl ding dong for workload", args->pipeHi,
|
||||
args->pipeLo, args->queueId, args->nextStartOffsetInDw);
|
||||
|
||||
// TODO: implement
|
||||
|
||||
|
|
@ -222,19 +214,19 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
|
||||
case 0xc0048114: {
|
||||
// SetWaveLimitMultipliers
|
||||
std::fprintf(stderr, "***WARNING*** Unknown gc ioctl_%lx(0x%lx)\n", request,
|
||||
(unsigned long)*(std::uint32_t *)argp);
|
||||
ORBIS_LOG_WARNING("Unknown gc ioctl", request,
|
||||
(unsigned long)*(std::uint32_t *)argp);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xc004811f: {
|
||||
std::fprintf(stderr, "***WARNING*** Unknown gc ioctl_%lx(0x%lx)\n", request,
|
||||
(unsigned long)*(std::uint32_t *)argp);
|
||||
ORBIS_LOG_WARNING("Unknown gc ioctl", request,
|
||||
(unsigned long)*(std::uint32_t *)argp);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled gc ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled gc ioctl", request);
|
||||
std::fflush(stdout);
|
||||
__builtin_trap();
|
||||
break;
|
||||
|
|
@ -245,7 +237,7 @@ static std::int64_t gc_instance_ioctl(IoDeviceInstance *instance,
|
|||
static void *gc_instance_mmap(IoDeviceInstance *instance, void *address,
|
||||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled gc mmap %lx\n", offset);
|
||||
ORBIS_LOG_FATAL("Unhandled gc mmap", offset);
|
||||
|
||||
return rx::vm::map(address, size, prot, flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include "vm.hpp"
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
|
@ -9,8 +10,7 @@ struct HidInstance : public IoDeviceInstance {};
|
|||
|
||||
static std::int64_t hid_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hid ioctl %" PRIx64 "\n",
|
||||
request);
|
||||
ORBIS_LOG_FATAL("Unhandled hid ioctl", request);
|
||||
|
||||
// 0x800c4802
|
||||
return 0;
|
||||
|
|
@ -19,7 +19,7 @@ static std::int64_t hid_instance_ioctl(IoDeviceInstance *instance,
|
|||
static void *hid_instance_mmap(IoDeviceInstance *instance, void *address,
|
||||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hid mmap %" PRIx64 "\n", offset);
|
||||
ORBIS_LOG_FATAL("Unhandled hid mmap", offset);
|
||||
return rx::vm::map(address, size, prot, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
struct Hmd3daDevice : public IoDevice {};
|
||||
|
|
@ -9,7 +10,7 @@ struct Hmd3daInstance : public IoDeviceInstance {};
|
|||
static std::int64_t hmd_3da_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hmd_3da ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled hmd_3da ioctl", request);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
struct HmdCmdDevice : public IoDevice {};
|
||||
|
|
@ -9,7 +10,7 @@ struct HmdCmdInstance : public IoDeviceInstance {};
|
|||
static std::int64_t hmd_cmd_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hmd_cmd ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled hmd_cmd ioctl", request);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include "vm.hpp"
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
|
@ -11,7 +12,7 @@ struct HmdMmapInstance : public IoDeviceInstance {};
|
|||
static std::int64_t hmd_mmap_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hmd_mmap ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled hmd_mmap ioctl", request);
|
||||
std::fflush(stdout);
|
||||
__builtin_trap();
|
||||
return -1;
|
||||
|
|
@ -20,7 +21,7 @@ static std::int64_t hmd_mmap_instance_ioctl(IoDeviceInstance *instance,
|
|||
static void *hmd_mmap_instance_mmap(IoDeviceInstance *instance, void *address,
|
||||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hmd_mmap mmap %lx\n", offset);
|
||||
ORBIS_LOG_FATAL("Unhandled hmd_mmap mmap", offset);
|
||||
return rx::vm::map(address, size, prot, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
struct HmdSnsrDevice : public IoDevice {};
|
||||
|
|
@ -8,8 +9,7 @@ struct HmdSnsrInstance : public IoDeviceInstance {};
|
|||
|
||||
static std::int64_t smd_snr_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled hmd_snsr ioctl %lx\n", request);
|
||||
ORBIS_LOG_FATAL("Unhandled hmd_snsr ioctl", request);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include "vm.hpp"
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
|
@ -9,15 +10,14 @@ struct RngInstance : public IoDeviceInstance {};
|
|||
|
||||
static std::int64_t rng_instance_ioctl(IoDeviceInstance *instance,
|
||||
std::uint64_t request, void *argp) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled rng ioctl %" PRIx64 "\n",
|
||||
request);
|
||||
ORBIS_LOG_FATAL("Unhandled rng ioctl", request);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *rng_instance_mmap(IoDeviceInstance *instance, void *address,
|
||||
std::uint64_t size, std::int32_t prot,
|
||||
std::int32_t flags, std::int64_t offset) {
|
||||
std::fprintf(stderr, "***ERROR*** Unhandled rng mmap %" PRIx64 "\n", offset);
|
||||
ORBIS_LOG_FATAL("Unhandled rng mmap", offset);
|
||||
return rx::vm::map(address, size, prot, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue