[LINT] Linted files + Added lint job to CI
This commit is contained in:
committed by
Radosław Gliński
parent
e8afad8f8a
commit
b9061e6292
@@ -686,12 +686,12 @@ dword_result_t XeKeysHmacShaUsingKey_entry(lpvoid_t obscured_key,
|
||||
}
|
||||
DECLARE_XBOXKRNL_EXPORT1(XeKeysHmacShaUsingKey, kNone, kImplemented);
|
||||
|
||||
//going off of usage in some hbrew xex
|
||||
//0 and 1 appear to be devkit, 2 is retail
|
||||
//we default to saying we're retail
|
||||
dword_result_t XeKeysGetConsoleType_entry(lpdword_t type_out) {
|
||||
*type_out = 2;
|
||||
return 0;
|
||||
// going off of usage in some hbrew xex
|
||||
// 0 and 1 appear to be devkit, 2 is retail
|
||||
// we default to saying we're retail
|
||||
dword_result_t XeKeysGetConsoleType_entry(lpdword_t type_out) {
|
||||
*type_out = 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_XBOXKRNL_EXPORT1(XeKeysGetConsoleType, kNone, kImplemented);
|
||||
|
||||
@@ -120,7 +120,7 @@ void HandleCppException(pointer_t<X_EXCEPTION_RECORD> record) {
|
||||
kernel_memory()->TranslateVirtual<x_s__CatchableTypeArray*>(
|
||||
throw_info->catchable_type_array_ptr);
|
||||
|
||||
//xe::debugging::Break();
|
||||
// xe::debugging::Break();
|
||||
XELOGE("Guest attempted to throw a C++ exception!");
|
||||
}
|
||||
|
||||
@@ -138,9 +138,10 @@ void RtlRaiseException_entry(pointer_t<X_EXCEPTION_RECORD> record) {
|
||||
|
||||
// TODO(benvanik): unwinding.
|
||||
// This is going to suck.
|
||||
// xe::debugging::Break();
|
||||
// xe::debugging::Break();
|
||||
|
||||
//RtlRaiseException definitely wasn't a noreturn function, we can return safe-ish
|
||||
// RtlRaiseException definitely wasn't a noreturn function, we can return
|
||||
// safe-ish
|
||||
XELOGE("Guest attempted to trigger a breakpoint!");
|
||||
}
|
||||
DECLARE_XBOXKRNL_EXPORT2(RtlRaiseException, kDebug, kStub, kImportant);
|
||||
|
||||
@@ -723,8 +723,9 @@ dword_result_t IoCreateDevice_entry(dword_t driver_object,
|
||||
}
|
||||
DECLARE_XBOXKRNL_EXPORT1(IoCreateDevice, kFileSystem, kStub);
|
||||
|
||||
//supposed to invoke a callback on the driver object! its some sort of destructor function
|
||||
//intended to be called for all devices created from the driver
|
||||
// supposed to invoke a callback on the driver object! its some sort of
|
||||
// destructor function intended to be called for all devices created from the
|
||||
// driver
|
||||
void IoDeleteDevice_entry(dword_t device_ptr, const ppc_context_t& ctx) {
|
||||
if (device_ptr) {
|
||||
auto kernel_mem = ctx->kernel_state->memory();
|
||||
|
||||
@@ -697,7 +697,7 @@ DECLARE_XBOXKRNL_EXPORT1(ExAllocatePool, kMemory, kImplemented);
|
||||
|
||||
void xeFreePool(PPCContext* context, uint32_t base_address) {
|
||||
auto memory = context->kernel_state->memory();
|
||||
//if 4kb aligned, there is no pool header!
|
||||
// if 4kb aligned, there is no pool header!
|
||||
if ((base_address & (4096 - 1)) == 0) {
|
||||
memory->SystemHeapFree(base_address);
|
||||
} else {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
namespace xboxkrnl {
|
||||
|
||||
uint32_t xeMmAllocatePhysicalMemoryEx(uint32_t flags, uint32_t region_size,
|
||||
|
||||
@@ -132,7 +132,7 @@ uint32_t xeObCreateObject(X_OBJECT_TYPE* object_factory,
|
||||
return X_STATUS_OBJECT_NAME_INVALID;
|
||||
}
|
||||
// the object and its name are all created in a single allocation
|
||||
|
||||
|
||||
unsigned int aligned_object_size =
|
||||
xe::align<uint32_t>(object_size_without_headers, 4);
|
||||
{
|
||||
|
||||
@@ -434,9 +434,11 @@ pointer_result_t RtlImageNtHeader_entry(lpvoid_t module) {
|
||||
}
|
||||
DECLARE_XBOXKRNL_EXPORT1(RtlImageNtHeader, kNone, kImplemented);
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-imagedirectoryentrytodata
|
||||
dword_result_t RtlImageDirectoryEntryToData_entry(dword_t Base, dword_t MappedAsImage_,
|
||||
word_t DirectoryEntry, dword_t Size,
|
||||
const ppc_context_t& ctx) {
|
||||
dword_result_t RtlImageDirectoryEntryToData_entry(dword_t Base,
|
||||
dword_t MappedAsImage_,
|
||||
word_t DirectoryEntry,
|
||||
dword_t Size,
|
||||
const ppc_context_t& ctx) {
|
||||
bool MappedAsImage = static_cast<unsigned char>(MappedAsImage_);
|
||||
uint32_t aligned_base = Base;
|
||||
if ((Base & 1) != 0) {
|
||||
@@ -830,7 +832,7 @@ static void RtlRip_entry(const ppc_context_t& ctx) {
|
||||
|
||||
XELOGE("RtlRip called, arg1 = {}, arg2 = {}\n", msg_str1, msg_str2);
|
||||
|
||||
//we should break here... not sure what to do exactly
|
||||
// we should break here... not sure what to do exactly
|
||||
}
|
||||
DECLARE_XBOXKRNL_EXPORT1(RtlRip, kNone, kImportant);
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ uint32_t xeNtQueueApcThread(uint32_t thread_handle, uint32_t apc_routine,
|
||||
void xeKfLowerIrql(PPCContext* ctx, unsigned char new_irql);
|
||||
unsigned char xeKfRaiseIrql(PPCContext* ctx, unsigned char new_irql);
|
||||
|
||||
void xeKeKfReleaseSpinLock(PPCContext* ctx, X_KSPINLOCK* lock, uint32_t old_irql, bool change_irql=true);
|
||||
void xeKeKfReleaseSpinLock(PPCContext* ctx, X_KSPINLOCK* lock,
|
||||
uint32_t old_irql, bool change_irql = true);
|
||||
uint32_t xeKeKfAcquireSpinLock(PPCContext* ctx, X_KSPINLOCK* lock,
|
||||
bool change_irql = true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user