mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Kernel/IPC: Implement StaticBuffer translation for HLE services that use the HLERequestContext architecture.
The real kernel requires services to set up their static buffer targets ahead of time. This implementation does not require that and will simply create the storage for the buffers as they are processed in the incoming IPC request. Static buffers are kept in an unordered_map keyed by their buffer id, and are written into the already-setup area of the request thread when responding an IPC request. This fixes a regression (crash) introduced in #2992. This PR introduces more warnings due to the [[deprecated]] attribute being added to void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id); and VAddr PopStaticBuffer(size_t* data_size);
This commit is contained in:
		
							parent
							
								
									4fc0448093
								
							
						
					
					
						commit
						c9c1ba0952
					
				
					 10 changed files with 113 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -433,7 +433,7 @@ static void FinalizeIrNop(Interface* self) {
 | 
			
		|||
static void SendIrNop(Interface* self) {
 | 
			
		||||
    IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x0D, 1, 2);
 | 
			
		||||
    const u32 size = rp.Pop<u32>();
 | 
			
		||||
    const VAddr address = rp.PopStaticBuffer();
 | 
			
		||||
    const VAddr address = rp.PopStaticBuffer(nullptr);
 | 
			
		||||
 | 
			
		||||
    std::vector<u8> buffer(size);
 | 
			
		||||
    Memory::ReadBlock(address, buffer.data(), size);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue