early-access version 3786

This commit is contained in:
pineappleEA
2023-08-01 12:33:00 +02:00
parent 04f356bb47
commit 2fafeb5013
25 changed files with 187 additions and 215 deletions

View File

@@ -102,9 +102,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
handle_debug_buffer(info1, info2);
auto* const current_thread = GetCurrentThreadPointer(system.Kernel());
const auto thread_processor_id = current_thread->GetActiveCore();
system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace();
system.GetCurrentArmInterface().LogBacktrace();
}
if (system.DebuggerEnabled()) {

View File

@@ -38,7 +38,7 @@ Result ReplyAndReceiveLight64From32(Core::System& system, Handle session_handle,
template <typename F>
static void SvcWrap_LightIpc(Core::System& system, F&& cb) {
auto& core = system.CurrentArmInterface();
auto& core = system.GetCurrentArmInterface();
std::array<u32, 7> arguments{};
Handle session_handle = static_cast<Handle>(core.GetReg(0));

View File

@@ -11,7 +11,7 @@ namespace Kernel::Svc {
/// Get which CPU core is executing the current thread
int32_t GetCurrentProcessorNumber(Core::System& system) {
LOG_TRACE(Kernel_SVC, "called");
return static_cast<int32_t>(system.CurrentPhysicalCore().CoreIndex());
return static_cast<int32_t>(system.CurrentPhysicalCore().GetCoreIndex());
}
int32_t GetCurrentProcessorNumber64(Core::System& system) {

View File

@@ -23,7 +23,7 @@ void CallSecureMonitor64From32(Core::System& system, ilp32::SecureMonitorArgumen
// Custom ABI for CallSecureMonitor.
void SvcWrap_CallSecureMonitor64(Core::System& system) {
auto& core = system.CurrentPhysicalCore().ArmInterface();
auto& core = system.GetCurrentArmInterface();
lp64::SecureMonitorArguments args{};
for (int i = 0; i < 8; i++) {
args.r[i] = core.GetReg(i);
@@ -37,7 +37,7 @@ void SvcWrap_CallSecureMonitor64(Core::System& system) {
}
void SvcWrap_CallSecureMonitor64From32(Core::System& system) {
auto& core = system.CurrentPhysicalCore().ArmInterface();
auto& core = system.GetCurrentArmInterface();
ilp32::SecureMonitorArguments args{};
for (int i = 0; i < 8; i++) {
args.r[i] = static_cast<u32>(core.GetReg(i));

View File

@@ -93,8 +93,6 @@ Result StartThread(Core::System& system, Handle thread_handle) {
/// Called when a thread exits
void ExitThread(Core::System& system) {
LOG_DEBUG(Kernel_SVC, "called, pc=0x{:08X}", system.CurrentArmInterface().GetPC());
auto* const current_thread = GetCurrentThreadPointer(system.Kernel());
system.GlobalSchedulerContext().RemoveThread(current_thread);
current_thread->Exit();