Skip to content

Instantly share code, notes, and snippets.

View neobrain's full-sized avatar

Tony Wasserka neobrain

View GitHub Profile
if ( !levelHighActive_ )
{
LABEL_10:
if ( interruptID == 15 )
{
if ( sub_FFF0D1F8(&stru_FFF2E0A0.threadPairsPerPriority[3].last, 0, 1) )
{
res = 0xD8A007F0;
}
@neobrain
neobrain / kernel_scheduling.md
Created December 3, 2016 18:01 — forked from Subv/kernel_scheduling.md
Nintendo 3DS Kernel scheduler findings

Kernel synchronization

  • Each core has its own KScheduler instance.

KObject waitlists

Each KObject manages a list of threads that are waiting on it. This list is iterated over each time the KObject is signaled.

The KObject will try to retrieve the KThread with the highest priority from this list, check if it is ready to run (See KThread waitlist), and append it to the scheduler's queue if it is ready.

This awakening operation is performed for every KThread that is ready to run.

@neobrain
neobrain / aco_format.awk
Last active October 26, 2020 08:13
ACO IR formatter
# Reads RADV_DEBUG output and formats ACO IR (skipping non-shader code)
# Usage:
# * awk log -f aco_format.awk
# * cat | awk -f aco_format.awk
BEGIN {
# All defs go into $1
FS="="
}
@neobrain
neobrain / fex_thunks_roadmap.md
Last active March 7, 2024 10:26
FEX library forwarding roadmap
X11 (64-bit) Wayland (64-bit) Wayland (32-bit) X11 (32-bit)
no thunks 1 ✅ 2022 ✅ 2022 ✅ 2022 ✅ 2022
only Wayland thunks 2 N/A ✅ Phase 1 ✅ Phase 3 N/A
Vulkan [^3] ✅ 2022 ✅ Phase 1 Phase 4 Phase 7
zink on Vulkan [^4] ✅ Phase 2 ✅ Phase 2 Phase 4 Phase 7
OpenGL [^5] ✅ 2022 Phase 5 Phase 6 Phase 7

Footnotes

  1. All x86 libraries emulated without using ARM libraries

  2. GL/Vulkan drivers emulated; Wayland forwarded to host ARM libraries