Tree:
f5f9c52900
3096/hle/bufferc
3096/qcom/clamp
3096/spirv/warp
3096/vk/drain_pending_build
3096/vk/pipeline_compilation
Kernel
android/fix-gpu-driver-fetcher
android6
atomicops-mxwell
bcn-ternary-soft
civa
descriptor
descriptor_pool_opt
descriptor_set
disable-vap
discfix
display-modified-settings-first
dmnt2
docsupdate1backckc
dynarm7345
dynarmic-coproc
dynarmic-docs-move-inline
dynarmic-ppc64
eden-orbis-ps4
eds-true-adreno-fixes
feature/dmnt
ffmpeg-cross-compile
filesyscheatfix1
fix-fibers-2
fix/discord-rpc
fix/no-duplicate-drivers
flatopsfixes23485
freebsd-cubeb
fs_external_dlcupdates
fuck-farenheit-units
install-vulkan-ps1-fix-windows-on-arm
interval-zero
lanobu
liz-coalesce-ptr-to-variant
liz-crash-dumps-solaris
liz-dynarmic-backport-waitpkg
liz-dynarmic-macos-fbsd-port
liz-get-rid-of-mcl-intrusive-list
liz-heaptrack-fix
liz-no-rtti-allowance
lock-term-1
macos-sqbuild
macroify-surface-stuffs
master
maxwell_dma
memsetopsyscallavoid
mmap-fixews
mutliplayer-filter-better1
n64
nce-strx
nce_cpp
netgate1
netusejthreadstuff
no-d24
pagetable-clustering
pintocputhing
pipelinederivative
pt-fix-attempt
qcom-weird-vk-ftz
quick-fix
refactoreds2
release/0.0.3
release/0.0.4
rem-dup-applet-launch
remove-unused-fastmem-fallback
remredundaant-android-setts
reorder-menu-game-per-config
revert-2695
sampleshaderfract
scmfix-worktree
script/android-icons
selfhost0
showcase
showcase2
simp-word-man1
sjkdbsdfjkbsdf-2834
smartqueryreset
static-linux
static-vector-thread-list
stuffmadeforfun
sured-revert
test
test-donotmerge
test-revert-gpu-optim
test2
true-eds
true-eds-graphics
update-cpmutil
update-icons-android-11
video-core-improve-dma-logic
vk-fix-oom-force-maller-buffers
vk-surface-andpc
vulkan-thingy
woa-turnip-expr
xbzk-mci-bare-minimum-boot-fix
xbzk-saf-recursive-write-with-permission-request
0.0.0
0.0.1-pre-alpha
0.0.2-pre-alpha
test-tag1
test-tag2
v0.0.3
v0.0.3-rc1
v0.0.3-rc2
v0.0.3-rc3
v0.0.3.git
v0.0.4
v0.0.4-rc1
v0.0.4-rc2
v0.0.4-rc2.test
v0.0.4-rc2.test2
v0.0.4-rc3
v0.0.4-rc3.test1
v0.0.4-rc3.test2
v0.0.4.test
${ noResults }
2 Commits (f5f9c529009dd70d83efce5dc7ed298c519bacca)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
567b7de124 |
core/cpu_core_manager: Create threads separately from initialization.
Our initialization process is a little wonky than one would expect when
it comes to code flow. We initialize the CPU last, as opposed to
hardware, where the CPU obviously needs to be first, otherwise nothing
else would work, and we have code that adds checks to get around this.
For example, in the page table setting code, we check to see if the
system is turned on before we even notify the CPU instances of a page
table switch. This results in dead code (at the moment), because the
only time a page table switch will occur is when the system is *not*
running, preventing the emulated CPU instances from being notified of a
page table switch in a convenient manner (technically the code path
could be taken, but we don't emulate the process creation svc handlers
yet).
This moves the threads creation into its own member function of the core
manager and restores a little order (and predictability) to our
initialization process.
Previously, in the multi-threaded cases, we'd kick off several threads
before even the main kernel process was created and ready to execute (gross!).
Now the initialization process is like so:
Initialization:
1. Timers
2. CPU
3. Kernel
4. Filesystem stuff (kind of gross, but can be amended trivially)
5. Applet stuff (ditto in terms of being kind of gross)
6. Main process (will be moved into the loading step in a following
change)
7. Telemetry (this should be initialized last in the future).
8. Services (4 and 5 should ideally be alongside this).
9. GDB (gross. Uses namespace scope state. Needs to be refactored into a
class or booted altogether).
10. Renderer
11. GPU (will also have its threads created in a separate step in a
following change).
Which... isn't *ideal* per-se, however getting rid of the wonky
intertwining of CPU state initialization out of this mix gets rid of
most of the footguns when it comes to our initialization process.
|
7 years ago |
|
|
7128bf879f |
core: Relocate CPU core management to its own class
Keeps the CPU-specific behavior from being spread throughout the main System class. This will also act as the home to contain member functions that perform operations on all cores. The reason for this being that the following pattern is sort of prevalent throughout sections of the codebase: If clearing the instruction cache for all 4 cores is necessary: Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); This is kind of... well, silly to copy around whenever it's needed. especially when it can be reduced down to a single line. This change also puts the basics in place to begin "ungrafting" all of the forwarding member functions from the System class that are used to access CPU state or invoke CPU-specific behavior. As such, this change itself makes no changes to the direct external interface of System. This will be covered by another changeset. |
7 years ago |