mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:32:46 +00:00 
			
		
		
		
	Kernel: Fix NVMe register access
We need to use the volatile keyword when mapping the device registers, or the compiler may optimize access, which lead to this QEMU error: pci_nvme_ub_mmiord_toosmall in nvme_mmio_read: MMIO read smaller than 32-bits, offset=0x0
This commit is contained in:
		
							parent
							
								
									c4b78bee45
								
							
						
					
					
						commit
						d1e7b69004
					
				
					 4 changed files with 9 additions and 9 deletions
				
			
		|  | @ -69,7 +69,7 @@ private: | |||
|     RefPtr<NVMeQueue> m_admin_queue; | ||||
|     NonnullRefPtrVector<NVMeQueue> m_queues; | ||||
|     NonnullRefPtrVector<NVMeNameSpace> m_namespaces; | ||||
|     Memory::TypedMapping<ControllerRegister> m_controller_regs; | ||||
|     Memory::TypedMapping<volatile ControllerRegister> m_controller_regs; | ||||
|     bool m_admin_queue_ready { false }; | ||||
|     size_t m_device_count {}; | ||||
|     u32 m_bar; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom