mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	core: Migrate 3DS-specific CP15 register setting into Init
This commit is contained in:
		
							parent
							
								
									c3ffe8f9c3
								
							
						
					
					
						commit
						8004d35ea1
					
				@ -139,16 +139,8 @@ void ARMul_Reset(ARMul_State* state)
 | 
			
		||||
    state->Bank = SVCBANK;
 | 
			
		||||
    FLUSHPIPE;
 | 
			
		||||
 | 
			
		||||
    // Reset CP15
 | 
			
		||||
    ResetMPCoreCP15Registers(state);
 | 
			
		||||
 | 
			
		||||
    // This is separate from the CP15 register reset function, as
 | 
			
		||||
    // this isn't an ARM-defined reset value; it's set by the 3DS.
 | 
			
		||||
    //
 | 
			
		||||
    // TODO: Whenever TLS is implemented, this should contain
 | 
			
		||||
    // the address of the 0x200-byte TLS
 | 
			
		||||
    state->CP15[CP15_THREAD_URO] = Memory::KERNEL_MEMORY_VADDR;
 | 
			
		||||
 | 
			
		||||
    state->EndCondition = 0;
 | 
			
		||||
    state->ErrorCode = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -7,6 +7,7 @@
 | 
			
		||||
#include "core/core.h"
 | 
			
		||||
#include "core/core_timing.h"
 | 
			
		||||
 | 
			
		||||
#include "core/mem_map.h"
 | 
			
		||||
#include "core/settings.h"
 | 
			
		||||
#include "core/arm/arm_interface.h"
 | 
			
		||||
#include "core/arm/disassembler/arm_disasm.h"
 | 
			
		||||
@ -59,6 +60,10 @@ int Init() {
 | 
			
		||||
    g_sys_core = new ARM_DynCom(USER32MODE);
 | 
			
		||||
    g_app_core = new ARM_DynCom(USER32MODE);
 | 
			
		||||
 | 
			
		||||
    // TODO: Whenever TLS is implemented, this should contain
 | 
			
		||||
    // the address of the 0x200-byte TLS
 | 
			
		||||
    g_app_core->SetCP15Register(CP15_THREAD_URO, Memory::KERNEL_MEMORY_VADDR);
 | 
			
		||||
 | 
			
		||||
    LOG_DEBUG(Core, "Initialized OK");
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user