mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
Hacks to let the kernel access the CPU and vice versa (TODO: Fix)
This commit is contained in:
parent
0d9088eddc
commit
1678cd6172
6 changed files with 18 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifdef CPU_DYNARMIC
|
||||
#include "cpu_dynarmic.hpp"
|
||||
|
||||
CPU::CPU(Memory& mem, Kernel& kernel) : mem(mem), env(mem, kernel) {
|
||||
CPU::CPU(Memory& mem, Kernel& kernel) : mem(mem), env(mem, kernel, *this) {
|
||||
cp15 = std::make_shared<CP15>();
|
||||
|
||||
Dynarmic::A32::UserConfig config;
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#include <cassert>
|
||||
#include "kernel.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "cpu.hpp"
|
||||
|
||||
Kernel::Kernel(CPU& cpu, Memory& mem)
|
||||
: cpu(cpu), regs(cpu.regs()), mem(mem), handleCounter(0), serviceManager(regs, mem, currentProcess) {
|
||||
objects.reserve(512); // Make room for a few objects to avoid further memory allocs later
|
||||
portHandles.reserve(32);
|
||||
}
|
||||
|
||||
void Kernel::serviceSVC(u32 svc) {
|
||||
switch (svc) {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "kernel.hpp"
|
||||
// This header needs to be included because I did stupid forward decl hack so the kernel and CPU can both access each other
|
||||
#include "cpu.hpp"
|
||||
#include "resource_limits.hpp"
|
||||
|
||||
// Internal OS function to spawn a thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue