Add more wrapper functions to ppc_context_t in kernel, want to switch…
… over to referencing state through ppc_context as much as possible, it'll make implementing things like kernel processes much easier in the future Move forward definitions of kernel types into kernel_fwd.h Stub implementation of XamLoaderGetMediaInfoEx Partially implement XamSetDashContext implement XamGetDashContext Stub implementation of XamUserIsUnsafeProgrammingAllowed Stub implementation of XamUserGetSubscriptionType Expanded the supported object types for ObReferenceObjectByHandle and wrapped the logic for encoding the type in a constexpr function ObReferenceObjectByName was taking lpstring_t for first param, but the function actually takes X_ANSI_STRING ptr NtReleaseMutant actually does not return anything from KeReleaseMutant, it just checks the handle and returns whether it was invalid. Changed the raise/lower irql functions to just set the irql on the pcr instead of setting it on field of Processor, processor is a shared object and irql is per-thread Semi-stub implementation of KeGetImagePageTableEntry. I locked at it in the HV and got it so the values are in the same range the HV returns + actually reflect the page & memory range, but i doubt its equal to the values the hv returns on real hw. Used by modern dashboards, don't know for what. Log error message for ObDereferenceObject w/ null ptr. Allocate a special fixed page that dashboards reference, currently don't know what the data on that page is supposed to be. Add current_irql field to X_KPCR Added Device object member of XObject::Type enum Added some notes about other gpu registers, found a table of register names and indices in xam
This commit is contained in:
@@ -475,7 +475,7 @@ dword_result_t XamSwapDisc_entry(
|
||||
completion_event();
|
||||
return X_ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
auto filesystem = kernel_state()->file_system();
|
||||
auto mount_path = "\\Device\\LauncherData";
|
||||
|
||||
@@ -498,6 +498,14 @@ dword_result_t XamSwapDisc_entry(
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamSwapDisc, kContent, kSketchy);
|
||||
|
||||
dword_result_t XamLoaderGetMediaInfoEx_entry(dword_t unk1, dword_t unk2,
|
||||
lpdword_t unk3) {
|
||||
*unk3 = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_XAM_EXPORT1(XamLoaderGetMediaInfoEx, kContent, kStub);
|
||||
|
||||
} // namespace xam
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
@@ -529,6 +529,22 @@ dword_result_t XamShowCommunitySessionsUI_entry(unknown_t r3, unknown_t r4) {
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowCommunitySessionsUI, kNone, kStub);
|
||||
|
||||
// this is supposed to do a lot more, calls another function that triggers some
|
||||
// cbs
|
||||
dword_result_t XamSetDashContext_entry(dword_t value,
|
||||
const ppc_context_t& ctx) {
|
||||
ctx->kernel_state->dash_context_ = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_XAM_EXPORT1(XamSetDashContext, kNone, kImplemented);
|
||||
|
||||
dword_result_t XamGetDashContext_entry(const ppc_context_t& ctx) {
|
||||
return ctx->kernel_state->dash_context_;
|
||||
}
|
||||
|
||||
DECLARE_XAM_EXPORT1(XamGetDashContext, kNone, kImplemented);
|
||||
|
||||
} // namespace xam
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
@@ -808,6 +808,28 @@ dword_result_t XamSessionRefObjByHandle_entry(dword_t handle,
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamSessionRefObjByHandle, kUserProfiles, kStub);
|
||||
|
||||
dword_result_t XamUserIsUnsafeProgrammingAllowed_entry(dword_t unk1, dword_t unk2,
|
||||
lpdword_t unk3, dword_t unk4,
|
||||
dword_t unk5, dword_t unk6) {
|
||||
if (!unk3 || unk1 != 255 && unk1 >= 4) {
|
||||
return 87;
|
||||
}
|
||||
*unk3 = 1;
|
||||
return 0;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserIsUnsafeProgrammingAllowed, kUserProfiles, kStub);
|
||||
|
||||
dword_result_t XamUserGetSubscriptionType_entry(dword_t user_index, dword_t unk2,
|
||||
dword_t unk3, dword_t unk4,
|
||||
dword_t unk5, dword_t unk6) {
|
||||
if (!unk2 || !unk3 || user_index > 4) {
|
||||
return 0x80070057;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserGetSubscriptionType, kUserProfiles, kStub);
|
||||
|
||||
} // namespace xam
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
Reference in New Issue
Block a user