|
ReXGlue SDK
|
#include <cstring>#include <rex/platform.h>#include <rex/types.h>#include <rex/kernel/types/status.h>#include <rex/kernel/types/thread.h>#include <rex/ppc/context.h>#include <rex/kernel/object/kernel_thread.h>#include <rex/kernel/types/list.h>#include <rex/memory.h>#include <rex/title.h>Go to the source code of this file.
Classes | |
| struct | rex::kernel::X_VIDEO_MODE |
Namespaces | |
| namespace | rex |
| namespace | rex::kernel |
Functions | |
| void | rex::kernel::xboxkrnl::RtlInitializeCriticalSection (X_RTL_CRITICAL_SECTION *cs) |
| X_STATUS | rex::kernel::xboxkrnl::RtlInitializeCriticalSectionAndSpinCount (X_RTL_CRITICAL_SECTION *cs, u32 spin_count) |
| u32 | rex::kernel::xboxkrnl::NtSetEvent (u32 handle, be_u32 *previous_state_ptr) |
| u32 | rex::kernel::xboxkrnl::NtClearEvent (u32 handle) |
| u32 | rex::kernel::xboxkrnl::NtWaitForMultipleObjectsEx (u32 count, be_u32 *handles, u32 wait_type, u32 wait_mode, u32 alertable, u64 *timeout_ptr) |
| u32 | rex::kernel::xboxkrnl::KeWaitForSingleObject (u32 object_address, u32 wait_reason, u32 processor_mode, u32 alertable, u64 *timeout_ptr) |
| u32 | rex::kernel::xboxkrnl::KeSetEvent (u32 event_address, u32 increment, u32 wait) |
| u32 | rex::kernel::xboxkrnl::KeKfAcquireSpinLock (rex::kernel::GuestAddressSpace &memory, PPCContext *ctx, rex::kernel::X_KSPINLOCK *lock, bool change_irql=true) |
| void | rex::kernel::xboxkrnl::KeKfReleaseSpinLock (rex::kernel::GuestAddressSpace &memory, PPCContext *ctx, rex::kernel::X_KSPINLOCK *lock, u32 old_irql, bool change_irql=true) |
| void | rex::kernel::xboxkrnl::KeInitializeApc (rex::kernel::XAPC *apc, u32 thread_ptr, u32 kernel_routine, u32 rundown_routine, u32 normal_routine, u32 apc_mode, u32 normal_context) |
| u32 | rex::kernel::xboxkrnl::KeInsertQueueApc (rex::kernel::GuestAddressSpace &memory, rex::kernel::XAPC *apc, u32 arg1, u32 arg2, u32 priority_increment, PPCContext *ctx) |
| void | rex::kernel::FillXVideoMode (const VideoMode &mode, X_VIDEO_MODE &out) |
| void | rex::kernel::xboxkrnl::VdQueryVideoMode (kernel::X_VIDEO_MODE *video_mode) |
Xenia : Xbox 360 Emulator Research Project *
Copyright 2013 Ben Vanik. All rights reserved. * Copyright 2015 Ben Vanik. All rights reserved. * Released under the BSD license - see LICENSE in the root for more details. *
| void rex::kernel::xboxkrnl::KeInitializeApc | ( | rex::kernel::XAPC * | apc, |
| u32 | thread_ptr, | ||
| u32 | kernel_routine, | ||
| u32 | rundown_routine, | ||
| u32 | normal_routine, | ||
| u32 | apc_mode, | ||
| u32 | normal_context ) |
Initializes an APC object in guest memory.
| apc | The APC to initialize. |
| normal_routine | Guest address of the normal routine, or 0 for a kernel APC. |
| apc_mode | The processor mode, used only when a normal routine is given. |
| normal_context | Context passed to the normal routine, used only when one is given. |
| u32 rex::kernel::xboxkrnl::KeInsertQueueApc | ( | rex::kernel::GuestAddressSpace & | memory, |
| rex::kernel::XAPC * | apc, | ||
| u32 | arg1, | ||
| u32 | arg2, | ||
| u32 | priority_increment, | ||
| PPCContext * | ctx ) |
Queues an APC on its target thread.
| apc | The APC to queue. |
| arg1 | First system argument passed to the APC routines. |
| arg2 | Second system argument passed to the APC routines. |
| priority_increment | Priority boost, ignored. |
| ctx | Calling context. Its r13 holds the PCR address. |
| u32 rex::kernel::xboxkrnl::KeKfAcquireSpinLock | ( | rex::kernel::GuestAddressSpace & | memory, |
| PPCContext * | ctx, | ||
| rex::kernel::X_KSPINLOCK * | lock, | ||
| bool | change_irql = true ) |
Acquires a spinlock stored in guest memory.
| ctx | Calling context. Its r13 holds the PCR address. |
| change_irql | True to raise the IRQL while the lock is held. |
| void rex::kernel::xboxkrnl::KeKfReleaseSpinLock | ( | rex::kernel::GuestAddressSpace & | memory, |
| PPCContext * | ctx, | ||
| rex::kernel::X_KSPINLOCK * | lock, | ||
| u32 | old_irql, | ||
| bool | change_irql = true ) |
Releases a spinlock stored in guest memory.
| ctx | Calling context. Its r13 holds the PCR address. |
| old_irql | The IRQL returned by KeKfAcquireSpinLock. |
| change_irql | True to restore the IRQL. |
| u32 rex::kernel::xboxkrnl::KeSetEvent | ( | u32 | event_address, |
| u32 | increment, | ||
| u32 | wait ) |
Signals an event object in guest memory.
| increment | Priority boost, ignored. |
| wait | Whether the caller waits next, ignored. |
| u32 rex::kernel::xboxkrnl::KeWaitForSingleObject | ( | u32 | object_address, |
| u32 | wait_reason, | ||
| u32 | processor_mode, | ||
| u32 | alertable, | ||
| u64 * | timeout_ptr ) |
Waits on a kernel object in guest memory.
| alertable | Nonzero when a user APC can interrupt the wait. |
| timeout_ptr | The timeout in 100 ns units, or null to wait indefinitely. |
| u32 rex::kernel::xboxkrnl::NtClearEvent | ( | u32 | handle | ) |
Sets an event to the nonsignaled state.
| u32 rex::kernel::xboxkrnl::NtSetEvent | ( | u32 | handle, |
| be_u32 * | previous_state_ptr ) |
Signals an event.
| previous_state_ptr | Receives the previous signal state, or null to skip. |
| u32 rex::kernel::xboxkrnl::NtWaitForMultipleObjectsEx | ( | u32 | count, |
| be_u32 * | handles, | ||
| u32 | wait_type, | ||
| u32 | wait_mode, | ||
| u32 | alertable, | ||
| u64 * | timeout_ptr ) |
Waits on several handles at once.
| wait_type | 0 to wait for all handles, 1 to wait for any handle. |
| alertable | Nonzero when a user APC can interrupt the wait. |
| timeout_ptr | The timeout in 100 ns units, or null to wait indefinitely. |
| X_STATUS rex::kernel::xboxkrnl::RtlInitializeCriticalSectionAndSpinCount | ( | X_RTL_CRITICAL_SECTION * | cs, |
| u32 | spin_count ) |
Initializes a critical section in guest memory with a spin count.
| spin_count | The spin count, stored in units of 256 and capped at 255 units. |
| void rex::kernel::xboxkrnl::VdQueryVideoMode | ( | kernel::X_VIDEO_MODE * | video_mode | ) |
Fills a video mode structure from the runtime display settings.
| video_mode | Receives the video mode. |