mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-29 18:08:08 +00:00
[hle, kernel] Add support for FW21 and kernel changes (#3004)
- Adapts kernel changes from atmosphere for firmware 21.0.0.
- Fixes launch error of firmware 21.0.0 applets.
- Adds new commands for `prepo` (New `SaveSystemReport` & `SaveSystemReportWithUser`).
- Adds new commands for `IReadOnlyApplicationControlDataInterface` (cmd 19; incomplete!)
- Adds `{12010, nullptr, "SetButtonConfigLeft"},` undocumented IHidServer.
- Adds new commands for `ngc:u` (`Mask2` and `Check2`)
- Adds new commands for system settings server (GetHttpAuthConfig) for webapplet
- Removes incompatible firmware popup warning.
Signed-off-by: lizzie lizzie@eden-emu.dev
Co-authored by: maufeat sahyno1996@gmail.com
Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: JPikachu <jpikachu.eden@gmail.com>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3004
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -99,6 +99,12 @@ enum class DpcFlag : u32 {
|
||||
Terminated = (1 << 1),
|
||||
};
|
||||
|
||||
enum class ExceptionFlag : u8 {
|
||||
IsCallingSvc = 1 << 0,
|
||||
InExceptionHandler = 1 << 1,
|
||||
};
|
||||
DECLARE_ENUM_FLAG_OPERATORS(ExceptionFlag);
|
||||
|
||||
enum class ThreadWaitReasonForDebugging : u32 {
|
||||
None, ///< Thread is not waiting
|
||||
Sleep, ///< Thread is waiting due to a SleepThread SVC
|
||||
@@ -153,7 +159,7 @@ public:
|
||||
|
||||
/**
|
||||
* Sets the thread's current priority.
|
||||
* @param priority The new priority.
|
||||
* @param value The new priority.
|
||||
*/
|
||||
void SetPriority(s32 value) {
|
||||
m_priority = value;
|
||||
@@ -340,6 +346,8 @@ public:
|
||||
void SetInterruptFlag();
|
||||
void ClearInterruptFlag();
|
||||
|
||||
void UpdateTlsThreadCpuTime(s64 switch_tick);
|
||||
|
||||
KThread* GetLockOwner() const;
|
||||
|
||||
const KAffinityMask& GetAffinityMask() const {
|
||||
@@ -446,6 +454,7 @@ public:
|
||||
bool is_pinned;
|
||||
s32 disable_count;
|
||||
KThread* cur_thread;
|
||||
std::atomic<u8> exception_flags{0};
|
||||
};
|
||||
|
||||
StackParameters& GetStackParameters() {
|
||||
@@ -456,6 +465,16 @@ public:
|
||||
return m_stack_parameters;
|
||||
}
|
||||
|
||||
void SetExceptionFlag(ExceptionFlag flag) {
|
||||
GetStackParameters().exception_flags.fetch_or(static_cast<u8>(flag), std::memory_order_relaxed);
|
||||
}
|
||||
void ClearExceptionFlag(ExceptionFlag flag) {
|
||||
GetStackParameters().exception_flags.fetch_and(static_cast<u8>(~static_cast<u8>(flag)), std::memory_order_relaxed);
|
||||
}
|
||||
bool IsExceptionFlagSet(ExceptionFlag flag) const {
|
||||
return (GetStackParameters().exception_flags.load(std::memory_order_relaxed) & static_cast<u8>(flag)) != 0;
|
||||
}
|
||||
|
||||
class QueueEntry {
|
||||
public:
|
||||
constexpr QueueEntry() = default;
|
||||
@@ -511,10 +530,12 @@ public:
|
||||
|
||||
void SetInExceptionHandler() {
|
||||
this->GetStackParameters().is_in_exception_handler = true;
|
||||
SetExceptionFlag(ExceptionFlag::InExceptionHandler);
|
||||
}
|
||||
|
||||
void ClearInExceptionHandler() {
|
||||
this->GetStackParameters().is_in_exception_handler = false;
|
||||
ClearExceptionFlag(ExceptionFlag::InExceptionHandler);
|
||||
}
|
||||
|
||||
bool IsInExceptionHandler() const {
|
||||
@@ -523,10 +544,12 @@ public:
|
||||
|
||||
void SetIsCallingSvc() {
|
||||
this->GetStackParameters().is_calling_svc = true;
|
||||
SetExceptionFlag(ExceptionFlag::IsCallingSvc);
|
||||
}
|
||||
|
||||
void ClearIsCallingSvc() {
|
||||
this->GetStackParameters().is_calling_svc = false;
|
||||
ClearExceptionFlag(ExceptionFlag::IsCallingSvc);
|
||||
}
|
||||
|
||||
bool IsCallingSvc() const {
|
||||
|
||||
Reference in New Issue
Block a user